| 1 | package DBIx::Connector::Driver::mysql; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use base 'DBIx::Connector::Driver'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | our $VERSION = '0.55'; | |
| 7 | |||
| 8 | sub _connect { | ||
| 9 | 0 | ▶ | my ($self, $dbh) = @_; |
|
Subroutine
_connect: not called CC=1 SCAR=6.9
| |||
| 10 | 0 | $dbh->{mysql_auto_reconnect} = 0; | |
| 11 | 0 | $dbh; | |
| 12 | } | ||
| 13 | |||
| 14 | sub savepoint { | ||
| 15 | 0 | ▶ | my ($self, $dbh, $name) = @_; |
|
Subroutine
savepoint: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 16 | 0 | $dbh->do("SAVEPOINT $name"); | |
| 17 | } | ||
| 18 | |||
| 19 | sub release { | ||
| 20 | 0 | ▶ | my ($self, $dbh, $name) = @_; |
|
Subroutine
release: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | 0 | $dbh->do("RELEASE SAVEPOINT $name"); | |
| 22 | } | ||
| 23 | |||
| 24 | sub rollback_to { | ||
| 25 | 0 | ▶ | my ($self, $dbh, $name) = @_; |
|
Subroutine
rollback_to: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | 0 | $dbh->do("ROLLBACK TO SAVEPOINT $name"); | |
| 27 | } | ||
| 28 | |||
| 29 | 2 | 1; | |
| 30 | __END__ | ||
| 31 | |||
| 32 | =head1 Name | ||
| 33 | |||
| 34 | DBIx::Connector::Driver::mysql - MySQL-specific connection interface | ||
| 35 | |||
| 36 | =head1 Description | ||
| 37 | |||
| 38 | This subclass of L<DBIx::Connector::Driver|DBIx::Connector::Driver> provides | ||
| 39 | MySQL-specific implementations of the following methods: | ||
| 40 | |||
| 41 | =over | ||
| 42 | |||
| 43 | =item C<savepoint> | ||
| 44 | |||
| 45 | =item C<release> | ||
| 46 | |||
| 47 | =item C<rollback_to> | ||
| 48 | |||
| 49 | =back | ||
| 50 | |||
| 51 | It also modifies the connection attributes as follows: | ||
| 52 | |||
| 53 | =over | ||
| 54 | |||
| 55 | =item C<mysql_auto_reconnect> | ||
| 56 | |||
| 57 | Will always be set to false. This is to prevent MySQL's auto-reconnection | ||
| 58 | feature from interfering with DBIx::Connector's auto-reconnection | ||
| 59 | functionality in C<fixup> mode. | ||
| 60 | |||
| 61 | =back | ||
| 62 | |||
| 63 | =head1 Authors | ||
| 64 | |||
| 65 | This module was written and is maintained by: | ||
| 66 | |||
| 67 | =over | ||
| 68 | |||
| 69 | =item David E. Wheeler <david@kineticode.com> | ||
| 70 | |||
| 71 | =back | ||
| 72 | |||
| 73 | It is based on code written by: | ||
| 74 | |||
| 75 | =over | ||
| 76 | |||
| 77 | =item Matt S. Trout <mst@shadowcatsystems.co.uk> | ||
| 78 | |||
| 79 | =item Peter Rabbitson <rabbit+dbic@rabbit.us> | ||
| 80 | |||
| 81 | =back | ||
| 82 | |||
| 83 | =head1 Copyright and License | ||
| 84 | |||
| 85 | Copyright (c) 2009-2013 David E. Wheeler. Some Rights Reserved. | ||
| 86 | |||
| 87 | This module is free software; you can redistribute it and/or modify it under | ||
| 88 | the same terms as Perl itself. | ||
| 89 | |||
| 90 | =cut | ||