/
DatabaseDefault
80 lines (72 loc) · 1.99 KB
/
DatabaseDefault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
__NAME__ purpose
specify default settings for Database directives
__END__
__NAME__ see also
Database, Replace
__END__
__NAME__ description
The directive defines default parameters for a database.
</para><para>
For a list of possible parameters (keys), see the &conf-Database; directive.
</para><para>
&conf-DatabaseDefault; accepts any scalar setting, which means all
<emphasis role='bold'>except</emphasis>:
<itemizedlist>
<listitem><para>
ALTERNATE_*
</para></listitem>
<listitem><para>
BINARY
</para></listitem>
<listitem><para>
COLUMN_DEF
</para></listitem>
<listitem><para>
DEFAULT
</para></listitem>
<listitem><para>
FIELD_ALIAS
</para></listitem>
<listitem><para>
FILTER_*
</para></listitem>
<listitem><para>
NAME
</para></listitem>
<listitem><para>
NUMERIC
</para></listitem>
<listitem><para>
POSTCREATE
</para></listitem>
<listitem><para>
WRITE_CATALOG
</para></listitem>
</itemizedlist>
__END__
__NAME__ notes
Those defaults settings are made when the table is initially defined, so explicit
settings for the database itself override the defaults, of course.
</para><para>
The setting must be made <emphasis role='bold'>before</emphasis> the database is defined using the
&conf-Database; directive. For a way to clear definitions, use the &conf-Replace; directive.
__END__
__NAME__ example: Specify default SQL connection username and password
Most &IC; applications use only one &glos-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 &ccf; setting:
<programlisting>
DatabaseDefault USER interchange
DatabaseDefault PASS nevairbe
</programlisting>
__END__
__NAME__ example: Specifying WRITE_CONTROL and WRITE_TAGGED defaults
<programlisting>
DatabaseDefault WRITE_CONTROL 1
DatabaseDefault WRITE_TAGGED 1
</programlisting>
__END__
__NAME__ example: Clearing default values
Replace DatabaseDefault
__END__