Add docs for backend

This commit is contained in:
Sylvain Bellemare 2016-12-05 15:25:27 +01:00
parent 67af0deaae
commit d43e77ce4a
5 changed files with 80 additions and 1 deletions

View File

@ -1,2 +1,4 @@
"""Backend interfaces ..."""
# Include the backend interfaces
from bigchaindb.backend import changefeed, schema, query # noqa

View File

@ -1,2 +1,4 @@
# Register the single dispatched modules on import
"""RethinkDB backend components ..."""
# Register the single dispatched modules on import.
from bigchaindb.backend.rethinkdb import changefeed, schema, query # noqa

View File

@ -35,6 +35,10 @@ class RethinkDBConnection(Connection):
Args:
query: the RethinkDB query.
Raises:
:exc:`rethinkdb.ReqlDriverError`: After
:attr:`~.RethinkDBConnection.max_tries`.
"""
if self.conn is None:
@ -49,6 +53,15 @@ class RethinkDBConnection(Connection):
self.connect()
def connect(self):
"""Sets a connection to RethinkDB.
The connection is available via :attr:`~.RethinkDBConnection.conn`.
Raises:
:exc:`rethinkdb.ReqlDriverError`: After
:attr:`~.RethinkDBConnection.max_tries`.
"""
for i in range(self.max_tries):
try:
self.conn = r.connect(host=self.host, port=self.port,

View File

@ -0,0 +1,61 @@
###############################################
:mod:`bigchaindb.backend` -- Backend Interfaces
###############################################
.. automodule:: bigchaindb.backend
:special-members: __init__
Generic Backend
===============
:mod:`bigchaindb.backend.connection` -- Connection
--------------------------------------------------
.. automodule:: bigchaindb.backend.connection
:mod:`bigchaindb.backend.schema` -- Schema
------------------------------------------
.. automodule:: bigchaindb.backend.schema
:mod:`bigchaindb.backend.query` -- Query
----------------------------------------
.. automodule:: bigchaindb.backend.query
:mod:`bigchaindb.backend.changefeed` -- Changefeed
--------------------------------------------------
.. automodule:: bigchaindb.backend.changefeed
:mod:`bigchaindb.backend.utils`
-------------------------------
.. automodule:: bigchaindb.backend.utils
:mod:`bigchaindb.backend.rethinkdb` -- RethinkDB Backend
========================================================
.. automodule:: bigchaindb.backend.rethinkdb
:special-members: __init__
:mod:`bigchaindb.backend.rethinkdb.connection`
----------------------------------------------
.. automodule:: bigchaindb.backend.rethinkdb.connection
:special-members: __init__
:mod:`bigchaindb.backend.rethinkdb.schema`
------------------------------------------
.. automodule:: bigchaindb.backend.rethinkdb.schema
:mod:`bigchaindb.backend.rethinkdb.query`
-----------------------------------------
.. automodule:: bigchaindb.backend.rethinkdb.query
:mod:`bigchaindb.backend.rethinkdb.changefeed`
----------------------------------------------
.. automodule:: bigchaindb.backend.rethinkdb.changefeed
MongoDB Backend
===============
Stay tuned!

View File

@ -15,6 +15,7 @@ Appendices
the-Bigchain-class
consensus
pipelines
backend
aws-setup
firewall-notes
ntp-notes