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