[docs] sqlalchemy basics and api ref.
This commit is contained in:
@ -16,19 +16,57 @@ To install the extension, use the `sqlalchemy` extra:
|
|||||||
|
|
||||||
.. note:: You can install more than one extra at a time separating the names with commas.
|
.. note:: You can install more than one extra at a time separating the names with commas.
|
||||||
|
|
||||||
Overview
|
Overview and examples
|
||||||
::::::::
|
:::::::::::::::::::::
|
||||||
|
|
||||||
There are two main tools provided by this extension. One reader, one writer.
|
There are two main tools provided by this extension. One reader, one writer.
|
||||||
|
|
||||||
|
Let's select some data:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import bonobo
|
||||||
|
import bonobo_sqlalchemy
|
||||||
|
|
||||||
|
def get_graph():
|
||||||
|
graph = bonobo.Graph()
|
||||||
|
graph.add_chain(
|
||||||
|
bonobo_sqlalchemy.Select('SELECT * FROM example', limit=100),
|
||||||
|
bonobo.PrettyPrinter(),
|
||||||
|
)
|
||||||
|
|
||||||
|
And let's insert some data:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import bonobo
|
||||||
|
import bonobo_sqlalchemy
|
||||||
|
|
||||||
|
|
||||||
|
def get_graph(**options):
|
||||||
|
graph = bonobo.Graph()
|
||||||
|
graph.add_chain(
|
||||||
|
...,
|
||||||
|
bonobo_sqlalchemy.InsertOrUpdate('example')
|
||||||
|
)
|
||||||
|
|
||||||
|
return graph
|
||||||
|
|
||||||
Details
|
|
||||||
:::::::
|
|
||||||
|
|
||||||
Reference
|
Reference
|
||||||
:::::::::
|
:::::::::
|
||||||
|
|
||||||
|
.. module:: bonobo_sqlalchemy
|
||||||
|
|
||||||
|
Select
|
||||||
|
------
|
||||||
|
|
||||||
|
.. autoclass:: Select
|
||||||
|
|
||||||
|
InsertOrUpdate
|
||||||
|
--------------
|
||||||
|
|
||||||
|
.. autoclass:: InsertOrUpdate
|
||||||
|
|
||||||
Source code
|
Source code
|
||||||
:::::::::::
|
:::::::::::
|
||||||
|
|||||||
Reference in New Issue
Block a user