line |
true |
false |
branch |
54
|
0 |
0 |
unless my $dbh = 'DBI'->connect("dbi:SQLite:dbname=$db_file", '', '', {'PrintError', 0, 'AutoCommit', 1}) |
69
|
0 |
0 |
unless ($self->_table_exists($self->table)) |
78
|
0 |
0 |
unless chown $uid, $gid, $db_file |
86
|
0 |
0 |
if (my $dbh = $self->_dbh) |
98
|
0 |
0 |
if (my $dbh = $self->_dbh) |
110
|
0 |
0 |
unless (defined $rec) |
112
|
0 |
0 |
unless $rec = $self->_create($from) |
121
|
0 |
0 |
if ($start < time - $expire) |
136
|
0 |
0 |
unless $self->_dbh->do("select 1 from $table limit 0") |
148
|
0 |
0 |
unless $dbh->do("\n create table $table (\n sender varchar (255),\n first_seen timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n messages integer NOT NULL DEFAULT 0,\n PRIMARY KEY (sender)\n )\n ") |
157
|
0 |
0 |
unless $dbh->do("\n create index ${table}_first_seen_key on $table (first_seen)\n ") |
168
|
0 |
0 |
unless $self->_dbh->do("insert or replace into $table (sender) values (?)", undef, $sender) |
209
|
0 |
0 |
unless $self->_dbh->do("\n update\n $table\n set\n messages = 1,\n first_seen = CURRENT_TIMESTAMP\n where\n sender = ?\n ", undef, $sender) |