Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor Out the Duplicate Lines #297

Open
yilinxia opened this issue Oct 20, 2023 · 0 comments
Open

Factor Out the Duplicate Lines #297

yilinxia opened this issue Oct 20, 2023 · 0 comments

Comments

@yilinxia
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant