line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Basset::DB::Nontransactional; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#Basset::DB::Nontransactional 2004, 2006 James A Thomason III |
4
|
|
|
|
|
|
|
#Basset::DB::Nontransactional is distributed under the terms of the Perl Artistic License. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$VERSION = '1.02'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=pod |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Basset::DB::Nontransactional - A non transactional database driver. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 AUTHOR |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Jim Thomason, jim@jimandkoka.com |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
If you really really really want to use non-transactional database drivers, just swap in |
21
|
|
|
|
|
|
|
this driver in your conf file. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
types %= driver=Basset::DB::Nontransactional |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Voila! No transactions. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
5060
|
use Basset::DB; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
@ISA = qw(Basset::DB); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
use strict; |
33
|
|
|
|
|
|
|
use warnings; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub create_handle { |
36
|
|
|
|
|
|
|
return shift->SUPER::create_handle( |
37
|
|
|
|
|
|
|
@_, |
38
|
|
|
|
|
|
|
'AutoCommit' => 1 |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#dummy out the Basset::DB methods that deal with transactions. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub stack { return 0 }; |
45
|
|
|
|
|
|
|
sub begin { return 1 }; |
46
|
|
|
|
|
|
|
sub end { return '0 but true' }; |
47
|
|
|
|
|
|
|
sub finish { return 1 }; |
48
|
|
|
|
|
|
|
sub fail { return 1 }; |
49
|
|
|
|
|
|
|
sub wipe { return 1 }; |
50
|
|
|
|
|
|
|
sub failed { return 0 }; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |