mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
generated_columns table in fixtures.py, closes #1119
This commit is contained in:
parent
461670a0b8
commit
17cbbb1f7f
6 changed files with 93 additions and 65 deletions
|
|
@ -19,7 +19,7 @@ import urllib
|
|||
import numbers
|
||||
import yaml
|
||||
from .shutil_backport import copytree
|
||||
from .sqlite import sqlite3, sqlite_version
|
||||
from .sqlite import sqlite3, sqlite_version, supports_table_xinfo
|
||||
from ..plugins import pm
|
||||
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ def table_columns(conn, table):
|
|||
|
||||
|
||||
def table_column_details(conn, table):
|
||||
if sqlite_version() >= (3, 26, 0):
|
||||
if supports_table_xinfo():
|
||||
# table_xinfo was added in 3.26.0
|
||||
return [
|
||||
Column(*r)
|
||||
|
|
|
|||
|
|
@ -26,3 +26,11 @@ def _sqlite_version():
|
|||
.split("."),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def supports_table_xinfo():
|
||||
return sqlite_version() >= (3, 26, 0)
|
||||
|
||||
|
||||
def supports_generated_columns():
|
||||
return sqlite_version() >= (3, 31, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue