Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Logica – Declarative logic programming language for data. Parent comment
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.
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.