truncated = False
description = ()
+ # Some Datasette queries uses glob operand, not supported by Pytables
+ if ' glob ' in sql:
+ return results, truncated, description
+
parsed_sql = parse_sql(sql, params)
while isinstance(parsed_sql['from'], dict):
# Execute query
if query:
- if not ' glob ' in query:
- table_rows = table.where(query, params, start, end)
+ table_rows = table.where(query, params, start, end)
elif orderby:
table_rows = table.itersorted(orderby, start=start, stop=end)
else:
long_description=get_long_description(),
long_description_content_type='text/markdown',
author='Javier Sancho',
+ author_email='jsf@jsancho.org',
url='https://github.com/jsancho-gpl/datasette-pytables',
license='Apache License, Version 2.0',
packages=['datasette_pytables'],
entry_points={
'datasette.connectors': [
- 'pytables = datasette_pytables'
+ 'pytables = datasette_pytables:PyTablesConnector'
],
},
install_requires=[
def test_array_row(app_client):
response = app_client.get('/test_tables/%group1%array2/1050')
assert response.status == 200
+
+def test_table_exact_query(app_client):
+ response = app_client.get('/test_tables/%group2%table2/?idnumber__exact=0')
+ assert response.status == 200