RapidApp
view release on metacpan or search on metacpan
lib/Plack/App/RapidApp/rDbic.pm view on Meta::CPAN
This has the same effect as C<-o> options supplied to L<dbicdump>. For a complete list of
suported options, see L<DBIx::Class::Schema::Loader::Base>.
=head2 connect_options
Optional ArrayRef of connect_options to be added to the C<%extra_attributes> of the C<connect_info>.
(See L<DBIx::Class::Storage::DBI/connect_info>). Like C<loader_options>, these should be supplied
as a list of name=value pairs, for example:
connect_options => [qw/quote_names=0 mysql_enable_utf8=0/]
Note: the options in the above example are both set to C<'1'> by default (second only for MySQL).
So the above example is how you would go about turning these options off if needed for some reason.
=head2 total_counts_off
If set to true, grids will be initialized with the total count turned off (but they can still
be turned back on). Defaults to false (0)
=head1 SEE ALSO
lib/RapidApp/Helper/Traits/RapidDbic.pm view on Meta::CPAN
}
my $connect_opt_defaults = [];
if($connect_info[0] && $connect_info[0] =~ /^dbi\:SQLite\:/) {
# Turn on unicode and forein keys for SQLite:
$connect_opt_defaults = [qw/sqlite_unicode=1 on_connect_call=use_foreign_keys/];
}
elsif($connect_info[0] && $connect_info[0] =~ /^dbi\:mysql\:/) {
# Turn on unicode and auto-reconnect for MySQL:
$connect_opt_defaults = [qw/mysql_enable_utf8=1 mysql_auto_reconnect=1/];
}
# TODO: add default opts for pgsql, etc
#...
unshift @$connect_opt_defaults, 'quote_names=1';
my @connect_opts = $self->_normalize_option_list(
$opts->{'connect-option'} || [],
$connect_opt_defaults
);
( run in 0.294 second using v1.01-cache-2.11-cpan-00829025b61 )