logica icon indicating copy to clipboard operation
logica copied to clipboard

Engineers example broken under sqlite

Open emiruz opened this issue 3 years ago • 1 comments

Code:

%%logica Engineers
@Engine("sqlite");
Employee(name: "Alice", role: "Product Manager");
Employee(name: "Bob", role: "Engineer");
Employee(name: "Caroline", role: "Engineer");
Employee(name: "David", role: "Data Scientist");
Employee(name: "Eve", role: "Data Scientist");
Engineers(..r) :- Employee(..r), r.role == "Engineer";

Error:

OperationalError: no such column: Employee

I know that at this stage meaningful error messages may be a tall order but if it could perhaps print out the SQL statement it should be fairly easy to see what went wrong.

Also, sincerely thank you for this project: it is inspired.

emiruz avatar Dec 17 '22 08:12 emiruz

Hi @emiruz thank your for the report and supportive feedback.

I have added a warning about incompatibility of the syntax with SQLite.

I'll also fix the executor to show the query in case of an error like this.

EvgSkv avatar Dec 19 '22 21:12 EvgSkv