mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-10 18:44:20 +02:00
Ability to introspect and run queries against views (#55)
* db.views_names() method and and db.views property * Separate View and Table classes, both subclassing new Queryable class * view.drop() method * Updated documentation
This commit is contained in:
parent
0e7b461eb3
commit
9faa982226
4 changed files with 142 additions and 56 deletions
|
|
@ -782,3 +782,10 @@ def test_drop(fresh_db):
|
|||
assert ["t"] == fresh_db.table_names()
|
||||
assert None is fresh_db["t"].drop()
|
||||
assert [] == fresh_db.table_names()
|
||||
|
||||
|
||||
def test_drop_view(fresh_db):
|
||||
fresh_db.create_view("foo_view", "select 1")
|
||||
assert ["foo_view"] == fresh_db.view_names()
|
||||
assert None is fresh_db["foo_view"].drop()
|
||||
assert [] == fresh_db.view_names()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue