Documentation for stdnet 0.8.2. For development docs, go here.
get a BackendDataServer.
Similar to getdb(), it creates a CacheServer.
Generic interface for a backend database. It should not be initialised directly, instead, the getdb() function should be used.
Parameters: |
|
---|
ATTRIBUTES
name of database
The connection string for this backend. By calling getdb() with this value, one obtain a BackendDataServer connected to the same database as this instance.
The client handler for the backend database.
The BackendQuery class for this backend.
The default model Manager for this backend. If not provided, the stdnet.odm.Manager is used. Default None.
Calculate the key to access model data.
Parameters: |
|
---|---|
Return type: | a native string |
Disconnect the connection.
Generator of stdnet.odm.StdModel instances with data from database.
Parameters: |
|
---|
Create a backend stdnet.odm.Structure handler.
Parameters: |
|
---|
Returns an asynchronous BackendDataServer with same connection_string. Asynchronous hadlers must be implemented by users.
Invoked when registering a model with a backend. This is a chance to perform model specific operation in the server. For example, mongo db ensure indices are created.
Remove temporary keys for a model
Ping the server
Return a list of database keys used by instance obj
Return a proper python value for the auto id.
Callback during initialization. Implementation should override this function for customizing their handling of connection parameters. It must return a instance of the backend handler.
Execute a stdnet.odm.Session in the backend server.
Return a list of database keys used by model model
Return a CacheServer handle for this backend.
Flush the database or drop all instances of a model/collection
Publish a message to a channel. The backend must support pub/sub paradigm. For information check the Publish/Subscribe application.
Create a Subscriber able to subscribe to channels. For information check the Publish/Subscribe application.
Interface for stdnet.odm.Structure backends.
The stdnet.odm.Structure which this backend represents.
The client of the BackendDataServer
Asynchronous binding for stdnet.
Asynchronous query interface class which implements the database queries specified by stdnet.odm.Query.
The stdnet.odm.QueryElement to process.
flag indicating if the query has been executed in the backend server
Cached results.
This function does the actual fetching of data from the backend server matching this Query. This method is usually not called directly, instead use the all() method or alternatively slice the query in the same way you can slice a list or iterate over the query.