DatabaseDefault — specify default settings for Database directives
The directive defines default parameters for a database.
For a list of possible parameters (keys), see the Database
directive.
DatabaseDefault
accepts scalar keys, which actually
means all from the list above except:
ALTERNATE_*
BINARY
COLUMN_DEF
DEFAULT
FIELD_ALIAS
FILTER_*
NAME
NUMERIC
POSTCREATE
WRITE_CATALOG
Example: Specify default SQL connection username and password
Most Interchange applications use only one SQL database. In that case,
it is handy to specify the default SQL username and password once, instead of
repeating it for each table separately.
Here's a possible catalog.cfg
setting:
DatabaseDefault USER interchange DatabaseDefault PASS nevairbe
Example: Specifying WRITE_CONTROL and WRITE_TAGGED defaults
DatabaseDefault WRITE_CONTROL 1 DatabaseDefault WRITE_TAGGED 1
Example: Specifying defaults in here-document style
DatabaseDefault <<EOD WRITE_CONTROL 1 WRITE_TAGGED 1 HIDE_AUTO_FILES 1 EOD
Those default settings are made when the table is initially defined, so explicit settings for the database itself override the defaults, of course.
To have the intended effect, this directive must be set before the appropriate
databases are defined with the Database
directive.
For a way to clear definitions, use the Replace
directive.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 3188 (context shows lines 3188-3205)
sub parse_hash { my($item,$settings) = @_; if (! $settings) { return $HashDefaultBlank{$item} ? '' : {}; } my $c; if(defined $C) { $c = $C->{$item} || {}; } else { no strict 'refs'; $c = ${"Global::$item"} || {}; } return hash_string($settings,$c); }