mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
table.use_rowid introspection property, closes #285
This commit is contained in:
parent
dc94f4bb8c
commit
5b257949d9
3 changed files with 25 additions and 0 deletions
|
|
@ -809,6 +809,10 @@ class Table(Queryable):
|
|||
names = ["rowid"]
|
||||
return names
|
||||
|
||||
@property
|
||||
def use_rowid(self):
|
||||
return not any(column for column in self.columns if column.is_pk)
|
||||
|
||||
def get(self, pk_values):
|
||||
if not isinstance(pk_values, (list, tuple)):
|
||||
pk_values = [pk_values]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue