Package tlib :: Package base :: Module OracleConnector :: Class OracleConnector
[hide private]
[frames] | no frames]

Class OracleConnector

source code

object --+
         |
        OracleConnector

Connects to MySQL DB, executes queries Autocommit is disabled by default, commit is done with commit function Warnings are turned into exceptions

Instance Methods [hide private]
 
__init__(self, sid, username=None, password=None, host=None, port=None)
Initialize DB connection.
source code
 
get_autocommit_status(self)
returns tuple Autocommit status i.e.
source code
 
query_select(self, query)
Send/execute SELECT queries, returns data from DB :param: str MySQL query :return: tuple with arguments dictionaries, each dictionary is a row of DB i.e.
source code
 
query_execute(self, query)
Sends query to DB.
source code
 
commit(self)
Commits all changes, returns Exception in case of failure
source code
 
rollback(self)
Rolls back all commits, returns exception in case of failure
source code
 
close_cursor(self)
Close cursor.
source code
 
close_db(self)
Close DB connection.
source code
 
__del__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sid, username=None, password=None, host=None, port=None)
(Constructor)

source code 

Initialize DB connection. Turning warning into exceptions

Overrides: object.__init__

get_autocommit_status(self)

source code 

returns tuple Autocommit status i.e. 1 for True and 0 for False

query_select(self, query)

source code 

Send/execute SELECT queries, returns data from DB :param: str MySQL query :return: tuple with arguments dictionaries, each dictionary is a row of DB i.e. ({row_first}, {row_second}, ... ,{row_last})

query_execute(self, query)

source code 

Sends query to DB. Can be DELETE, UPDATE :param: str query :return: dict {DictCursor}

close_cursor(self)

source code 

Close cursor. Connection to DB is still open, new cursor can be created

close_db(self)

source code 

Close DB connection. All uncommitted changes are lost