Skip to content

Commit 0e16065

Browse files
committed
update documentation
1 parent a4b6d6b commit 0e16065

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/source/sqlalchemy.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,20 @@ Let's verify what do we have in the database:
175175
'[["id", "title", "body", "pub_date"], [1, "Title A", "formal", "2015-01-20T23:28:29"], [2, "Title B", "informal", "2015-01-20T23:28:30"]]'
176176

177177

178+
Skipping existing record
179+
******************************
180+
181+
When you import data into a database that has data already, you can skip existing record if
182+
:class:`pyexcel_io.PyexcelSQLSkipRowException` is raised. Example can be found here in `test
183+
code <https://github.com/chfw/pyexcel-io/blob/master/tests/test_sql_book.py#L125>`_.
184+
185+
Update existing record
186+
***************************
187+
188+
When you import data into a database that has data already, you can update an existing record
189+
if you can query it from the database and set the data yourself and most importantly return it.
190+
You can find an example in `test skipping row <https://github.com/chfw/pyexcel-io/blob/master/tests/test_sql_book.py#L162>`_
191+
178192
Read data from multiple tables
179193
----------------------------------------------------------------------------------
180194

0 commit comments

Comments
 (0)