mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-09 18:14:09 +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
|
|
@ -237,3 +237,11 @@ def test_virtual_table_using(sql, expected_name, expected_using):
|
|||
db = Database(memory=True)
|
||||
db.execute(sql)
|
||||
assert db[expected_name].virtual_table_using == expected_using
|
||||
|
||||
|
||||
def test_use_rowid():
|
||||
db = Database(memory=True)
|
||||
db["rowid_table"].insert({"name": "Cleo"})
|
||||
db["regular_table"].insert({"id": 1, "name": "Cleo"}, pk="id")
|
||||
assert db["rowid_table"].use_rowid
|
||||
assert not db["regular_table"].use_rowid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue