5477N/AQuick and dirty check that the module works (use actual
5477N/Aperl version instead of XXX)
5477N/A-------------------------------8<------------------------
5477N/AC="\$dbh=DBI->connect('dbi:SQLite:$DB');"
5925N/A$P -e 'print $DBD::SQLite::VERSION, "\n"'
5477N/A echo "Fail - database not created"
5477N/A $dbh->do("CREATE TABLE mytable( Bindata BLOB, date DATE)");
5477N/A $dbh->do("CREATE TRIGGER insert_blob_date AFTER INSERT ON mytable BEGIN UPDATE mytable SET date = DATETIME(\"NOW\"); END ;");
5477N/A my $blob = `cat '"$FILE"'`;
5477N/A my $sth = $dbh->prepare("INSERT INTO mytable VALUES (?, NULL)");
5477N/A $sth->bind_param(1, $blob, {TYPE => DBD::SQL_BLOB}
5477N/A $sth = $dbh->prepare("SELECT Bindata FROM mytable");
5477N/A print Digest::MD5::md5_hex($blobo), "\n";
5477N/Aecho '.schema' | sqlite3 "$DB"
5477N/Aecho 'select date from mytable;' | sqlite3 "$DB"
5477N/A-------------------------------8<------------------------
5925N/A - correct DBD::SQLite version printed
5477N/A - database description (mytable and trigger insert_blob_date)