PyTables Connection class
authorJavier Sancho <jsf@jsancho.org>
Tue, 8 May 2018 10:58:12 +0000 (12:58 +0200)
committerJavier Sancho <jsf@jsancho.org>
Tue, 8 May 2018 10:58:12 +0000 (12:58 +0200)
datasette_pytables/__init__.py

index 9b20618..dc68234 100644 (file)
@@ -26,3 +26,11 @@ def inspect(path):
 
     h5file.close()
     return h5tables, views, _connector_type
+
+class Connection:
+    def __init__(self, path):
+        self.path = path
+        self.h5file = tables.open_file(path)
+
+    def execute(self, sql, params):
+        return [], False, []