From fbeb61e49c940ee96d1423c76300ba3ce2cadf80 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 23 Jun 2020 14:03:13 -0700 Subject: [PATCH] Documentation for table.pks, closes #116 --- docs/python-api.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/python-api.rst b/docs/python-api.rst index ded39ce..c2c75c7 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -1020,6 +1020,11 @@ The ``.columns_dict`` property returns a dictionary version of this with just th >>> db["PlantType"].columns_dict {'id': , 'value': } +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. ::