Salvador Fandiño García > DBD-Yaswi-0.01 > DBD::Yaswi

Download:
DBD-Yaswi-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

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.

syntax highlighting: