probcomp/bayeslite

BQL does not include IN expression

Open

#263 opened on Oct 18, 2015

View on GitHub
 (5 comments) (0 reactions) (1 assignee)Python (915 stars) (63 forks)batch import
help wantedk min/hr

Description

This command is not supported

bdb.execute('select * from satellites where Purpose IN ("Communications", "Reconnaissance")')
  File "build/bdist.macosx-10.9-x86_64/egg/bayeslite/bayesdb.py", line 149, in execute
  File "build/bdist.macosx-10.9-x86_64/egg/bayeslite/parse.py", line 104, in <genexpr>
  File "build/bdist.macosx-10.9-x86_64/egg/bayeslite/parse.py", line 91, in <genexpr>
  File "build/bdist.macosx-10.9-x86_64/egg/bayeslite/parse.py", line 77, in parse_bql_phrases
bayeslite.parse.BQLParseError: Parse error: syntax error near Communications

But with sql_execute it is:

bdb.sql_execute('select * from satellites where Purpose IN ("Communications", "Reconnaissance")

In the longer-tmer, is the intention for SQL to co-exist alongside BQL with a separate entry point? Is there a plan for extending BQL to implement a superset of SQL syntax?

In the short-term, are we intending for users to use sql_execute() as well as execute()? Is there a list of SQL features that are not currently supported by BQL somewhere?

Contributor guide