mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
d8851e0011
commit
97331f3435
5 changed files with 31 additions and 11 deletions
|
|
@ -536,6 +536,15 @@ def detect_fts_sql(table):
|
|||
'''.format(table=table)
|
||||
|
||||
|
||||
def table_columns(conn, table):
|
||||
return [
|
||||
r[1]
|
||||
for r in conn.execute(
|
||||
"PRAGMA table_info({});".format(escape_sqlite(table))
|
||||
).fetchall()
|
||||
]
|
||||
|
||||
|
||||
class Filter:
|
||||
def __init__(self, key, display, sql_template, human_template, format='{}', numeric=False, no_argument=False):
|
||||
self.key = key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue