changed the way args are passed to a storage, should make it easier to use existing...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / mysql.pm
CommitLineData
843f8ecd 1package DBIx::Class::Storage::DBI::mysql;
2
3use strict;
4use warnings;
5
6use base qw/DBIx::Class::Storage::DBI/;
7
8# __PACKAGE__->load_components(qw/PK::Auto/);
9
d4f16b21 10sub _dbh_last_insert_id {
11 my ($self, $dbh, $source, $col) = @_;
12 $dbh->{mysql_insertid};
843f8ecd 13}
14
e8d293df 15sub sqlt_type {
16 return 'MySQL';
17}
18
adb3554a 19sub _svp_begin {
eeb8cfeb 20 my ($self, $name) = @_;
adb3554a 21
eeb8cfeb 22 $self->dbh->do("SAVEPOINT $name");
adb3554a 23}
24
25sub _svp_release {
eeb8cfeb 26 my ($self, $name) = @_;
adb3554a 27
eeb8cfeb 28 $self->dbh->do("RELEASE SAVEPOINT $name");
adb3554a 29}
30
31sub _svp_rollback {
eeb8cfeb 32 my ($self, $name) = @_;
adb3554a 33
eeb8cfeb 34 $self->dbh->do("ROLLBACK TO SAVEPOINT $name")
adb3554a 35}
36
106d5f3b 37sub is_replicating {
38 my $self = shift @_;
39}
40
41sub lag_behind_master {
42 my $self = shift @_;
43}
44
843f8ecd 451;
46
75d07914 47=head1 NAME
843f8ecd 48
49DBIx::Class::Storage::DBI::mysql - Automatic primary key class for MySQL
50
51=head1 SYNOPSIS
52
53 # In your table classes
54 __PACKAGE__->load_components(qw/PK::Auto Core/);
55 __PACKAGE__->set_primary_key('id');
56
57=head1 DESCRIPTION
58
59This class implements autoincrements for MySQL.
60
61=head1 AUTHORS
62
63Matt S. Trout <mst@shadowcatsystems.co.uk>
64
65=head1 LICENSE
66
67You may distribute this code under the same terms as Perl itself.
68
69=cut