.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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::SearchBuilder::Handle::Oracle 3pm" .TH DBIx::SearchBuilder::Handle::Oracle 3pm 2024-01-27 "perl v5.38.2" "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 .Vb 1 \& DBIx::SearchBuilder::Handle::Oracle \- An oracle specific Handle object .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides a subclass of DBIx::SearchBuilder::Handle that compensates for some of the idiosyncrasies of Oracle. .SH METHODS .IX Header "METHODS" .SS "Connect PARAMHASH: Driver, Database, Host, User, Password" .IX Subsection "Connect PARAMHASH: Driver, Database, Host, User, Password" Takes a paramhash and connects to your DBI datasource. .SS BuildDSN .IX Subsection "BuildDSN" Customized version of "BuildDSN" in DBIx::SearchBuilder::Handle method. .PP Takes additional argument SID. Database argument used unless SID provided. Two forms of DSN are generated depending on whether Host defined or not: .PP .Vb 2 \& dbi:Oracle:sid=;host=...[;port=...] \& dbi:Oracle: .Ve .PP Read details in documentation for DBD::Oracle module. .SS Insert .IX Subsection "Insert" Takes a table name as the first argument and assumes that the rest of the arguments are an array of key-value pairs to be inserted. .SS InsertFromSelect .IX Subsection "InsertFromSelect" Customization of "InsertFromSelect" in DBIx::SearchBuilder::Handle. .PP Unlike other DBs Oracle needs: .IP \(bu 4 id generated from sequences for every new record. .IP \(bu 4 query wrapping in parens. .PP \&\fBNOTE\fR that on Oracle there is a limitation on the query. Every column in the result should have unique name or alias, for example the following query would generate "ORA\-00918: column ambiguously defined" error: .PP .Vb 1 \& SELECT g.id, u.id FROM ... .Ve .PP Solve with aliases: .PP .Vb 1 \& SELECT g.id AS group_id, u.id AS user_id FROM ... .Ve .SS KnowsBLOBs .IX Subsection "KnowsBLOBs" Returns 1 if the current database supports inserts of BLOBs automatically. Returns undef if the current database must be informed of BLOBs for inserts. .SS "BLOBParams FIELD_NAME FIELD_TYPE" .IX Subsection "BLOBParams FIELD_NAME FIELD_TYPE" Returns a hash ref for the bind_param call to identify BLOB types used by the current database for a particular column type. The current Oracle implementation only supports ORA_CLOB types (112). .SS "ApplyLimits STATEMENTREF ROWS_PER_PAGE FIRST_ROW" .IX Subsection "ApplyLimits STATEMENTREF ROWS_PER_PAGE FIRST_ROW" takes an SQL SELECT statement and massages it to return ROWS_PER_PAGE starting with FIRST_ROW; .SS "DistinctQuery STATEMENTREF" .IX Subsection "DistinctQuery STATEMENTREF" takes an incomplete SQL SELECT statement and massages it to return a DISTINCT result set. .SS BinarySafeBLOBs .IX Subsection "BinarySafeBLOBs" Return undef, as Oracle doesn't support binary-safe CLOBS .SS DatabaseVersion .IX Subsection "DatabaseVersion" Returns value of ORA_OCI constant, see "Constants" in DBI. .SS SimpleDateTimeFunctions .IX Subsection "SimpleDateTimeFunctions" Returns hash reference with specific date time functions of this database for "DateTimeFunction" in DBIx::SearchBuilder::Handle. .SS ConvertTimezoneFunction .IX Subsection "ConvertTimezoneFunction" Custom implementation of "ConvertTimezoneFunction" in DBIx::SearchBuilder::Handle. .PP Use the following query to get list of timezones: .PP .Vb 1 \& SELECT tzname FROM v$timezone_names; .Ve .PP Read Oracle's docs about timezone files: .PP .Vb 1 \& http://download.oracle.com/docs/cd/B14117_01/server.101/b10749/ch4datetime.htm#i1006667 .Ve