Closed eberkers closed 4 years ago
Use sql_tokens(Tokens, `CREATE VIEW foo AS SELECT bar FROM qux`, []),
, i.e., backquotes to get a list of character codes where "xyz" creates a SWI-Prolog string object.
Thanks Jan, works like a charm now!
/Erwin
The example given in sql_parser.pl of calling the parser with tokenizing first:
sql_tokens(Tokens, "CREATE VIEW foo AS SELECT bar FROM qux", []), sql_parse(view_definition(Definition, Types), TrailingComments, [], Tokens).
fails in sql_tokenizer at the predicate sql_token_1 by returning false.
I ran the tokenizer standalone through yap (v6.2.2), where it runs fine, returning true and yielding: tokens = ['CREATE VIEW foo AS SELECT bar FROM qux'].
Is there a compatibility issue with SWI 8 (using 8.0.3) for this CQL library?
Any help greatly appreciated!