From b002f454ca2bd7e52a6af8b4c352e6a58baefcc9 Mon Sep 17 00:00:00 2001 From: Gregor Aisch Date: Wed, 3 Apr 2013 14:28:42 +0200 Subject: [PATCH] extended intro example --- docs/index.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index c515fa0..cf620b9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,9 +20,13 @@ In short, dataset combines the straightforwardness of NoSQL interfaces with the import dataset - db = dataset.connect('sqlite:///database.db') - db['sometable'].insert(dict(name='John Doe', age=37)) - db['sometable'].insert(dict(name='Jane Doe', age=34, gender='female')) + db = dataset.connect('sqlite:///:memory:') + + 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 `_.