web/wdoc/advanced_usage_en.rst
author |
Vladimir Popescu <vladimir.popescu@logilab.fr> |
|
Tue, 02 Apr 2013 12:11:44 +0200 |
changeset 8832 |
26cdfc6dd6f8 |
parent 0 |
b97547f5f1fa
|
permissions |
-rw-r--r-- |
[dataimport] Uniformize the API across the different stores.
This is achieved by modifying the ``relate`` method
so that it takes an extra ``**kwargs``.
More specifically, ``SQLGenObjectStore``'s ``relate`` method
needs the the type of the subject entity which is passed through
``**kwargs`` as the ``subjtype`` keyword argument.
Actually, it is the ``add_relation`` method of the
``SQLGenObjectStore`` who needs this argument. However, as
this method is not called directly (but via the ``relate``
method), the ``subjtype`` argument is passed to
``add_relation`` via ``relate``.
The other stores' ``relate`` methods do not need this
extra argument, hence for the other stores ``**kwargs``
is empty.
In this manner, the API is unified across the different stores.
0
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
1 |
.. winclude:: advanced_usage_schema |
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
2 |
|