From 6cc3c0fa57c1155e9c76bf0c1b4ebfcc65772e12 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Mon, 28 May 2018 12:38:36 +0200 Subject: [PATCH] Execute return always rows, truncated, description tuple --- datasette_pytables/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/datasette_pytables/__init__.py b/datasette_pytables/__init__.py index 751e260..b3d5b9a 100644 --- a/datasette_pytables/__init__.py +++ b/datasette_pytables/__init__.py @@ -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" -- 2.39.5