News for hackers. Stuff that matters.
Re:Logica – Declarative logic programming language for data by evgskv on Monday November 18, 2024 @12:48PM (#42174870)
To connect to a database file use:

  @AttachDatabase("db_prefix", "your_file.db");
  # Then you can query from it:
  Q(..r) :- db_prefix.YourTable(..r);
Re:Logica – Declarative logic programming language for data by foobarqux on Monday November 18, 2024 @03:35PM (#42176667)
Thank you. You can't do Q(..r) in sqlite right? That's what I read in the tutorial.
Re:Logica – Declarative logic programming language for data by evgskv on Monday November 18, 2024 @07:50PM (#42179022)
Ah, yes, you're right! Please do:

  # ...
  Q(your_column) :- example_db.YourTable(your_column:);
You can query multiple columns of course. Feel free to start threads in Discussions of the repo with whatever questions you have!