reference/dba/functions/dba-popen.xml
9264401165d31437c4afd80ec936f775ae23d367
...
...
@@ -8,11 +8,13 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>dba_popen</methodname>
11
+
<type class="union"><type>resource</type><type>false</type></type><methodname>dba_popen</methodname>
12
12
<methodparam><type>string</type><parameter>path</parameter></methodparam>
13
13
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>handler</parameter></methodparam>
15
-
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>handler</parameter><initializer>&null;</initializer></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>permission</parameter><initializer>0644</initializer></methodparam>
16
+
<methodparam choice="opt"><type>int</type><parameter>map_size</parameter><initializer>0</initializer></methodparam>
17
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>flags</parameter><initializer>&null;</initializer></methodparam>
16
18
</methodsynopsis>
17
19
<para>
18
20
<function>dba_popen</function> establishes a persistent database instance
...
...
@@ -20,6 +22,7 @@
20
22
<parameter>handler</parameter>.
21
23
</para>
22
24
</refsect1>
25
+

23
26
<refsect1 role="parameters">
24
27
&reftitle.parameters;
25
28
<para>
...
...
@@ -50,19 +53,102 @@
50
53
The name of the <link linkend="dba.requirements">handler</link> which
51
54
shall be used for accessing <parameter>path</parameter>. It is passed
52
55
all optional parameters given to <function>dba_popen</function> and
53
-
can act on behalf of them.
56
+
can act on behalf of them. If <parameter>handler</parameter> is &null;,
57
+
then the default handler is invoked.
58
+
</para>
59
+
</listitem>
60
+
</varlistentry>
61
+
<varlistentry>
62
+
<term><parameter>permission</parameter></term>
63
+
<listitem>
64
+
<para>
65
+
Optional &integer; parameter which is passed to the driver. It has the same meaning as
66
+
the <parameter>permissions</parameter> parameter of <function>chmod</function>,
67
+
and defaults to <literal>0644</literal>.
68
+
</para>
69
+
<para>
70
+
The <literal>db1</literal>, <literal>db2</literal>, <literal>db3</literal>,
71
+
<literal>db4</literal>, <literal>dbm</literal>, <literal>gdbm</literal>,
72
+
<literal>ndbm</literal>, and <literal>lmdb</literal> drivers support the
73
+
<parameter>permission</parameter> parameter.
74
+
</para>
75
+
</listitem>
76
+
</varlistentry>
77
+
<varlistentry>
78
+
<term><parameter>map_size</parameter></term>
79
+
<listitem>
80
+
<para>
81
+
Optional &integer; parameter which is passed to the driver. Its value should be a multiple of the
82
+
page size of the OS, or zero, to use the default mapsize.
83
+
</para>
84
+
<para>
85
+
The <literal>lmdb</literal> driver accepts the <parameter>map_size</parameter> parameter.
86
+
</para>
87
+
</listitem>
88
+
</varlistentry>
89
+
<varlistentry>
90
+
<term><parameter>flags</parameter></term>
91
+
<listitem>
92
+
<para>
93
+
Allows to pass flags to the DB drivers. Currently, only LMDB with
94
+
<constant>DBA_LMDB_USE_SUB_DIR</constant> and <constant>DBA_LMDB_NO_SUB_DIR</constant> are supported.
54
95
</para>
55
96
</listitem>
56
97
</varlistentry>
57
98
</variablelist>
58
99
</para>
59
100
</refsect1>
101
+

60
102
<refsect1 role="returnvalues">
61
103
&reftitle.returnvalues;
62
104
<para>
63
105
Returns a positive handle on success&return.falseforfailure;.
64
106
</para>
65
107
</refsect1>
108
+

109
+
<refsect1 role="errors">
110
+
&reftitle.errors;
111
+
<para>
112
+
&false; is returned and an <constant>E_WARNING</constant> level error is issued when
113
+
<parameter>handler</parameter> is &null;, but there is no default handler.
114
+
</para>
115
+
</refsect1>
116
+

117
+
<refsect1 role="changelog">
118
+
&reftitle.changelog;
119
+
<informaltable>
120
+
<tgroup cols="2">
121
+
<thead>
122
+
<row>
123
+
<entry>&Version;</entry>
124
+
<entry>&Description;</entry>
125
+
</row>
126
+
</thead>
127
+
<tbody>
128
+
<row>
129
+
<entry>8.2.0</entry>
130
+
<entry>
131
+
<parameter>flags</parameter> is added.
132
+
</entry>
133
+
</row>
134
+
<row>
135
+
<entry>8.1.0</entry>
136
+
<entry>
137
+
<parameter>handler</parameter> is now nullable.
138
+
</entry>
139
+
</row>
140
+
<row>
141
+
<entry>7.3.14, 7.4.2</entry>
142
+
<entry>
143
+
The <literal>lmdb</literal> driver now supports an additional <parameter>map_size</parameter>
144
+
parameter.
145
+
</entry>
146
+
</row>
147
+
</tbody>
148
+
</tgroup>
149
+
</informaltable>
150
+
</refsect1>
151
+

66
152
<refsect1 role="seealso">
67
153
&reftitle.seealso;
68
154
<para>
...
...
@@ -73,7 +159,6 @@
73
159
</para>
74
160
</refsect1>
75
161
</refentry>
76
-

77
162
<!-- Keep this comment at the end of the file
78
163
Local variables:
79
164
mode: sgml
80
165