.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBIx::Connector::Driver 3pm" .TH DBIx::Connector::Driver 3pm "2023-09-28" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBIx::Connector::Driver \- Database\-specific connection interface .SH "DESCRIPTION" .IX Header "DESCRIPTION" Some of the things that DBIx::Connector does are implemented differently by different drivers, or the official interface provided by the \s-1DBI\s0 may not be implemented for a particular driver. The driver-specific code therefore is encapsulated in this separate driver class. .PP Most of the \s-1DBI\s0 drivers work uniformly, so in most cases the implementation provided here in DBIx::Connector::Driver will work just fine. It's only when something is different that a driver subclass needs to be added. In such a case, the subclass's name is the same as the \s-1DBI\s0 driver. For example the driver for DBD::Pg is DBIx::Connector::Driver::Pg and the driver for DBD::mysql is DBIx::Connector::Driver::mysql. .PP If you're just a user of DBIx::Connector, you can ignore the driver classes. DBIx::Connector uses them internally to do its magic, so you needn't worry about them. .SH "INTERFACE" .IX Header "INTERFACE" In case you need to implement a driver, here's the interface you can modify. .SS "Constructor" .IX Subsection "Constructor" \fI\f(CI\*(C`new\*(C'\fI\fR .IX Subsection "new" .PP .Vb 1 \& my $driver = DBIx::Connector::Driver\->new( $driver ); .Ve .PP Constructs and returns a driver object. Each driver class is implemented as a singleton, so the same driver object is always returned for the same driver. The \f(CW\*(C`driver\*(C'\fR parameter should be a Perl \s-1DBI\s0 driver name, such as \f(CW\*(C`Pg\*(C'\fR for DBD::Pg or \f(CW\*(C`SQLite\*(C'\fR for DBD::SQLite. If a subclass has been defined for \f(CW$driver\fR, then the object will be of that class. Otherwise it will be an instance of the driver base class. .SS "Instance Methods" .IX Subsection "Instance Methods" \fI\f(CI\*(C`ping\*(C'\fI\fR .IX Subsection "ping" .PP .Vb 1 \& $driver\->ping($dbh); .Ve .PP Calls \f(CW\*(C`$dbh\->ping\*(C'\fR. Override if for some reason the \s-1DBI\s0 driver doesn't do it right. .PP \fI\f(CI\*(C`begin_work\*(C'\fI\fR .IX Subsection "begin_work" .PP .Vb 1 \& $driver\->begin_work($dbh); .Ve .PP Calls \f(CW\*(C`$dbh\->begin_work\*(C'\fR. Override if for some reason the \s-1DBI\s0 driver doesn't do it right. .PP \fI\f(CI\*(C`commit\*(C'\fI\fR .IX Subsection "commit" .PP .Vb 1 \& $driver\->commit($dbh); .Ve .PP Calls \f(CW\*(C`$dbh\->commit\*(C'\fR. Override if for some reason the \s-1DBI\s0 driver doesn't do it right. .PP \fI\f(CI\*(C`rollback\*(C'\fI\fR .IX Subsection "rollback" .PP .Vb 1 \& $driver\->rollback($dbh); .Ve .PP Calls \f(CW\*(C`$dbh\->rollback\*(C'\fR. Override if for some reason the \s-1DBI\s0 driver doesn't do it right. .PP \fI\f(CI\*(C`savepoint\*(C'\fI\fR .IX Subsection "savepoint" .PP .Vb 1 \& $driver\->savepoint($dbh, $name); .Ve .PP A no-op. Override if your database does in fact support savepoints. The driver subclass should create a savepoint with the given \f(CW$name\fR. See the implementations in DBIx::Connector::Driver::Pg and DBIx::Connector::Driver::Oracle for examples. .PP \fI\f(CI\*(C`release\*(C'\fI\fR .IX Subsection "release" .PP .Vb 1 \& $driver\->release($dbh, $name); .Ve .PP A no-op. Override if your database does in fact support savepoints. The driver subclass should release the savepoint with the given \f(CW$name\fR. See the implementations in DBIx::Connector::Driver::Pg and DBIx::Connector::Driver::Oracle for examples. .PP \fI\f(CI\*(C`rollback_to\*(C'\fI\fR .IX Subsection "rollback_to" .PP .Vb 1 \& $driver\->rollback_to($dbh, $name); .Ve .PP A no-op. Override if your database does in fact support savepoints. The driver subclass should rollback to the savepoint with the given \f(CW$name\fR. See the implementations in DBIx::Connector::Driver::Pg and DBIx::Connector::Driver::Oracle for examples. .SH "AUTHORS" .IX Header "AUTHORS" This module was written by: .IP "David E. Wheeler " 4 .IX Item "David E. Wheeler " .PP It is based on code written by: .IP "Matt S. Trout " 4 .IX Item "Matt S. Trout " .PD 0 .IP "Peter Rabbitson " 4 .IX Item "Peter Rabbitson " .PD .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (c) 2009\-2013 David E. Wheeler. Some Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.