X-Git-Url: https://git.jsancho.org/?p=datasette-pytables.git;a=blobdiff_plain;f=datasette_pytables%2F__init__.py;h=dc6823472e8abdf6190009648a83d8a6f79122f6;hp=8516315cd49bbf4bf4507590d3e47e5a4878a1b1;hb=284c887d09327e23c6209d63d13b50b98b29ed33;hpb=d9e3d4c6f66634a32236b238ce04cefff17f79b1 diff --git a/datasette_pytables/__init__.py b/datasette_pytables/__init__.py index 8516315..dc68234 100644 --- a/datasette_pytables/__init__.py +++ b/datasette_pytables/__init__.py @@ -1,5 +1,7 @@ import tables +_connector_type = 'pytables' + def inspect(path): "Open file and return tables info" h5tables = {} @@ -23,4 +25,12 @@ def inspect(path): } h5file.close() - return h5tables, views + 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, []