--load-extension= for many more commands, closes #137

Also added --load-extension=spatialite shortcut, closes #136
This commit is contained in:
Simon Willison 2020-10-16 12:14:22 -07:00
commit 21ff60e3b1
5 changed files with 148 additions and 32 deletions

View file

@ -289,6 +289,8 @@ class Database:
# any extracts will be treated as integer columns with a foreign key
extracts = resolve_extracts(extracts)
for extract_column, extract_table in extracts.items():
if isinstance(extract_column, tuple):
assert False
# Ensure other table exists
if not self[extract_table].exists():
self.create_table(extract_table, {"id": int, "value": str}, pk="id")