Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def connect(**kwargs) -> ExaConnection:
"""
Constructor of connection objects
Please check ExaConnection object for list of arguments
"""
return ExaConnection(**kwargs)
from ..connection import ExaConnection
apilevel = '2.0'
threadsafety = 1
paramstyle = None
def connect(**kwargs):
if 'autocommit' not in kwargs:
kwargs['autocommit'] = False
return DB2Connection(**kwargs)
class DB2Connection(ExaConnection):
def cursor(self):
return DB2Cursor(self)
class DB2Cursor(object):
arraysize = 1
def __init__(self, connection):
self.connection = connection
self.stmt = None
def execute(self, query):
self.stmt = self.connection.execute(query)
def executemany(self, query):
raise NotSupportedError