Next: Guidelines for application developers
Up: Using the interface:
Previous: SQLCA interface
You can write recursive Datalog queries with exactly the same
semantics as in XSB using imported database predicates or database
rules. For example assuming db_parent/2 is an imported database
predicate, the following recursive query computes its transitive closure.
ancestor(X,Y) :- db_parent(X,Y).
ancestor(X,Z) :- ancestor(X,Y), db_parent(Y,Z).