Rose-DB
view release on metacpan or search on metacpan
lib/Rose/DB/Registry/Entry.pm view on Meta::CPAN
use Rose::Object;
our @ISA = qw(Rose::Object);
our $VERSION = '0.784';
our $Debug = 0;
#
# Object data
#
our %Attrs;
BEGIN
{
our %Attrs =
(
# Generic
catalog => { type => 'scalar' },
database => { type => 'scalar' },
dbi_driver => { type => 'scalar' },
description => { type => 'scalar' },
domain => { type => 'scalar' },
driver => { type => 'scalar', make_method => 0 },
dsn => { type => 'scalar' },
host => { type => 'scalar' },
password => { type => 'scalar' },
port => { type => 'scalar' },
schema => { type => 'scalar' },
server_time_zone => { type => 'scalar' },
type => { type => 'scalar' },
username => { type => 'scalar' },
connect_options => { type => 'hash', method_spec => { interface => 'get_set_init' } },
pre_disconnect_sql => { type => 'array' },
post_connect_sql => { type => 'array' },
# Oracle
service => { type => 'scalar' },
# Pg
european_dates => { type => 'boolean', method_spec => { default => 0 } },
pg_enable_utf8 => { type => 'boolean' },
options => { type => 'scalar' },
service => { type => 'scalar' },
sslmode => { type => 'scalar' },
# SQLite
auto_create => { type => 'boolean', method_spec => { default => 1 } },
sqlite_unicode => { type => 'boolean' },
# MySQL
mysql_auto_reconnect => { type => 'boolean' },
mysql_client_found_rows => { type => 'boolean' },
mysql_compression => { type => 'boolean' },
mysql_connect_timeout => { type => 'boolean' },
mysql_embedded_groups => { type => 'scalar' },
mysql_embedded_options => { type => 'scalar' },
mysql_enable_utf8 => { type => 'boolean' },
mysql_enable_utf8mb4 => { type => 'boolean' },
mysql_local_infile => { type => 'scalar' },
mysql_multi_statements => { type => 'boolean' },
mysql_read_default_file => { type => 'scalar' },
mysql_read_default_group => { type => 'scalar' },
mysql_socket => { type => 'scalar' },
mysql_ssl => { type => 'boolean' },
mysql_ssl_ca_file => { type => 'scalar' },
mysql_ssl_ca_path => { type => 'scalar' },
mysql_ssl_cipher => { type => 'scalar' },
mysql_ssl_client_cert => { type => 'scalar' },
mysql_ssl_client_key => { type => 'scalar' },
mysql_use_result => { type => 'boolean' },
mysql_bind_type_guessing => { type => 'boolean' },
);
}
sub _attrs
{
my(%args) = @_;
my $type = $args{'type'};
# Type filter first
my @attrs =
$type ? (grep { $Attrs{$_}{'type'} eq $type } keys(%Attrs)) : keys(%Attrs);
if($args{'with_defaults'})
{
@attrs = grep
{
$Attrs{$_}{'method_spec'} &&
defined $Attrs{$_}{'method_spec'}{'default'}
}
@attrs;
}
elsif($args{'no_defaults'})
{
@attrs = grep
{
!$Attrs{$_}{'method_spec'} ||
!defined $Attrs{$_}{'method_spec'}{'default'}
}
@attrs;
}
return wantarray ? @attrs : \@attrs;
}
sub _attr_method_specs
{
my $attrs = _attrs(@_);
my @specs;
foreach my $attr (@$attrs)
{
next if(exists $Attrs{$attr}{'make_method'} && !$Attrs{$attr}{'make_method'});
if(my $spec = $Attrs{$attr}{'method_spec'})
{
lib/Rose/DB/Registry/Entry.pm view on Meta::CPAN
Get or set the database username.
=back
=head2 DRIVER-SPECIFIC ATTRIBUTES
=head3 MySQL
These attributes should only be used with registry entries where the L<driver|/driver> is C<mysql>.
=over 4
=item B<mysql_auto_reconnect [BOOL]>
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 th...
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.
See the L<DBD::mysql|DBD::mysql/mysql_auto_reconnect> documentation to learn more about this attribute.
=item B<mysql_client_found_rows [BOOL]>
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 ...
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.
See the L<DBD::mysql|DBD::mysql/mysql_client_found_rows> documentation to learn more about this attribute.
=item B<mysql_compression [BOOL]>
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 att...
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.
See the L<DBD::mysql|DBD::mysql/mysql_compression> documentation to learn more about this attribute.
=item B<mysql_connect_timeout [BOOL]>
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 ...
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.
See the L<DBD::mysql|DBD::mysql/mysql_connect_timeout> documentation to learn more about this attribute.
=item B<mysql_embedded_groups [STRING]>
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 ...
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.
See the L<DBD::mysql|DBD::mysql/mysql_embedded_groups> documentation to learn more about this attribute.
=item B<mysql_embedded_options [STRING]>
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 fo...
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.
See the L<DBD::mysql|DBD::mysql/mysql_embedded_options> documentation to learn more about this attribute.
=item B<mysql_enable_utf8 [BOOL]>
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 att...
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.
See the L<DBD::mysql|DBD::mysql/mysql_enable_utf8> documentation to learn more about this attribute.
=item B<mysql_enable_utf8mb4 [BOOL]>
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 th...
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.
See the L<DBD::mysql|DBD::mysql/mysql_enable_utf8mb4> documentation to learn more about this attribute.
=item B<mysql_local_infile [STRING]>
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 a...
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.
See the L<DBD::mysql|DBD::mysql/mysql_local_infile> documentation to learn more about this attribute.
=item B<mysql_multi_statements [BOOL]>
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 fo...
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.
See the L<DBD::mysql|DBD::mysql/mysql_multi_statements> documentation to learn more about this attribute.
=item B<mysql_read_default_file [STRING]>
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 ...
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.
See the L<DBD::mysql|DBD::mysql/mysql_read_default_file> documentation to learn more about this attribute.
=item B<mysql_read_default_group [STRING]>
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 valu...
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.
See the L<DBD::mysql|DBD::mysql/mysql_read_default_group> documentation to learn more about this attribute.
=item B<mysql_socket [STRING]>
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 ...
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.
See the L<DBD::mysql|DBD::mysql/mysql_socket> documentation to learn more about this attribute.
=item B<mysql_ssl [BOOL]>
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 define...
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.
See the L<DBD::mysql|DBD::mysql/mysql_ssl> documentation to learn more about this attribute.
=item B<mysql_ssl_ca_file [STRING]>
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 att...
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.
See the L<DBD::mysql|DBD::mysql/mysql_ssl_ca_file> documentation to learn more about this attribute.
=item B<mysql_ssl_ca_path [STRING]>
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 att...
( run in 0.547 second using v1.01-cache-2.11-cpan-5837b0d9d2c )