.\" 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 "Data::Phrasebook::SQL::Query 3pm" .TH Data::Phrasebook::SQL::Query 3pm "2022-11-19" "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" Data::Phrasebook::SQL::Query \- Query Extension to the SQL/DBI Phrasebook Model. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $q = $book\->query( \*(Aqfind_author\*(Aq ); \& my $q = $book\->query( \*(Aqfind_author\*(Aq, \*(AqDictionary\*(Aq ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" An extension to the \s-1SQL\s0 class to specifically handle the \s-1DBI\s0 interface for each query requested. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .SS "new" .IX Subsection "new" Not to be accessed directly, but via the parent Data::Phrasebook, by specifying the class as \s-1SQL.\s0 .SH "METHODS" .IX Header "METHODS" .SS "sql" .IX Subsection "sql" Get/set the current \f(CW\*(C`sql\*(C'\fR statement, in a form suitable for passing straight to \s-1DBI.\s0 .SS "sth" .IX Subsection "sth" Get/set the current statement handle. .SS "args" .IX Subsection "args" Return list of arguments that will be used as bind parameters to any placeholders. Any given arguments will replace the whole list. .PP Returns list in list context, arrayref in scalar. .SS "order" .IX Subsection "order" As for \f(CW\*(C`args\*(C'\fR, but regarding the corresponding list of argument \&\fBnames\fR. .PP The assorted \f(CW\*(C`order_XXX\*(C'\fR methods are supported as for \f(CW\*(C`args_XXX\*(C'\fR. .SS "dbh" .IX Subsection "dbh" Get/set the database handle. .SH "PREPARATION / EXECUTING METHODS" .IX Header "PREPARATION / EXECUTING METHODS" .SS "execute" .IX Subsection "execute" Executes the query. Returns the result of \f(CW\*(C`DBI::execute\*(C'\fR. .PP Any arguments are given to \f(CW\*(C`order_args\*(C'\fR with the return of that method being used as arguments to \f(CW\*(C`DBI::execute\*(C'\fR. If no arguments, uses those already specified. .PP Calls \f(CW\*(C`prepare\*(C'\fR if necessary. .SS "order_args" .IX Subsection "order_args" Given a hash or hashref of keyword to value mappings, organises an array of arguments suitable for use as bind parameters in the order needed by the query itself. .SS "prepare" .IX Subsection "prepare" Prepares the query for execution. This method is called implicitly in most cases so you generally don't need to know about it. .SS "rebind" .IX Subsection "rebind" Rebinds any bound values. Lets one pass a scalar reference in the arguments to \f(CW\*(C`order_args\*(C'\fR and have the bound value update if the original scalar changes. .PP This method is not needed externally to this class. .SH "DELEGATED METHODS" .IX Header "DELEGATED METHODS" Any method not mentioned above is given to the statement handle. .PP All these delegations will implicitly call \f(CW\*(C`prepare\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" Data::Phrasebook, Data::Phrasebook::SQL. .SH "SUPPORT" .IX Header "SUPPORT" Please see the \s-1README\s0 file. .SH "AUTHOR" .IX Header "AUTHOR" .Vb 3 \& Original author: Iain Campbell Truskett (16.07.1979 \- 29.12.2003) \& Maintainer: Barbie since January 2004. \& for Miss Barbell Productions . .Ve .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" .Vb 2 \& Copyright (C) 2003 Iain Truskett. \& Copyright (C) 2004\-2013 Barbie for Miss Barbell Productions. \& \& This distribution is free software; you can redistribute it and/or \& modify it under the Artistic License v2. .Ve