File Coverage

blib/lib/Rose/DB/Registry/Entry.pm
Criterion Covered Total %
statement 55 56 98.2
branch 22 24 91.6
condition 4 6 66.6
subroutine 14 15 93.3
pod 7 8 87.5
total 102 109 93.5


line stmt bran cond sub pod time code
1             package Rose::DB::Registry::Entry;
2              
3 16     16   111 use strict;
  16         31  
  16         457  
4              
5 16     16   82 use Clone::PP();
  16         28  
  16         241  
6              
7 16     16   69 use Rose::Object;
  16         28  
  16         4310  
8             our @ISA = qw(Rose::Object);
9              
10             our $VERSION = '0.765';
11              
12             our $Debug = 0;
13              
14             #
15             # Object data
16             #
17              
18             our %Attrs;
19              
20             BEGIN
21             {
22 16     16   7371 our %Attrs =
23             (
24             # Generic
25             catalog => { type => 'scalar' },
26             database => { type => 'scalar' },
27             dbi_driver => { type => 'scalar' },
28             description => { type => 'scalar' },
29             domain => { type => 'scalar' },
30             driver => { type => 'scalar', make_method => 0 },
31             dsn => { type => 'scalar' },
32             host => { type => 'scalar' },
33             password => { type => 'scalar' },
34             port => { type => 'scalar' },
35             schema => { type => 'scalar' },
36             server_time_zone => { type => 'scalar' },
37             type => { type => 'scalar' },
38             username => { type => 'scalar' },
39              
40             connect_options => { type => 'hash', method_spec => { interface => 'get_set_init' } },
41              
42             pre_disconnect_sql => { type => 'array' },
43             post_connect_sql => { type => 'array' },
44              
45             # Pg
46             european_dates => { type => 'boolean', method_spec => { default => 0 } },
47             pg_enable_utf8 => { type => 'boolean' },
48             options => { type => 'scalar' },
49             service => { type => 'scalar' },
50             sslmode => { type => 'scalar' },
51              
52             # SQLite
53             auto_create => { type => 'boolean', method_spec => { default => 1 } },
54             sqlite_unicode => { type => 'boolean' },
55              
56             # MySQL
57             mysql_auto_reconnect => { type => 'boolean' },
58             mysql_client_found_rows => { type => 'boolean' },
59             mysql_compression => { type => 'boolean' },
60             mysql_connect_timeout => { type => 'boolean' },
61             mysql_embedded_groups => { type => 'scalar' },
62             mysql_embedded_options => { type => 'scalar' },
63             mysql_enable_utf8 => { type => 'boolean' },
64             mysql_enable_utf8mb4 => { type => 'boolean' },
65             mysql_local_infile => { type => 'scalar' },
66             mysql_multi_statements => { type => 'boolean' },
67             mysql_read_default_file => { type => 'scalar' },
68             mysql_read_default_group => { type => 'scalar' },
69             mysql_socket => { type => 'scalar' },
70             mysql_ssl => { type => 'boolean' },
71             mysql_ssl_ca_file => { type => 'scalar' },
72             mysql_ssl_ca_path => { type => 'scalar' },
73             mysql_ssl_cipher => { type => 'scalar' },
74             mysql_ssl_client_cert => { type => 'scalar' },
75             mysql_ssl_client_key => { type => 'scalar' },
76             mysql_use_result => { type => 'boolean' },
77             mysql_bind_type_guessing => { type => 'boolean' },
78             );
79             }
80              
81             sub _attrs
82             {
83 252     252   1337 my(%args) = @_;
84              
85 252         421 my $type = $args{'type'};
86              
87             # Type filter first
88             my @attrs =
89 252 50       1618 $type ? (grep { $Attrs{$_}{'type'} eq $type } keys(%Attrs)) : keys(%Attrs);
  11340         18306  
90              
91 252 100       985 if($args{'with_defaults'})
    100          
92             {
93             @attrs = grep
94             {
95 36         62 $Attrs{$_}{'method_spec'} &&
96 504 100       1050 defined $Attrs{$_}{'method_spec'}{'default'}
97             }
98             @attrs;
99             }
100             elsif($args{'no_defaults'})
101             {
102             @attrs = grep
103             {
104 36         69 !$Attrs{$_}{'method_spec'} ||
105 504   66     1270 !defined $Attrs{$_}{'method_spec'}{'default'}
106             }
107             @attrs;
108             }
109              
110 252 100       957 return wantarray ? @attrs : \@attrs;
111             }
112              
113             sub _attr_method_specs
114             {
115 64     64   146 my $attrs = _attrs(@_);
116              
117 64         103 my @specs;
118              
119 64         129 foreach my $attr (@$attrs)
120             {
121 720 100 66     1412 next if(exists $Attrs{$attr}{'make_method'} && !$Attrs{$attr}{'make_method'});
122              
123 704 100       1118 if(my $spec = $Attrs{$attr}{'method_spec'})
124             {
125 48         103 push(@specs, $attr => $spec);
126             }
127             else
128             {
129 656         1130 push(@specs, $attr);
130             }
131             }
132              
133 64 50       576 return wantarray ? @specs : \@specs;
134             }
135              
136             use Rose::Object::MakeMethods::Generic
137             (
138 16         57 'scalar' =>
139             [
140             _attr_method_specs(type => 'scalar'),
141             ],
142              
143             'boolean' =>
144             [
145             _attr_method_specs(type => 'boolean'),
146             ],
147              
148             'hash' =>
149             [
150             _attr_method_specs(type => 'hash'),
151             'connect_option' => { hash_key => 'connect_options' },
152             ],
153              
154             'array' =>
155             [
156             _attr_method_specs(type => 'array'),
157             ]
158 16     16   138 );
  16         30  
