OPSI.Backend.MySQL module

MySQL-Backend

copyright:uib GmbH <info@uib.de>
author:Jan Schneider <j.schneider@uib.de>
author:Erol Ueluekmen <e.ueluekmen@uib.de>
author:Niko Wenselowski <n.wenselowski@uib.de>
license:GNU Affero GPL version 3
class OPSI.Backend.MySQL.ConnectionPool(**kwargs)

Bases: object

destroy()
class OPSI.Backend.MySQL.MySQL(**kwargs)

Bases: OPSI.Backend.SQL.SQL

ALTER_TABLE_CHANGE_SUPPORTED = True
AUTOINCREMENT = 'AUTO_INCREMENT'
ESCAPED_APOSTROPHE = "\\'"
ESCAPED_ASTERISK = '\\*'
ESCAPED_BACKSLASH = '\\\\'
close(conn, cursor)
connect(cursorType=None)

Connect to the MySQL server. If cursorType is given this type will be used as the cursor.

Establishing a connection will be tried multiple times. If no connection can be made during this an exception will be raised.

Parameters:cursorType – The class of the cursor to use. Defaults to :py:class:MySQLdb.cursors.DictCursor:.
Raises:BackendUnableToConnectError – In case no connection can be established.
Returns:The connection and the corresponding cursor.
delete(table, where, conn=None, cursor=None)
execute(query, conn=None, cursor=None)
getRow(query, conn=None, cursor=None)
getRows(query)
getSet(query)
getTableCreationOptions(table)
getTables()
insert(table, valueHash, conn=None, cursor=None)
update(table, where, valueHash, updateWhereNone=False)
class OPSI.Backend.MySQL.MySQLBackend(**kwargs)

Bases: OPSI.Backend.SQL.SQLBackend

productProperty_insertObject(productProperty)
productProperty_updateObject(productProperty)
class OPSI.Backend.MySQL.MySQLBackendObjectModificationTracker(**kwargs)

Bases: OPSI.Backend.SQL.SQLBackendObjectModificationTracker