mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
table.exists() now a documented method, closes #83
This commit is contained in:
parent
4cbade2564
commit
0eda638d81
3 changed files with 30 additions and 20 deletions
|
|
@ -920,6 +920,13 @@ If you have loaded an existing table or view, you can use introspection to find
|
|||
>>> db["PlantType"]
|
||||
<Table PlantType (id, value)>
|
||||
|
||||
The ``.exists()`` method can be used to find out if a table exists or not::
|
||||
|
||||
>>> db["PlantType"].exists()
|
||||
True
|
||||
>>> db["PlantType2"].exists()
|
||||
False
|
||||
|
||||
The ``.count`` property shows the current number of rows (``select count(*) from table``)::
|
||||
|
||||
>>> db["PlantType"].count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue