|
- Method resolution order:
- MyDriver
- DBDriver
- Propertied
- object
Methods defined here:
- __getattr__(self, key)
- Search for an action-script of the given name in actionScripts
- establishConnection(self, fullSpecifier)
- Connect using the fully specified specifier
fullSpecifier -- a specifier with all arguments unified
and ready to be connected. This specifier should
include everything required to do the actual
connection (including passwords or the like).
All sub-classes must override this method!
Data and other attributes defined here:
- DataError = <class _mysql_exceptions.DataError at 0x018EB330>
- Exception raised for errors that are due to problems with the
processed data like division by zero, numeric value out of range,
etc.
- DatabaseError = <class _mysql_exceptions.DatabaseError at 0x018EB420>
- Exception raised for errors that are related to the
database.
- Error = <class _mysql_exceptions.Error at 0x018EB450>
- Exception that is the base class of all other error exceptions
(not Warning).
- IntegrityError = <class _mysql_exceptions.IntegrityError at 0x018EB960>
- Exception raised when the relational integrity of the database
is affected, e.g. a foreign key check fails, duplicate key,
etc.
- InterfaceError = <class _mysql_exceptions.InterfaceError at 0x018EB840>
- Exception raised for errors that are related to the database
interface rather than the database itself.
- InternalError = <class _mysql_exceptions.InternalError at 0x018EB150>
- Exception raised when the database encounters an internal
error, e.g. the cursor is not valid anymore, the transaction is
out of sync, etc.
- NotSupportedError = <class _mysql_exceptions.NotSupportedError at 0x018EB660>
- Exception raised in case a method or database API was used
which is not supported by the database, e.g. requesting a
.rollback() on a connection that does not support transaction or
has transactions turned off.
- OperationalError = <class _mysql_exceptions.OperationalError at 0x018EB240>
- Exception raised for errors that are related to the database's
operation and not necessarily under the control of the programmer,
e.g. an unexpected disconnect occurs, the data source name is not
found, a transaction could not be processed, a memory allocation
error occurred during processing, etc.
- ProgrammingError = <class _mysql_exceptions.ProgrammingError at 0x018EB8D0>
- Exception raised for programming errors, e.g. table not found
or already exists, syntax error in the SQL statement, wrong number
of parameters specified, etc.
- Warning = <class _mysql_exceptions.Warning at 0x018EB270>
- Exception raised for important warnings like data truncations
while inserting, etc.
- apilevel = <StringProperty 'apilevel'>
- DBAPI 2.0 apilevel value
- baseModule = <module 'MySQLdb' from 'C:\bin\lang\py23\lib\site-packages\MySQLdb\__init__.pyc'>
- capabilities = <pytable.dbdriver.DriverCapabilities object at 0x018EAFD0>
- dataTypeNames = [(0, 'DECIMAL'), (1, 'CHAR'), (3, 'LONG'), (4, 'FLOAT'), (5, 'DOUBLE'), (7, 'TIMESTAMP'), (8, 'LONGLONG'), (9, 'INT24'), (10, 'DATE'), (11, 'TIME'), (12, 'DATETIME'), (13, 'YEAR'), (14, 'NEWDATE'), (249, 'TINY_BLOB'), (250, 'MEDIUM_BLOB'), (251, 'LONG_BLOB'), (252, 'BLOB'), (253, 'VARCHAR'), (254, 'STRING')]
- localTypeRegistry = [(0, 'decimal'), (1, 'char'), (3, 'int4'), (4, 'float'), (5, 'double'), (7, 'timestamp'), (8, 'int8'), (10, 'date'), (11, 'time'), (12, 'datetime'), (249, 'blob'), (250, 'blob'), (251, 'blob'), (252, 'blob'), (253, 'varchar'), (254, 'text')]
- name = EnumerationChoice( name=u'MySQL', value='pytable...ver.MyDriver', friendlyName=u'MySQL via MySQLdb')
- paramstyle = <StringProperty 'paramstyle'>
- DBAPI 2.0 parameter-style value
- queries = {'listDatabases': <pytable.mysql.tableactions.ListDatabases object at 0x019615B0>, 'listIndices': <pytable.mysql.tableactions.ListIndices object at 0x01961450>, 'listTables': <pytable.mysql.tableactions.ListTables object at 0x01961470>, 'tableStructure': <pytable.mysql.tableactions.TableStructure object at 0x019614D0>}
- systemDBName = <StringProperty 'systemDBName'>
- Default name for driver's system database (for listDatabases connections)
- threadsafety = <IntegerProperty 'paramstyle'>
- DBAPI 2.0 threadsafety value XXX should be an enumeration!
- userDescription = 'MySQL database driver (via MySQLdb)\n\nProvides ac...m/\n\thttp://sourceforge.net/projects/mysql-python\n'
Methods inherited from DBDriver:
- connect(self, specifier=None, share=1, **namedarguments)
- Connect using this driver to the specified database
specifier -- the DBSpecifier object encoding the connection
information to be used in establishing the connection
If specifier is None, then create a new DBSpecifier
using the named arguments as arguments to the DBSpecifier
constructor. Note: drivers with driver-specific specifier
classes may construct those specific classes instead of
the base DBSpecifier class.
If specifier is not None, but there are namedarguments,
the specifier will be cloned (copied) with the passed
namedarguments as parameters to the clone method. The
result will be that the named argument values will override
the specifier object's values.
share -- if true, the connection will be shared with any existing
connection which matches the calculated final specifier
- createSpecifier(self, **namedarguments)
- Create a new specifier object for this driver
namedarguments -- applied to the constructor of the
DBSpecifier
Note:
the drivername property will be set to our name
property's value
- getSystemSpecifiers(self, *arguments, **namedarguments)
- Customization Point: return list of system specifiers
For APIs which have system-registered data sources,
such as ODBC, this method should be overwritten to provide
system specifiers for the system-registered data sources.
- localToSQLType(self, source)
- Convert a local numeric data-type to an SQL string data-type
source -- the source specifier
returns an sql data-type for the given local SQL type, the
sub-class must provide the actual implementation.
- reconnect(self, connection)
- Reconnect the given DBConnection object
- sqlToBaseType(self, source)
- Convert given SQL data-type to a property-base-type
source -- the source specifier, an SQL identifier
returns a base-type suitable for use in basicproperty
properties to control the property's operation.
- sqlToDataType(self, source)
- Convert given SQL data-type to the desired data-type specifier
source -- the source specifier, an SQL identifier
returns a wxoo specifier or raises KeyError, only returns
the first-registered data-type, so sub-classes that want
to override the defaults need to prepend their dataTypeRegistry
to the dbdriver.DBDriver.dataTypeRegistry list.
- unifySpecifier(self, specifier, **namedarguments)
- Given specifier and named arguments create finalSpecifier
specifier -- DBSpecifer or None
named -- dictionary of attribute name to attribute value
See DBDriver.connect for discussion of the semantics
- wrapConnection(self, connection)
- Wrap the connection with a driver-aware connection object
Class methods inherited from DBDriver:
- copyErrorsFromModule(cls, source) from type
- Method to copy Error names from source to the driver class
Data and other attributes inherited from DBDriver:
- connectionProperties = ('dsn', 'host', 'user', 'password', 'database')
- connections = <WeakValueDictionaryProperty 'connections'>
- Mapping of specifier objects to live connections
The DBDriver retains weak references to all active
connections, to allow for connection sharing and/or
properly shutting down all connections on exit.
- dataTypeRegistry = [('float', 'float', <type 'float'>), ('float4', 'float', <type 'float'>), ('float8', 'float', <type 'float'>), ('int2', 'int', <type 'int'>), ('int4', 'int', <type 'int'>), ('int8', 'long', <type 'long'>), ('integer', 'int', <type 'int'>), ('bytea', 'str.long', <type 'str'>), ('char', 'str', <type 'str'>), ('text', 'str.long', <type 'str'>), ('varchar', 'str', <type 'str'>), ('bool', 'bool', 'basictypes.booleanfix.bool'), ('blob', 'str.locale', <type 'str'>), ('bpchar', 'str.locale', <type 'str'>), ('date', 'datetime', 'mx.DateTime.DateTimeType'), ('interval', 'datetimedelta', 'mx.DateTime.DateTimeDeltaType'), ('time', 'timeofday', 'basictypes.datemx_types.mxTimeOfDay'), ('timestamp', 'datetime', 'mx.DateTime.DateTimeType'), ('timestamptz', 'datetime', 'mx.DateTime.DateTimeType'), ('cash', 'decimal', <type 'int'>), ...]
- defaultConnectionClass = <ClassProperty 'defaultConnectionClass'>
- Default DBConnection sub-class to be used for this driver
- fileBased = 0
- friendlyName = <StringProperty 'friendlyName'>
- Friendly name of the DBDriver type
Methods inherited from Propertied:
- __init__(self, *arguments, **namedarguments)
- Propertied object initialisation, allows passing in initial values for properties by name
- __str__(self)
- Get a friendly representation of the object
- clone(self, **newValues)
- Clone this object, with optional new property values
This method calls the __init__ method of your class with
the current property values of your class. Providing newValues
(a dictionary) overrides property settings with new values.
- getCloneProperties(self)
- Get properties dictionary (key:value) for use in cloning of the instance
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
- toString(self, indentation='', alreadyDone=None, indentString=' ')
- Get a nicely formatted representation of this object
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
XXX Needs a far better API, likely a stand-alone class
without the automatic inheritance problems here :(
Class methods inherited from Propertied:
- getProperties(cls) from type
- Get the BasicProperty properties for a particular object's class
Data and other attributes inherited from Propertied:
- __dict__ = <dictproxy object at 0x01AFCFB0>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Propertied' objects>
- list of weak references to the object (if defined)
|