News for hackers. Stuff that matters.
Re:Logica – Declarative logic programming language for data by evgskv on Monday November 18, 2024 @12:27AM (#42169938)
Yeah, we need better tutorials.

To use SQLite use @Engine("sqlite") imperative. And you can then connect to you database file with @AttachDatabase imperative.

For example if you have example.db file with Fruit table which has col0 column, then you can count fruits with program:

@Engine("sqlite"); @AttachDatabase("example", "example.db");

CountFruit(fruit) += 1 :- Fruit(fruit);

Then run CountFruit predicate.

There are no comments on this comment yet.