logica
logica copied to clipboard
Factor Out the Duplicate Lines
Hi @EvgSkv ,
When working with Logica scripts across multiple cells, I've identified a potential enhancement (unless it's already implemented).
For comparison, in Jupyter, when executing an SQL query, I can simply use:
%%sql sqlite:///my_database.db
However, with Logica, transferring records from tables to predicates requires more steps:
%%logica Q1_Result
@Engine("sqlite");
@AttachDatabase("mydata", "my_database.db");
Emp(..r) :- mydata.Employee(..r);
Dep(..r) :- mydata.Department(..r);
Each time we execute a query in a different cell, these duplicates lines have to be re-written. Perhaps we can adopt a similar approach as with SQL.