Documentation for table.pks, closes #116

This commit is contained in:
Simon Willison 2020-06-23 14:03:13 -07:00 committed by GitHub
commit fbeb61e49c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
::