1Rose::DB::Oracle(3)   User Contributed Perl Documentation  Rose::DB::Oracle(3)
2
3
4

NAME

6       Rose::DB::Oracle - Oracle driver class for Rose::DB.
7

SYNOPSIS

9         use Rose::DB;
10
11         Rose::DB->register_db
12         (
13           domain   => 'development',
14           type     => 'main',
15           driver   => 'Oracle',
16           database => 'dev_db',
17           host     => 'localhost',
18           username => 'devuser',
19           password => 'mysecret',
20         );
21
22         Rose::DB->default_domain('development');
23         Rose::DB->default_type('main');
24         ...
25
26         $db = Rose::DB->new; # $db is really a Rose::DB::Oracle-derived object
27         ...
28

DESCRIPTION

30       Rose::DB blesses objects into a class derived from Rose::DB::Oracle
31       when the driver is "oracle".  This mapping of driver names to class
32       names is configurable.  See the documentation for Rose::DB's new() and
33       driver_class() methods for more information.
34
35       This class cannot be used directly.  You must use Rose::DB and let its
36       new() method return an object blessed into the appropriate class for
37       you, according to its driver_class() mappings.
38
39       Only the methods that are new or have different behaviors than those in
40       Rose::DB are documented here.  See the Rose::DB documentation for the
41       full list of methods.
42
43       Oracle 9 or later is required.
44
45       Note: This class is a work in progress.  Support for Oracle databases
46       is not yet complete.  If you would like to help, please contact John
47       Siracusa at siracusa@gmail.com or post to the mailing list.
48

CLASS METHODS

50       default_post_connect_sql [STATEMENTS]
51           Get or set the default list of SQL statements that will be run
52           immediately after connecting to the database.  STATEMENTS should be
53           a list or reference to an array of SQL statements.  Returns a
54           reference to the array of SQL statements in scalar context, or a
55           list of SQL statements in list context.
56
57           The default_post_connect_sql statements will be run before any
58           statements set using the post_connect_sql method.  The default list
59           contains the following:
60
61               ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
62               ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'
63               ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF TZHTZM'
64
65           If one or more "NLS_*_FORMAT" environment variables are set, the
66           format strings above are replaced by the values that these
67           environment variables have at the time this module is loaded.
68

OBJECT METHODS

70       post_connect_sql [STATEMENTS]
71           Get or set the SQL statements that will be run immediately after
72           connecting to the database.  STATEMENTS should be a list or
73           reference to an array of SQL statements.  Returns a reference to an
74           array (in scalar) or a list of the default_post_connect_sql
75           statements and the post_connect_sql statements.  Example:
76
77               $db->post_connect_sql('UPDATE mytable SET num = num + 1');
78
79               print join("\n", $db->post_connect_sql);
80
81               ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
82               ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SSxFF'
83               UPDATE mytable SET num = num + 1
84
85       schema [SCHEMA]
86           Get or set the database schema name.  In Oracle, every user has a
87           corresponding schema.  The schema is comprised of all objects that
88           user owns, and has the same name as that user.  Therefore, this
89           attribute defaults to the username if it is not set explicitly.
90
91   Value Parsing and Formatting
92       validate_date_keyword STRING
93           Returns true if STRING is a valid keyword for the PostgreSQL "date"
94           data type.  Valid (case-insensitive) date keywords are:
95
96               current_date
97               current_timestamp
98               localtimestamp
99               months_between
100               sysdate
101               systimestamp
102
103           The keywords are case sensitive.  Any string that looks like a
104           function call (matches "/^\w+\(.*\)$/") is also considered a valid
105           date keyword if keyword_function_calls is true.
106
107       validate_timestamp_keyword STRING
108           Returns true if STRING is a valid keyword for the Oracle
109           "timestamp" data type, false otherwise.  Valid timestamp keywords
110           are:
111
112               current_date
113               current_timestamp
114               localtimestamp
115               months_between
116               sysdate
117               systimestamp
118
119           The keywords are case sensitive.  Any string that looks like a
120           function call (matches "/^\w+\(.*\)$/") is also considered a valid
121           timestamp keyword if keyword_function_calls is true.
122

AUTHORS

124       John C. Siracusa (siracusa@gmail.com), Ron Savage (ron@savage.net.au)
125

LICENSE

127       Copyright (c) 2008 by John Siracusa and Ron Savage.  All rights
128       reserved. This program is free software; you can redistribute it and/or
129       modify it under the same terms as Perl itself.
130
131
132
133perl v5.32.0                      2020-07-28               Rose::DB::Oracle(3)
Impressum