blib/lib/DBIx/Romani/Driver/sqlite/IdGenerator.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 11 | 54.5 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 6 | 33.3 |
pod | 0 | 4 | 0.0 |
total | 8 | 21 | 38.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | |||||||
2 | package DBIx::Romani::Driver::sqlite::IdGenerator; | ||||||
3 | 1 | 1 | 6 | use base qw(DBIx::Romani::IdGenerator); | |||
1 | 2 | ||||||
1 | 503 | ||||||
4 | |||||||
5 | 1 | 1 | 5 | use strict; | |||
1 | 2 | ||||||
1 | 101 | ||||||
6 | |||||||
7 | sub is_before_insert | ||||||
8 | { | ||||||
9 | 0 | 0 | 0 | return 0; | |||
10 | } | ||||||
11 | |||||||
12 | sub is_after_insert | ||||||
13 | { | ||||||
14 | 0 | 0 | 0 | return 1; | |||
15 | } | ||||||
16 | |||||||
17 | sub get_id_method | ||||||
18 | { | ||||||
19 | 0 | 0 | 0 | return "auto_increment"; | |||
20 | } | ||||||
21 | |||||||
22 | sub get_id | ||||||
23 | { | ||||||
24 | 0 | 0 | 0 | my $self = shift; | |||
25 | 0 | return $self->get_conn()->get_dbh()->func( 'last_insert_rowid' ); | |||||
26 | } | ||||||
27 | |||||||
28 | 1; | ||||||
29 |