mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Documentation for table.pks, closes #116
This commit is contained in:
parent
4d9a320436
commit
fbeb61e49c
1 changed files with 5 additions and 0 deletions
|
|
@ -1020,6 +1020,11 @@ The ``.columns_dict`` property returns a dictionary version of this with just th
|
|||
>>> db["PlantType"].columns_dict
|
||||
{'id': <class 'int'>, 'value': <class 'str'>}
|
||||
|
||||
The ``.pks`` property returns a list of strings naming the primary key columns for the table::
|
||||
|
||||
>>> db["PlantType"].pks
|
||||
['id']
|
||||
|
||||
The ``.foreign_keys`` property shows if the table has any foreign key relationships. It is not available on views.
|
||||
|
||||
::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue