NAME
DBD::Yaswi - A DBI interface to SWI-Prolog
SYNOPSYS
use DBI;
my $db=DBI->connect('dbi:Yaswi:user');
my $sth=$db->prepare('find [X, Y] where Z=[1,2,3,4,5], \
member(X,Z), member(Y,Z), X>Y');
$sth->execute;
while(my @r=$sth->fetchrow_array) {
printf "X=%_ Y=%_\n", @r;
}
my $sth1=$db->prepare('find [X,Y] where Z=(?),\
member(X, Z), member(Y, Z), \
X>Y, \+ member(Y, (?))');
$sth1->execute([1..100],
[map{int(100*rand)}1..30]);
while(my @r=$sth->fetchrow_array) {
printf "X=%_ Y=%_\n", @r;
}
$sth2=$db->prepare('insert foo(?)');
foreach (qw(foo bar doo moz goo too)) {
$sth2->execute($_);
}
AUTHOR
Salvador Fandiño, <sfandino@yahoo.com>
COPYRIGHT AND LICENSE
Copyright 2005 by Salvador Fandiño
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 306:
Non-ASCII character seen before =encoding in 'Fandiño,'. Assuming CP1252