All tests pass except for the transaction tests under MySQL. InnoDB sucks
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Sector / DBI / Scalar.pm
1 package DBM::Deep::Sector::DBI::Scalar;
2
3 use strict;
4 use warnings FATAL => 'all';
5
6 use base qw( DBM::Deep::Sector::DBI );
7
8 sub table { 'datas' }
9
10 sub _init {
11     my $self = shift;
12
13     if ( $self->offset ) {
14         my ($rows) = $self->engine->storage->read_from(
15             datas => $self->offset,
16             qw( id data_type key value ),
17         );
18
19         $self->{$_} = $rows->[0]{$_} for qw( data_type key value );
20     }
21
22     return;
23 }
24
25 sub data {
26     my $self = shift;
27     $self->{value};
28 }
29
30 1;
31 __END__