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;
21 my $s = q(SELECT name FROM sqlite_master WHERE type='table' ORDER BY name);
22 my $sth = $self->prepare($s);
25 while (my @t = $sth->fetchrow_array) {
35 my $s = q(PRAGMA table_info(spot));
36 my $sth = $self->prepare($s);
38 while (my @t = $sth->fetchrow_array) {
39 if ($t[0] eq 'ipaddr') {
51 my $s = q(alter table spot add column ipaddr varchar(40));
58 my $s = q{create table spot (
59 rowid integer primary key,
61 spotcall text not null,
64 spotter text not null,
82 dbg('adding spot index ix1');
83 $self->do('create index spot_ix1 on spot(time desc)');
84 dbg('adding spot index ix2');
85 $self->do('create index spot_ix2 on spot(spotcall asc)');