X-Git-Url: https://git.jsancho.org/?p=datasette-connectors.git;a=blobdiff_plain;f=datasette_connectors%2Fcursor.py;h=f3898cc23f4d97eca9eba0e12a9e7b1ea95fe240;hp=166c84eb9e5f7a7c72e83166149ff89a2707df91;hb=afd677b9fd094e0ab7345843ddfb337378151b9e;hpb=716ff0016ebb03dbef77fd4a9c6b2f8f9781cb58 diff --git a/datasette_connectors/cursor.py b/datasette_connectors/cursor.py index 166c84e..f3898cc 100644 --- a/datasette_connectors/cursor.py +++ b/datasette_connectors/cursor.py @@ -54,7 +54,7 @@ class Cursor: match = re.search(r'select count\(\*\) from (.*)', sql) results = [{'count(*)': self.connector.table_count(match.group(1))}] elif sql.startswith("PRAGMA table_info("): - match = re.search(r'PRAGMA table_info\((.*)\)', sql) + match = re.search(r'PRAGMA table_info\(\[?\"?([\d\w\/]*)\"?\]?\)', sql) results = self.connector.table_info(match.group(1)) elif sql.startswith("select name from sqlite_master where rootpage = 0 and ( sql like \'%VIRTUAL TABLE%USING FTS%content="): match = re.search(r'select name from sqlite_master where rootpage = 0 and \( sql like \'%VIRTUAL TABLE%USING FTS%content="(.*)"', sql)