X-Git-Url: https://git.jsancho.org/?p=datasette-connectors.git;a=blobdiff_plain;f=datasette_connectors%2Fcursor.py;h=02585a367e1957d8f55aa1e4c634a6b25392bf9d;hp=bf3a1b1dbf177ec48f33ff216365ccca17db6ed1;hb=522f46ef03efd028cb4344a30b0bfb80d00f9643;hpb=58720a43974da688021531ed107dc8693b62ca39 diff --git a/datasette_connectors/cursor.py b/datasette_connectors/cursor.py index bf3a1b1..02585a3 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\(\[?\"?([\d\w\/]*)\"?\]?\)', 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)