DBD-SQLcipher

 view release on metacpan or  search on metacpan

t/rt_26775_distinct.t  view on Meta::CPAN

ok( ref $dbh, "create new db" );

# ###### 
# First we create our schema (attached in __DATA__)
#
my $slurp;
while (my $line = <DATA>) {
    $slurp .= $line;
}
QUERY:
for my $query (split m/ ; /xms, $slurp) {

    # remove newline + leading and trailing whitespace.
    chomp $query;
    $query =~ s/^ \s+  //xms;
    $query =~ s/  \s+ $//xms;
    next QUERY if not $query;

    # execute the query.
    my $sth = $dbh->prepare($query);
    $tinfo  = $ENV{PRINT_QUERY}  ?  "prepare: $query"



( run in 1.254 second using v1.01-cache-2.11-cpan-71847e10f99 )