def __init__(self): dBackend.__init__(self) self.dbModuleName = "kinterbasdb" self.fieldPat = re.compile("([A-Za-z_][A-Za-z0-9-_$]+)\.([A-Za-z_][A-Za-z0-9-_$]+)") self.paramPlaceholder = "?" import kinterbasdb initialized = getattr(kinterbasdb, "initialized", None) if not initialized: if initialized is None: # type_conv=200 KeyError with the older versions. User will need # mxDateTime installed as well: kinterbasdb.init() else: # Use Python's Decimal and datetime types: if kinterbasdb.__version__[0] == 3 and kinterbasdb.__version__[1] >= 3: # use type_conv=300 for blob encoding kinterbasdb.init(type_conv=300) dabo.dbActivityLog.info("kinterbasdb.init(type_conv=300)") else: kinterbasdb.init(type_conv=200) dabo.dbActivityLog.info("kinterbasdb.init(type_conv=200)") if initialized is None: # Older versions of kinterbasedb didn't have this attribute, so we write # it ourselves: kinterbasdb.initialized = True self.dbapi = kinterbasdb
def __init__(self): dBackend.__init__(self) self.dbModuleName = "kinterbasdb" self.fieldPat = re.compile( "([A-Za-z_][A-Za-z0-9-_$]+)\.([A-Za-z_][A-Za-z0-9-_$]+)") self.paramPlaceholder = "?" import kinterbasdb initialized = getattr(kinterbasdb, "initialized", None) if not initialized: if initialized is None: # type_conv=200 KeyError with the older versions. User will need # mxDateTime installed as well: kinterbasdb.init() else: # Use Python's Decimal and datetime types: if kinterbasdb.__version__[ 0] == 3 and kinterbasdb.__version__[1] >= 3: # use type_conv=300 for blob encoding kinterbasdb.init(type_conv=300) dabo.dbActivityLog.info("kinterbasdb.init(type_conv=300)") else: kinterbasdb.init(type_conv=200) dabo.dbActivityLog.info("kinterbasdb.init(type_conv=200)") if initialized is None: # Older versions of kinterbasedb didn't have this attribute, so we write # it ourselves: kinterbasdb.initialized = True self.dbapi = kinterbasdb
def __init__(self): dBackend.__init__(self) self.dbModuleName = "pysqlite2" self.paramPlaceholder = "?" try: from pysqlite2 import dbapi2 as dbapi except ImportError: import sqlite3 as dbapi self.dbapi = dbapi
def __init__(self): dBackend.__init__(self) #- jfcs 11/06/06 first try getting Microsoft SQL 2000 server working # MSSQL requires the installation of FreeTDS. FreeTDS can be downloaded from # http://www.freetds.org/ self.dbModuleName = "pymssql" self.useTransactions = True # this does not appear to be required import pymssql self.dbapi = pymssql
def __init__(self): dBackend.__init__(self) # - jfcs 11/06/06 first try getting Microsoft SQL 2000 server working # MSSQL requires the installation of FreeTDS. FreeTDS can be downloaded from # http://www.freetds.org/ self.dbModuleName = "pymssql" self.useTransactions = True # this does not appear to be required import pymssql self.dbapi = pymssql
def __init__(self): import cx_Oracle as dbapi dBackend.__init__(self) self.dbModuleName = "cx_Oracle" self.dbapi = dbapi
def __init__(self): dBackend.__init__(self) #### TODO: Customize with name of dbapi module self.dbModuleName = "???"
def __init__(self): """JFCS 08/23/07 Currently supporting only psycopg2""" dBackend.__init__(self) self.dbModuleName = "psycopg" self.conn_user = ""
def __init__(self): dBackend.__init__(self) self.dbModuleName = "MySQLdb"