159              
160 28     28 0 216 sub init_connect_options { {} }
161              
162 4     4 1 1897 sub autocommit { shift->connect_option('AutoCommit', @_) }
163 4     4 1 4317 sub print_error { shift->connect_option('PrintError', @_) }
164 4     4 1 6493 sub raise_error { shift->connect_option('RaiseError', @_) }
165 4     4 1 1804 sub handle_error { shift->connect_option('HandleError', @_) }
166              
167             sub driver
168             {
169 714     714 1 9293 my($self) = shift;
170 714 100       2489 return $self->{'driver'} unless(@_);
171 226         505 $self->{'dbi_driver'} = shift;
172 226         796 return $self->{'driver'} = lc $self->{'dbi_driver'};
173             }
174              
175             sub dump
176             {
177 36     36 1 488 my($self) = shift;
178              
179 36         52 my %dump;
180              
181 36         70 foreach my $attr (_attrs(type => 'scalar'),
182             _attrs(type => 'boolean', no_defaults => 1))
183             {
184 1440         2727 my $value = $self->$attr();
185 1440 100       3721 next unless(defined $value);
186 346         653 $dump{$attr} = $value;
187             }
188              
189 36         114 foreach my $attr (_attrs(type => 'hash'), _attrs(type => 'array'))
190             {
191 108         2060 my $value = $self->$attr();
192 108 100       723 next unless(defined $value);
193 54         141 $dump{$attr} = Clone::PP::clone($value);
194             }
195              
196              
197             # These booleans have defaults, but we only want the ones
198             # where the values were explicitly set. Ugly...
199 36         479 foreach my $attr (_attrs(type => 'boolean', with_defaults => 1))
200             {
201 72         136 my $value = $self->{$attr};
202 72 100       150 next unless(defined $value);
203 4         12 $dump{$attr} = Clone::PP::clone($value);
204             }
205              
206 36         263 return \%dump;
207             }
208              
209 0     0 1   sub clone { Clone::PP::clone($_[0]) }
210              
211             1;
212              
213             __END__
214              
215             =head1 NAME
216              
217             Rose::DB::Registry::Entry - Data source registry entry.
218              
219             =head1 SYNOPSIS
220              
221             use Rose::DB::Registry::Entry;
222              
223             $entry = Rose::DB::Registry::Entry->new(
224             domain => 'production',
225             type => 'main',
226             driver => 'Pg',
227             database => 'big_db',
228             host => 'dbserver.acme.com',
229             username => 'dbadmin',
230             password => 'prodsecret',
231             server_time_zone => 'UTC');
232              
233             Rose::DB->register_db($entry);
234              
235             # ...or...
236              
237             Rose::DB->registry->add_entry($entry);
238              
239             ...
240              
241             =head1 DESCRIPTION
242              
243             C<Rose::DB::Registry::Entry> objects store information about a single L<Rose::DB> data source. See the L<Rose::DB> documentation for more information on data sources, and the L<Rose::DB::Registry> documentation to learn how C<Rose::DB::Registry::Entry> objects are managed.
244              
245             C<Rose::DB::Registry::Entry> inherits from, and follows the conventions of, L<Rose::Object>. See the L<Rose::Object> documentation for more information.
246              
247             =head1 CONSTRUCTOR
248              
249             =over 4
250              
251             =item B<new PARAMS>
252              
253             Constructs a C<Rose::DB::Registry::Entry> object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name.
254              
255             =back
256              
257             =head1 OBJECT METHODS
258              
259             =head2 GENERAL
260              
261             =over 4
262              
263             =item B<autocommit [VALUE]>
264              
265             Get or set the value of the "AutoCommit" connect option.
266              
267             =item B<catalog [CATALOG]>
268              
269             Get or set the database catalog name. This setting is only relevant to databases that support the concept of catalogs.
270              
271             =item B<clone>
272              
273             Returns a clone (i.e., deep copy) of the current object.
274              
275             =item B<connect_option NAME [, VALUE]>
276              
277             Get or set the connect option named NAME. Returns the current value of the connect option.
278              
279             =item B<connect_options [HASHREF | PAIRS]>
280              
281             Get or set the options passed in a hash reference as the fourth argument to the call to C<DBI-E<gt>connect()>. See the C<DBI> documentation for descriptions of the various options.
282              
283             If a reference to a hash is passed, it replaces the connect options hash. If a series of name/value pairs are passed, they are added to the connect options hash.
284              
285             Returns a reference to the hash of options in scalar context, or a list of name/value pairs in list context.
286              
287             =item B<database [NAME]>
288              
289             Get or set the database name.
290              
291             =item B<description [TEXT]>
292              
293             A description of the data source.
294              
295             =item B<domain [DOMAIN]>
296              
297             Get or set the data source domain. Note that changing the C<domain> after a registry entry has been added to the registry has no affect on where the entry appears in the registry.
298              
299             =item B<driver [DRIVER]>
300              
301             Get or set the driver name. The DRIVER argument is converted to lowercase before being set.
302              
303             =item B<dsn [DSN]>
304              
305             Get or set the C<DBI> DSN (Data Source Name). Note that an explicitly set DSN may render some other attributes inaccurate. For example, the DSN may contain a host name that is different than the object's current C<host()> value. I recommend not setting the DSN value explicitly unless you are also willing to manually synchronize (or ignore) the corresponding object attributes.
306              
307             =item B<dump>
308              
309             Returns a reference to a hash of the entry's attributes. Only those attributes with defined values are included in the hash keys. All values are deep copies.
310              
311             =item B<handle_error [VALUE]>
312              
313             Get or set the value of the "HandleError" connect option.
314              
315             =item B<host [NAME]>
316              
317             Get or set the database server host name.
318              
319             =item B<password [PASS]>
320              
321             Get or set the database password.
322              
323             =item B<port [NUM]>
324              
325             Get or set the database server port number.
326              
327             =item B<pre_disconnect_sql [STATEMENTS]>
328              
329             Get or set the SQL statements that will be run immediately before disconnecting from the database. STATEMENTS should be a list or reference to an array of SQL statements. Returns a reference to the array of SQL statements in scalar context, or a list of SQL statements in list context.
330              
331             =item B<post_connect_sql [STATEMENTS]>
332              
333             Get or set the SQL statements that will be run immediately after connecting to the database. STATEMENTS should be a list or reference to an array of SQL statements. Returns a reference to the array of SQL statements in scalar context, or a list of SQL statements in list context.
334              
335             =item B<print_error [VALUE]>
336              
337             Get or set the value of the "PrintError" connect option.
338              
339             =item B<raise_error [VALUE]>
340              
341             Get or set the value of the "RaiseError" connect option.
342              
343             =item B<schema [SCHEMA]>
344              
345             Get or set the database schema name. This setting is only useful to databases that support the concept of schemas (e.g., PostgreSQL).
346              
347             =item B<server_time_zone [TZ]>
348              
349             Get or set the time zone used by the database server software. TZ should be a time zone name that is understood by C<DateTime::TimeZone>. See the C<DateTime::TimeZone> documentation for acceptable values of TZ.
350              
351             =item B<type [TYPE]>
352              
353             Get or set the data source type. Note that changing the C<type> after a registry entry has been added to the registry has no affect on where the entry appears in the registry.
354              
355             =item B<username [NAME]>
356              
357             Get or set the database username.
358              
359             =back
360              
361             =head2 DRIVER-SPECIFIC ATTRIBUTES
362              
363             =head3 MySQL
364              
365             These attributes should only be used with registry entries where the L<driver|/driver> is C<mysql>.
366              
367             =over 4
368              
369             =item B<mysql_auto_reconnect [BOOL]>
370              
371             Get or set the L<mysql_auto_reconnect|DBD::mysql/mysql_auto_reconnect> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
372              
373             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
374              
375             See the L<DBD::mysql|DBD::mysql/mysql_auto_reconnect> documentation to learn more about this attribute.
376              
377             =item B<mysql_client_found_rows [BOOL]>
378              
379             Get or set the L<mysql_client_found_rows|DBD::mysql/mysql_client_found_rows> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
380              
381             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
382              
383             See the L<DBD::mysql|DBD::mysql/mysql_client_found_rows> documentation to learn more about this attribute.
384              
385             =item B<mysql_compression [BOOL]>
386              
387             Get or set the L<mysql_compression|DBD::mysql/mysql_compression> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
388              
389             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
390              
391             See the L<DBD::mysql|DBD::mysql/mysql_compression> documentation to learn more about this attribute.
392              
393             =item B<mysql_connect_timeout [BOOL]>
394              
395             Get or set the L<mysql_connect_timeout|DBD::mysql/mysql_connect_timeout> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
396              
397             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
398              
399             See the L<DBD::mysql|DBD::mysql/mysql_connect_timeout> documentation to learn more about this attribute.
400              
401             =item B<mysql_embedded_groups [STRING]>
402              
403             Get or set the L<mysql_embedded_groups|DBD::mysql/mysql_embedded_groups> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
404              
405             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
406              
407             See the L<DBD::mysql|DBD::mysql/mysql_embedded_groups> documentation to learn more about this attribute.
408              
409             =item B<mysql_embedded_options [STRING]>
410              
411             Get or set the L<mysql_embedded_options|DBD::mysql/mysql_embedded_options> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
412              
413             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
414              
415             See the L<DBD::mysql|DBD::mysql/mysql_embedded_options> documentation to learn more about this attribute.
416              
417             =item B<mysql_enable_utf8 [BOOL]>
418              
419             Get or set the L<mysql_enable_utf8|DBD::mysql/mysql_enable_utf8> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
420              
421             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
422              
423             See the L<DBD::mysql|DBD::mysql/mysql_enable_utf8> documentation to learn more about this attribute.
424              
425             =item B<mysql_enable_utf8mb4 [BOOL]>
426              
427             Get or set the L<mysql_enable_utf8mb4|DBD::mysql/mysql_enable_utf8mb4> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
428              
429             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
430              
431             See the L<DBD::mysql|DBD::mysql/mysql_enable_utf8mb4> documentation to learn more about this attribute.
432              
433             =item B<mysql_local_infile [STRING]>
434              
435             Get or set the L<mysql_local_infile|DBD::mysql/mysql_local_infile> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
436              
437             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
438              
439             See the L<DBD::mysql|DBD::mysql/mysql_local_infile> documentation to learn more about this attribute.
440              
441             =item B<mysql_multi_statements [BOOL]>
442              
443             Get or set the L<mysql_multi_statements|DBD::mysql/mysql_multi_statements> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
444              
445             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
446              
447             See the L<DBD::mysql|DBD::mysql/mysql_multi_statements> documentation to learn more about this attribute.
448              
449             =item B<mysql_read_default_file [STRING]>
450              
451             Get or set the L<mysql_read_default_file|DBD::mysql/mysql_read_default_file> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
452              
453             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
454              
455             See the L<DBD::mysql|DBD::mysql/mysql_read_default_file> documentation to learn more about this attribute.
456              
457             =item B<mysql_read_default_group [STRING]>
458              
459             Get or set the L<mysql_read_default_group|DBD::mysql/mysql_read_default_group> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
460              
461             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
462              
463             See the L<DBD::mysql|DBD::mysql/mysql_read_default_group> documentation to learn more about this attribute.
464              
465             =item B<mysql_socket [STRING]>
466              
467             Get or set the L<mysql_socket|DBD::mysql/mysql_socket> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
468              
469             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
470              
471             See the L<DBD::mysql|DBD::mysql/mysql_socket> documentation to learn more about this attribute.
472              
473             =item B<mysql_ssl [BOOL]>
474              
475             Get or set the L<mysql_ssl|DBD::mysql/mysql_ssl> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
476              
477             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
478              
479             See the L<DBD::mysql|DBD::mysql/mysql_ssl> documentation to learn more about this attribute.
480              
481             =item B<mysql_ssl_ca_file [STRING]>
482              
483             Get or set the L<mysql_ssl_ca_file|DBD::mysql/mysql_ssl_ca_file> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
484              
485             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
486              
487             See the L<DBD::mysql|DBD::mysql/mysql_ssl_ca_file> documentation to learn more about this attribute.
488              
489             =item B<mysql_ssl_ca_path [STRING]>
490              
491             Get or set the L<mysql_ssl_ca_path|DBD::mysql/mysql_ssl_ca_path> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
492              
493             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
494              
495             See the L<DBD::mysql|DBD::mysql/mysql_ssl_ca_path> documentation to learn more about this attribute.
496              
497             =item B<mysql_ssl_cipher [STRING]>
498              
499             Get or set the L<mysql_ssl_cipher|DBD::mysql/mysql_ssl_cipher> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
500              
501             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
502              
503             See the L<DBD::mysql|DBD::mysql/mysql_ssl_cipher> documentation to learn more about this attribute.
504              
505             =item B<mysql_ssl_client_cert [STRING]>
506              
507             Get or set the L<mysql_ssl_client_cert|DBD::mysql/mysql_ssl_client_cert> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
508              
509             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
510              
511             See the L<DBD::mysql|DBD::mysql/mysql_ssl_client_cert> documentation to learn more about this attribute.
512              
513             =item B<mysql_ssl_client_key [STRING]>
514              
515             Get or set the L<mysql_ssl_client_key|DBD::mysql/mysql_ssl_client_key> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
516              
517             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
518              
519             See the L<DBD::mysql|DBD::mysql/mysql_ssl_client_key> documentation to learn more about this attribute.
520              
521             =item B<mysql_use_result [BOOL]>
522              
523             Get or set the L<mysql_use_result|DBD::mysql/mysql_use_result> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::mysql> chooses.
524              
525             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
526              
527             See the L<DBD::mysql|DBD::mysql/mysql_use_result> documentation to learn more about this attribute.
528              
529             =back
530              
531             =head3 PostgreSQL
532              
533             These attributes should only be used with registry entries where the L<driver|/driver> is C<pg>.
534              
535             =over 4
536              
537             =item B<european_dates [BOOL]>
538              
539             Get or set the boolean value that determines whether or not dates are assumed to be in european dd/mm/yyyy format. The default is to assume US mm/dd/yyyy format (because this is the default for PostgreSQL).
540              
541             This value will be passed to L<DateTime::Format::Pg> as the value of the C<european> parameter in the call to the constructor C<new()>. This L<DateTime::Format::Pg> object is used by L<Rose::DB::Pg> to parse and format date-related column values in methods like L<parse_date|Rose::DB/parse_date>, L<format_date|Rose::DB/format_date>, etc.
542              
543             =item B<pg_enable_utf8 [BOOL]>
544              
545             Get or set the L<pg_enable_utf8|DBD::Pg/pg_enable_utf8> database handle attribute. This is set directly on the L<dbh|Rose::DB/dbh>, if one exists. Otherwise, it will be set when the L<dbh|Rose::DB/dbh> is created. If no value for this attribute is defined (the default) then it will not be set when the L<dbh|Rose::DB/dbh> is created, deferring instead to whatever default value L<DBD::Pg> chooses.
546              
547             Returns the value of this attribute in the L<dbh|Rose::DB/dbh>, if one exists, or the value that will be set when the L<dbh|Rose::DB/dbh> is next created.
548              
549             See the L<DBD::Pg|DBD::Pg/pg_enable_utf8> documentation to learn more about this attribute.
550              
551             =item B<sslmode [MODE]>
552              
553             Get or set the SSL mode of the connection. Valid values for MODE are C<disable>, C<allow>, C<prefer>, and C<require>. See the L<DBD::Pg|DBD::Pg/connect> documentation to learn more about this attribute.
554              
555             =back
556              
557             =head3 SQLite
558              
559             These attributes should only be used with registry entries where the L<driver|/driver> is C<sqlite>.
560              
561             =over 4
562              
563             =item B<auto_create [BOOL]>
564              
565             Get or set a boolean value indicating whether or not a new SQLite L<database|Rose::DB/database> should be created if it does not already exist. Defaults to true.
566              
567             If false, and if the specified L<database|Rose::DB/database> does not exist, then a fatal error will occur when an attempt is made to L<connect|Rose::DB/connect> to the database.
568              
569             =back
570              
571             =head1 AUTHOR
572              
573             John C. Siracusa (siracusa@gmail.com)
574              
575             =head1 LICENSE
576              
577             Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is
578             free software; you can redistribute it and/or modify it under the same terms
579             as Perl itself.