2 # Module for SQLite DXSql variants
4 # Stuff like table creates and (later) alters
8 # Copyright (c) 2005 Dirk Koopman G1TLH
11 package DXSql::SQLite;
15 use vars qw($VERSION $BRANCH @ISA);
16 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
17 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
18 $main::build += $VERSION;
19 $main::branch += $BRANCH;
26 my $s = q(SELECT name FROM sqlite_master WHERE type='table' ORDER BY name);
27 my $sth = $self->prepare($s);
30 push @out, $sth->fetchrow_array;
38 my $s = q{create table spot (
39 rowid integer primary key,
41 spotcall text not null,
44 spotter text not null,
61 $self->do('create index spot_ix1 on spot(time desc)');
62 dbg('adding spot index ix1');
63 $self->do('create index spot_ix2 on spot(spotcall asc)');
64 dbg('adding spot index ix2');