Execute return always rows, truncated, description tuple
[datasette-pytables.git] / datasette_pytables / __init__.py
index 751e2605e7d216a82c610d9fc3b7dc4df376b617..b3d5b9a7d0ab3ec31eacf6bfe410169130fe094a 100644 (file)
@@ -80,7 +80,9 @@ class Connection:
         parsed_sql = _parse_sql(sql, params)
 
         if parsed_sql['from'] == 'sqlite_master':
-            return self._execute_datasette_query(sql, params)
+            rows = self._execute_datasette_query(sql, params)
+            description = (('value',))
+            return rows, truncated, description
 
         table = self.h5file.get_node(parsed_sql['from'])
         table_rows = []
@@ -216,10 +218,7 @@ class Connection:
                 description.append((field,))
 
         # Return the rows
-        if truncate:
-            return rows, truncated, tuple(description)
-        else:
-            return rows
+        return rows, truncated, tuple(description)
 
     def _execute_datasette_query(self, sql, params):
         "Datasette special queries for getting tables info"