DBIx::Librarian::Statement - an active SQL statement in a Librarian
Internal class used by DBIx::Librarian. Implementation of BUILDER pattern (Librarian is the Director, Statement is the Builder).
Recognizes the following extensions to the SQL SELECT directive:
SELECT* return zero or more rows as an array SELECT? return zero or one rows as a scalar SELECT1 return exactly one row as a scalar
For the SELECT? and SELECT1 flavors, an exception will be raised if more than one row is returned. For the SELECT1 flavor, an exception will be raised if no rows are found.
The default behavior for an unadorned SELECT is multi-row SELECT*.
my $stmt = new DBIx::Librarian::Statement ($dbh, $sql);
Prepares the SQL statement in $sql against the database connection in $dbh. Handles bind variables and direct substitution.
$stmt->execute($data);
Returns the number of rows affected for INSERTs, UPDATEs and DELETES; zero for SELECTs. Croaks on any database error or if any SELECT criteria are violated.
Jason W. May <jmay@pobox.com>
Copyright (C) 2001-2003 Jason W. May. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install DBIx::Librarian, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Librarian
CPAN shell
perl -MCPAN -e shell install DBIx::Librarian
For more information on module installation, please visit the detailed CPAN module installation guide.