Add missing documentation for Pool
review330001
This commit is contained in:
@@ -12,3 +12,4 @@ API Reference
|
||||
pyson
|
||||
transaction
|
||||
tools/singleton
|
||||
pool
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
.. _ref-pool:
|
||||
.. module:: trytond.pool
|
||||
|
||||
====
|
||||
Pool
|
||||
====
|
||||
|
||||
.. class:: Pool([database_name])
|
||||
|
||||
The Pool store the instances of models, wizards and reports per database.
|
||||
|
||||
Static methods:
|
||||
|
||||
.. staticmethod:: Pool.register(klass[, type])
|
||||
|
||||
Register a class of type (default: `model`).
|
||||
|
||||
Class methods:
|
||||
|
||||
.. classmethod:: Pool.start()
|
||||
|
||||
Start the pool by registering all Tryton modules found.
|
||||
|
||||
.. classmethod:: Pool.stop(database_name)
|
||||
|
||||
Stop the pool by removing instances for the database.
|
||||
|
||||
.. classmethod:: Pool.database_list()
|
||||
|
||||
List all started database.
|
||||
|
||||
Instance methods:
|
||||
|
||||
.. method:: Pool.get(name[, type])
|
||||
|
||||
Return the named instance of type from the pool.
|
||||
|
||||
.. method:: Pool.object_name_list([type])
|
||||
|
||||
Return the list of instances names.
|
||||
|
||||
.. method:: Pool.iterobject([type])
|
||||
|
||||
Return an interator over instances names.
|
||||
@@ -37,7 +37,7 @@ fields::
|
||||
|
||||
Instantiating the class registers the model class in the framework. Later the
|
||||
class will be instantiated once per database and stored in the
|
||||
:ref:`Pool <topics-pool>`. Model instances are essentially accessors to
|
||||
:ref:`Pool <ref-pool>`. Model instances are essentially accessors to
|
||||
records.
|
||||
|
||||
Model attributes define meta-information of the model. They are class
|
||||
|
||||
Reference in New Issue
Block a user