extended intro example
This commit is contained in:
parent
e6844e50bd
commit
b002f454ca
@ -20,9 +20,13 @@ In short, dataset combines the straightforwardness of NoSQL interfaces with the
|
|||||||
|
|
||||||
import dataset
|
import dataset
|
||||||
|
|
||||||
db = dataset.connect('sqlite:///database.db')
|
db = dataset.connect('sqlite:///:memory:')
|
||||||
db['sometable'].insert(dict(name='John Doe', age=37))
|
|
||||||
db['sometable'].insert(dict(name='Jane Doe', age=34, gender='female'))
|
table = db['sometable']
|
||||||
|
table.insert(dict(name='John Doe', age=37))
|
||||||
|
table.insert(dict(name='Jane Doe', age=34, gender='female'))
|
||||||
|
|
||||||
|
john = table.find_one(name='John Doe')
|
||||||
|
|
||||||
|
|
||||||
Here is `similar code, without dataset <https://gist.github.com/gka/5296492>`_.
|
Here is `similar code, without dataset <https://gist.github.com/gka/5296492>`_.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user