Hi,
I am working on a DBD backend for SWI-Prolog (http://www.swi-prolog.org). As it runs on top of my module Language::Prolog::Yaswi, I have called it DBD::Yaswi and I would like to register it and the "yaswi_" prefix on the DBI module.
Prolog is not a relational database and it doesn't use SQL as its query language, but besides that the DBI query model maps really well mostly because prolog query results can also be represented as tables.
You can see how it looks on this capture from my favorite perl shell (the debugger ;-) ):
[EMAIL PROTECTED]:~/s/trunk/perl/ext/DBD-Yaswi$ perl -Mblib -MDBI -de 1 main::(-e:1): 1 DB<1> $db=DBI->connect('dbi:Yaswi:user') DB<2> $sth=$db->prepare('find [X,Y] where Z=[1,2,3,4,3,2,1], member(X, Z), member(Y, Z), X>Y') DB<3> $sth->execute DB<4> p "@a\n" while @a=$sth->fetchrow_array 2 1 2 1 3 1 3 2 3 2 3 1 4 1 4 2 4 3 4 3 4 2 4 1 3 1 3 2 3 2 3 1 2 1 2 1 DB<5> $sth=$db->prepare('find [X,Y] where Z=(?), member(X, Z), member(Y, Z), X>Y, Y<(?)') DB<6> $sth->execute([1,4,2,4,3,7], 4) DB<7> p "@a\n" while @a=$sth->fetchrow_array 4 1 4 2 4 3 2 1 4 1 4 2 4 3 3 1 3 2 7 1 7 2 7 3
Cheers,
- Salvador.