Home | Trees | Index | Help |
|
---|
Package Modeling :: Package DatabaseAdaptors :: Package AbstractDBAPI2AdaptorLayer :: Module AbstractDBAPI2Adaptor :: Class AbstractDBAPI2Adaptor |
|
Adaptor
--+
|
AbstractDBAPI2Adaptor
MySQLAdaptor
,
OracleAdaptor
,
PostgresqlAdaptor
,
SQLiteAdaptor
Your inheriting concrete Adaptor class must override:
- underlying_py_adaptor_module(), which additionally must be declared as a static method (please use Modeling.utils.staticmethod instead of python2.2's, since the former works for python2.1 as well.
- createAdaptorContext(): see detail in the method's docstring.
- schemaGenerationFactory(): id.
Plus the two following methods, for use by the inherited methods:
- dbAPI_connectionDictionaryForConnect()
- dbAPI_gimmeCnxAndCursorForDBAdmin()
Method Summary | |
---|---|
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
Creates and return an instance of the concrete AdaptorContext in relation to your concrete Adaptor. | |
TBD... | |
Returns the connection dictionary to be used with the underlying python DB-API v2.0-compliant db-adaptor's connect(). | |
Returns a connection object (opened using the administrativeConnectionDictionary) and a cursor adequate to perform adminstrative tasks on the database (i.e., mainly, adequate to create or drop databases). | |
See Modeling.interfaces.Adaptor for details | |
TBD... | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
See Modeling.interfaces.Adaptor for details | |
Returns an instance of the concrete SchemaGeneration class. | |
Returns the underlying python DB-API v2.0-compliant db-adaptor module (Static method) | |
Inherited from Adaptor | |
See interfaces.Adaptor for details | |
| |
Returns the adaptor associated to the supplied model: it extracts the name of the adaptor to be used with the model then calls adaptorWithModel() Raises ValueError is parameter 'aModel' is None or if its adaptorName is empty. (Static method) | |
Returns the adaptor. (Static method) | |
See interfaces.Adaptor for details | |
See interfaces.Adaptor for details | |
See interfaces.Adaptor for details | |
Compares 'aModel' 's connectionDictionary with self's and returns the result | |
Returns the connectionDictionary | |
Returns all AdaptorContexts created and registered with this Adaptor | |
Returns the default delegate. (Static method) | |
Returns the delegate for that Adaptor ; when initialized the delegate is the one returned by defaultDelegate() | |
Returns the expression class to be used with the Adaptor. | |
Returns the expression class to be used by adaptor, or None if none was previously set with 'setExpressionClassForAdaptor()'. (Static method) | |
Unimplemented yet | |
Forwards the messages to all contexts() and returns 1 (true value) if at least one of these returned a true value, return 0 (false value) otherwise. | |
See interfaces.Adaptor for details | |
Returns the name that was used when the concrete Adaptor was instanciated. | |
See interfaces.Adaptor for details | |
Sets the connectionDictionary. | |
Sets the default delegate which is assigned to Adaptor instances when they are initialized. (Static method) | |
Sets the delegate (not used yet) | |
Sets the SQLExpression to use in conjonction with a particular adaptor. (Static method) |
Class Variable Summary | |
---|---|
tuple |
__implements__ = (<class Modeling.interfaces.Adaptor.IAd...
|
Inherited from Adaptor | |
str |
__raise_exception__ = 'AbstractMethod'
|
str |
__raise_msg__ = 'Left intentionally unimplemented in thi...
|
Instance Method Details |
---|
assertConnectionDictionaryIsValid(self)See Modeling.interfaces.Adaptor for details |
assignExternalInfoForAttribute(self, anAttribute)See Modeling.interfaces.Adaptor for details |
assignExternalInfoForEntity(self, anEntity)See Modeling.interfaces.Adaptor for details |
createAdaptorContext(self)Creates and return an instance of the concrete AdaptorContext in relation to your concrete Adaptor.
Subclasses should override this method without calling the superclass' implementation. |
createDatabaseWithAdministrativeConnectionDictionary(self, administrativeConnectionDictionary, createUserFlag=0)TBD See also: SchemaGeneration.createDatabaseStatementsForConnectionDictionary() |
dbAPI_connectionDictionaryForConnect(self, aModelConnectionDictionary)Returns the connection dictionary to be used with the underlying python DB-API v2.0-compliant db-adaptor's connect(). The returned dictionary will be passed as keyword to the connect() method (e.g.: 'apply(connect, (), returnedDict)'). Subclasses should override this method without calling the superclass' implementation. Parameter:
|
dbAPI_gimmeCnxAndCursorForDBAdmin(self, administrativeConnectionDictionary)Returns a connection object (opened using the administrativeConnectionDictionary) and a cursor adequate to perform adminstrative tasks on the database (i.e., mainly, adequate to create or drop databases). Note that depending on the underlying adaptor and the corresponding database, this can be more or less easy to provide. For example, Postgresql db does not allow any SQL statement like 'CREATE DATABASE' to be executed while a transaction is opened. Since the python DB-API implicitly requires that a transaction is automatically opened, a simple connect is not sufficient. To continue with postgresql, the python module 'psycopg' offers an 'autocommit()' method on connection to toggle the automatic opening of a transaction, while the 'pgdb' module requires some additional work with its underlying '_pg' module. Subclasses should override this method without calling the superclass' implementation. Parameter:
|
defaultExpressionClass(self)See Modeling.interfaces.Adaptor for details |
dropDatabaseWithAdministrativeConnectionDictionary(self, administrativeConnectionDictionary, dropUserFlag=0)TBD See also: SchemaGeneration.dropDatabaseStatementsForConnectionDictionary() |
expressionFactory(self)See Modeling.interfaces.Adaptor for details
|
externalTypesWithModel(self, aModel)See Modeling.interfaces.Adaptor for details |
fetchedValueForDataValue(self, value, anAttribute)See Modeling.interfaces.Adaptor for details |
fetchedValueForDateValue(self, value, anAttribute)See Modeling.interfaces.Adaptor for details |
fetchedValueForNumberValue(self, value, anAttribute)See Modeling.interfaces.Adaptor for details |
fetchedValueForStringValue(self, value, anAttribute)See Modeling.interfaces.Adaptor for details |
fetchedValueForValue(self, value, anAttribute)See Modeling.interfaces.Adaptor for details |
internalTypeForExternalType(self, extType, aModel)See Modeling.interfaces.Adaptor for details |
isValidQualifierType(self, typeName, aModel)See Modeling.interfaces.Adaptor for details |
schemaGenerationFactory(self)Returns an instance of the concrete SchemaGeneration class. Subclasses should override this method without calling the superclass' implementation. |
Static Method Details |
---|
underlying_py_adaptor_module()Returns the underlying python DB-API v2.0-compliant db-adaptor module Subclasses should override this method without calling the superclass' implementation. |
Class Variable Details |
---|
__implements__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:25 2006 | http://epydoc.sf.net |