Index of the sqlobject module
-
m
sqlobject
...
- SQLObject 0.10
- a DATETIME_IMPLEMENTATION ...
- a MXDATETIME_IMPLEMENTATION ...
- a conftest ...
- a const ...
- a datetime_available ...
- a sqlhub ... - This object serves as a hub for connections, so that you can pass in a ConnectionHub to a SQLObject subclass as though it was a connection, but actually bind a real database connection later. You can also bind connections on a per-thread basis.
- f FirebirdConnection ...
- f MSSQLConnection ...
- f MaxdbConnection ...
- f MySQLConnection ...
- f PostgresConnection ...
- f SQLiteConnection ...
- f SybaseConnection ...
-
m
boundattributes
...
- Bound attributes are attributes that are bound to a specific class and
a specific name. In SQLObject a typical example is a column object,
which knows its name and class.
- C BoundAttribute ... - This is a declarative class that passes all the values given to it to another object. So you can pass it arguments (via __init__/__call__) or give it the equivalent of keyword arguments through subclassing. Then a bound object will be added in its place.
- C BoundFactory ... - This will bind the attribute to whatever is given by factory_class. This factory should be a callable with the signature factory_class(added_class, attr_name, *args, **kw).
-
m
cache
...
- This implements the instance caching in SQLObject. Caching is
relatively aggressive. All objects are retained so long as they are
in memory, by keeping weak references to objects. We also keep other
objects in a cache that doesn't allow them to be garbage collected
(unless caching is turned off).
-
C
CacheFactory
...
- CacheFactory caches object creation. Each object should be
referenced by a single hashable ID (note tuples of hashable
values are also hashable).
- f __init__ ... - Every cullFrequency times that an item is retrieved from this cache, the cull method is called.
- f allIDs ... - Returns the IDs of all objects in the cache.
- f clear ... - Removes everything from the cache. Warning! This can cause duplicate objects in memory.
- f created ... - Inserts and object into the cache. Should be used when no one else knows about the object yet, so there cannot be any object already in the cache. After a database INSERT is an example of this situation.
- f cull ... - Runs through the cache and expires objects. E.g., if cullFraction is 3, then every third object is moved to the 'expired' (aka weakref) cache.
- f expire ... - Expires a single object. Typically called after a delete. Doesn't even keep a weakref. (@@: bad name?)
- f expireAll ... - Expires all objects, moving them all into the expired/weakref cache.
- f finishPut ... - Releases the lock that is retained when .get() is called and returns None.
- f get ... - This method can cause deadlocks! tryGet is safer
- f getAll ... - Return all the objects in the cache.
- f put ... - Puts an object into the cache. Should only be called after .get(), so that duplicate objects don't end up in the cache.
- f tryGet ... - This returns None, or the object in cache.
-
C
CacheSet
...
- A CacheSet is used to collect and maintain a series of caches. In
SQLObject, there is one CacheSet per connection, and one Cache
in the CacheSet for each class, since IDs are not unique across
classes. It contains methods similar to Cache, but that take
a cls argument.
- f allSubCachesByClassNames ...
- f created ...
- f finishPut ...
- f get ...
- f weakrefAll ... - Move all objects in the cls (or if not given, then in all classes) to the weakref dictionary, where they can be collected.
-
C
CacheFactory
...
- CacheFactory caches object creation. Each object should be
referenced by a single hashable ID (note tuples of hashable
values are also hashable).
-
m
classregistry
...
-
- classresolver.py
- 2 February 2004, Ian Bicking <ianb@colorstudy.com>
- a MasterRegistry ...
-
C
ClassRegistry
...
- We'll be dealing with classes that reference each other, so
class C1 may reference C2 (in a join), while C2 references
C1 right back. Since classes are created in an order, there
will be a point when C1 exists but C2 doesn't. So we deal
with classes by name, and after each class is created we
try to fix up any references by replacing the names with
actual classes.
- f __init__ ...
- f addCallback ... - This callback is called for all classes, not just specific ones (like addClassCallback).
- f addClass ... - Everytime a class is created, we add it to the registry, so that other classes can find it by name. We also call any callbacks that are waiting for the class.
- f addClassCallback ... - Whenever a name is substituted for the class, you can register a callback that will be called when the needed class is created. If it's already been created, the callback will be called immediately.
- f allClasses ...
- f findClass ...
- f registry ...
-
m
col
...
- Col -- SQLObject columns
-
C
BLOBCol
...
- a name ...
-
C
baseClass
...
- a default ...
- a joinName ...
- a validator ...
- f __delete__ ...
- f __get__ ...
- f __init__ ...
- f __set__ ...
- f autoConstraints ...
- f createSQL ...
- f createValidators ...
- f firebirdCreateSQL ...
- f maxdbCreateSQL ...
- f mssqlCreateSQL ...
- f mysqlCreateSQL ...
- f postgresCreateSQL ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
- f __init__ ...
- f withClass ...
- C BigIntCol ...
-
C
BoolCol
...
-
C
baseClass
...
- f __init__ ...
- f __set__ ...
- f autoConstraints ...
- f createSQL ...
- f firebirdCreateSQL ...
- f maxdbCreateSQL ...
- f sybaseCreateSQL ...
- f __init__ ...
- f withClass ...
-
C
baseClass
...
- C Col ...
- C CurrencyCol ...
- C DateCol ...
- C DateTimeCol ...
- C DecimalCol ...
- C EnumCol ...
- C FloatCol ...
-
C
ForeignKey
...
-
C
baseClass
...
- a key_type ...
- f __set__ ...
- f createSQL ...
- f createValidators ... - Create a list of validators for the column.
- f maxdbCreateReferenceConstraint ...
- f mysqlCreateSQL ...
- f sybaseCreateReferenceConstraint ...
- f sybaseCreateSQL ...
- f __init__ ...
- f withClass ...
-
C
baseClass
...
- C IntCol ...
-
C
KeyCol
...
-
C
baseClass
...
- f __set__ ...
- f createSQL ...
- f mssqlCreateSQL ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
- f __init__ ...
-
C
baseClass
...
- C MediumIntCol ...
- C PickleCol ...
- C SOSetCol ...
-
C
SOSmallIntCol
...
- f __init__ ...
- f __set__ ...
- f createSQL ...
- f createValidators ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
- C SOStringCol ...
-
C
SOStringLikeCol
...
- A common ancestor for SOStringCol and SOUnicodeCol
- f __delete__ ...
- f __get__ ...
- f __init__ ...
- f __set__ ...
- f createSQL ...
- f createValidators ... - Create a list of validators for the column.
- f mysqlCreateSQL ...
- f postgresCreateSQL ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
- C SOTimeCol ...
-
C
SOTimestampCol
...
- Necessary to support MySQL's use of TIMESTAMP versus DATETIME types
- f __delete__ ...
- f __get__ ...
- f __init__ ...
- f __set__ ...
- f autoConstraints ...
- f createSQL ...
- f createValidators ...
- f maxdbCreateSQL ...
- f mysqlCreateSQL ...
- f postgresCreateSQL ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
-
C
SOTinyIntCol
...
- f __init__ ...
- f __set__ ...
- f addSQLAttrs ...
- f createValidators ...
- f maxdbCreateSQL ...
- f sqliteCreateSQL ...
- f sybaseCreateSQL ...
- C SOUnicodeCol ...
-
C
SetCol
...
-
C
SmallIntCol
...
-
C
StringCol
...
-
C
TimeCol
...
-
C
TimestampCol
...
- C TinyIntCol ...
- C UnicodeCol ...
-
C
BLOBCol
...
- m constraints ... - Constraints
-
m
converters
...
- a converters ...
- a sqlStringReplace ...
-
C
ConverterRegistry
...
- f BoolConverter ...
- f DateConverter ...
- f DateTimeConverter ...
- f DecimalConverter ...
- f FloatConverter ...
- f IntConverter ...
- f LongConverter ...
- f NoneConverter ...
- f SequenceConverter ...
- f StringLikeConverter ...
- f StructTimeConverter ...
- f TimeConverter ...
- f isoStr ... - Gets rid of time zone information (@@: should we convert to GMT?)
- f lookupConverter ...
- f registerConverter ...
- f sqlrepr ...
-
m
dbconnection
...
- a TheURIOpener ...
- C ConnMethodWrapper ...
- C ConnWrapper ... - This represents a SQLObject class that is bound to a specific connection (instances have a connection instance variable, but classes are global, so this is binds the connection variable lazily when a class method is accessed)
-
C
ConnectionHub
...
- This object serves as a hub for connections, so that you can pass
in a ConnectionHub to a SQLObject subclass as though it was a
connection, but actually bind a real database connection later.
You can also bind connections on a per-thread basis.
- a threadConnection ...
- f __set__ ...
- f doInTransaction ... - This routine can be used to run a function in a transaction, rolling the transaction back if any exception is raised from that function, and committing otherwise.
- f getConnection ...
- C ConnectionURIOpener ...
- C ConsoleWriter ...
-
C
DBAPI
...
- Subclass must define a makeConnection() method, which
returns a newly-created connection object.
- f __del__ ...
- f __init__ ...
- f accumulateSelect ... - Apply an accumulate function(s) (SUM, COUNT, MIN, AVG, MAX, etc...) to the select object.
- f clearTable ...
- f connectionFromURI ...
- f createBinary ... - Create a binary object wrapper for the given database.
- f createColumn ...
- f createColumns ...
- f createEmptyDatabase ... - Create an empty database.
- f createIndexSQL ...
- f createReferenceConstraint ...
- f createReferenceConstraints ...
- f createSQL ...
- f createTable ...
- f createTableSQL ...
- f dropTable ...
- f getConnection ...
- f isSupported ...
- f iterSelect ...
- f printDebug ...
- f query ...
- f queryAll ...
- f queryForSelect ...
- f queryInsertID ...
- f releaseConnection ...
- f soClassAdded ... - This is called for each new class; we use this opportunity to create an instance method that is bound to the class and this connection.
- f sqlrepr ...
- f transaction ...
- f uri ...
-
C
DBConnection
...
- f isSupported ...
- f soClassAdded ... - This is called for each new class; we use this opportunity to create an instance method that is bound to the class and this connection.
- f uri ...
- C Iteration ...
- C LogWriter ...
- C Transaction ...
- f connectionForURI ...
- f dbConnectionForScheme ...
- f makeDebugWriter ...
- f registerConnection ...
- f registerConnectionInstance ...
- m dberrors ... - dberrors: database exception classes for SQLObject.
-
m
declarative
...
- Declarative objects.
-
C
Declarative
...
- a declarative_count ...
- a singleton ...
- f __call__ ...
- f __classinit__ ...
- f __init__ ...
- f __instanceinit__ ...
-
C
DeclarativeMeta
...
- a __bases__ ...
- a __basicsize__ ...
- a __dictoffset__ ...
- a __flags__ ...
- a __itemsize__ ...
- a __mro__ ...
- a __name__ ...
- a __weakrefoffset__ ...
- C classinstancemethod ... - Acts like a class method when called from a class, like an instance method when called by an instance. The method should take two arguments, 'self' and 'cls'; one of these will be None depending on how the method was called.
-
C
Declarative
...
-
m
events
...
-
C
AddColumnSignal
...
- Called when a column is added to a class, with arguments (cls,
connection, column_name, column_definition, changeSchema,
post_funcs). This is called after the column has been added,
and is called for each column after class creation.
-
C
ClassCreateSignal
...
- Signal raised after class creation. The sender is the superclass
(in case of multiple superclasses, the first superclass). The
arguments are (new_class_name, bases, new_attrs, post_funcs,
early_funcs). new_attrs is a dictionary and may be modified
(but new_class_name and bases are immutable).
post_funcs is an initially-empty list that can have callbacks
appended to it.
-
C
CreateTableSignal
...
- Called when a table is created. If ifNotExists==True and the
table exists, this event is not called.
-
C
DeleteColumnSignal
...
- Called when a column is removed from a class, with the arguments
(cls, connection, column_name, so_column_obj, post_funcs).
Like AddColumnSignal this is called after the action has been
performed, and is called for subclassing (when a column is
implicitly removed by setting it to None).
-
C
DropTableSignal
...
- Called when a table is dropped. If ifExists==True and the
table doesn't exist, this event is not called.
-
C
RowCreateSignal
...
- Called before an instance is created, with the class as the
sender. Called with the arguments (kwargs, post_funcs).
There may be a connection argument. kwargs``may be usefully
modified. ``post_funcs is a list of callbacks, intended to have
functions appended to it, and are called with the arguments
(new_instance).
-
C
RowCreatedSignal
...
- Called after an instance is created, with the class as the
sender. Called with the arguments (kwargs, post_funcs).
There may be a connection argument. kwargs``may be usefully
modified. ``post_funcs is a list of callbacks, intended to have
functions appended to it, and are called with the arguments
(new_instance).
-
C
RowDestroySignal
...
- Called before an instance is deleted. Sender is the instance's
class. Arguments are (instance, post_funcs).
-
C
RowUpdateSignal
...
- Called when an instance is updated through a call to .set()
(or a column attribute assignment). The arguments are
(instance, kwargs). kwargs can be modified. This is run
before the instance is updated; if you want to look at the
current values, simply look at instance.
-
C
Signal
...
- Base event for all SQLObject events.
- f listen ... - Listen for the given signal on the SQLObject subclass soClass, calling receiver() when send(soClass, signal, ...) is called.
-
C
AddColumnSignal
...
- Called when a column is added to a class, with arguments (cls,
connection, column_name, column_definition, changeSchema,
post_funcs). This is called after the column has been added,
and is called for each column after class creation.
-
m
firebird
...
- f builder ...
- f isSupported ...
-
m
firebirdconnection
...
-
C
FirebirdConnection
...
- a dbName ...
- a schemes ...
- a supportTransactions ...
- f __init__ ...
- f addColumn ...
- f columnsFromSchema ... - Look at the given table and create Col instances (or subclasses of Col) for the fields it finds in that table.
- f connectionFromURI ...
- f createColumn ...
- f createIDColumn ...
- f createIndexSQL ...
- f createReferenceConstraint ...
- f createTable ...
- f delColumn ...
- f dropTable ...<
-
C
FirebirdConnection
...