]> git.jsancho.org Git - datasette-connectors.git/commitdiff
datasette==0.51.1
authorJavier Sancho <jsf@jsancho.org>
Sat, 21 Nov 2020 19:15:17 +0000 (20:15 +0100)
committerJavier Sancho <jsf@jsancho.org>
Sat, 21 Nov 2020 19:15:17 +0000 (20:15 +0100)
datasette_connectors/cursor.py
setup.py
tests/dummy.py

index bf3a1b1dbf177ec48f33ff216365ccca17db6ed1..02585a367e1957d8f55aa1e4c634a6b25392bf9d 100644 (file)
@@ -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)
index 8d52909194b98ea299471d051a9ad894e415d524..32bee3f62282120ce0710ab9131ccea2b5f38cf0 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ setup(
     license='Apache License, Version 2.0',
     packages=['datasette_connectors'],
     install_requires=[
-        'datasette==0.48',
+        'datasette==0.51.1',
     ],
     tests_require=[
         'pytest',
index 04c6686ad459a81eba587adbed51c984c526eccb..873894fcce6a4e116047ef778d94c0b5b30fa5ab 100644 (file)
@@ -22,19 +22,28 @@ class DummyConnector(dc.Connector):
     def table_info(self, table_name):
         return [
             {
-                'idx': 0,
+                'cid': 0,
                 'name': 'c1',
-                'primary_key': False,
+                'type': 'integer',
+                'notnull': False,
+                'default_value': None,
+                'is_pk': False,
             },
             {
-                'idx': 0,
+                'cid': 1,
                 'name': 'c2',
-                'primary_key': False,
+                'type': 'integer',
+                'notnull': False,
+                'default_value': None,
+                'is_pk': False,
             },
             {
-                'idx': 0,
+                'cid': 2,
                 'name': 'c3',
-                'primary_key': False,
+                'type': 'integer',
+                'notnull': False,
+                'default_value': None,
+                'is_pk': False,
             },
         ]