Beispiel #1
0
	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
Beispiel #2
0
    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
Beispiel #3
0
	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
Beispiel #4
0
	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
Beispiel #5
0
 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
Beispiel #6
0
    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
Beispiel #7
0
 def __init__(self):
     import cx_Oracle as dbapi
     dBackend.__init__(self)
     self.dbModuleName = "cx_Oracle"
     self.dbapi = dbapi
Beispiel #8
0
	def __init__(self):
		dBackend.__init__(self)
		#### TODO: Customize with name of dbapi module
		self.dbModuleName = "???"
Beispiel #9
0
	def __init__(self):
		import cx_Oracle as dbapi
		dBackend.__init__(self)
		self.dbModuleName = "cx_Oracle"
		self.dbapi = dbapi
Beispiel #10
0
 def __init__(self):
     """JFCS 08/23/07 Currently supporting only psycopg2"""
     dBackend.__init__(self)
     self.dbModuleName = "psycopg"
     self.conn_user = ""
Beispiel #11
0
 def __init__(self):
     dBackend.__init__(self)
     #### TODO: Customize with name of dbapi module
     self.dbModuleName = "???"
Beispiel #12
0
	def __init__(self):
		"""JFCS 08/23/07 Currently supporting only psycopg2"""
		dBackend.__init__(self)
		self.dbModuleName = "psycopg"
		self.conn_user = ""
Beispiel #13
0
	def __init__(self):
		dBackend.__init__(self)
		self.dbModuleName = "MySQLdb"
Beispiel #14
0
 def __init__(self):
     dBackend.__init__(self)
     self.dbModuleName = "MySQLdb"