diff --git a/README.md b/README.md index 2828ef5..1022772 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,19 @@ Another example, updating data in a datastore, might look like this: upsert(engine, table, item, ['key1', 'key2']) +Here's the same example, but using the object-oriented API: + + import sqlaload + + db = sqlaload.create('sqlite:///things.db') + table = db.get_table('data') + + for item in magic_data_source_that_produces_entries(): + assert 'key1' in item + assert 'key2' in item + table.upsert(item, ['key1', 'key2']) + + Functions --------- @@ -74,6 +87,7 @@ The library currently exposes the following functions: * ``delete(engine, table, **kw)`` will remove records from a table. ``**kw`` is the same as in ``find`` and can be used to limit the set of records to be removed. + Feedback --------