Skip to content

Commit c154209

Browse files
committed
MongoDB: document readonly properties
1 parent 8352249 commit c154209

20 files changed

+1773
-17
lines changed

reference/mongodb/mongodb/driver/exception/bulkwriteexception.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<!-- }}} -->
4343
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
4444
<fieldsynopsis>
45-
<modifier>protected</modifier>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
4647
<type>MongoDB\Driver\WriteResult</type>
4748
<varname linkend="mongodb-driver-exception-bulkwriteexception.props.writeresult">writeResult</varname>
4849
</fieldsynopsis>
@@ -96,6 +97,13 @@
9697
</row>
9798
</thead>
9899
<tbody>
100+
<row>
101+
<entry>PECL mongodb 2.3.0</entry>
102+
<entry>
103+
The <varname>writeResult</varname> property is now
104+
<modifier>public</modifier> <modifier>readonly</modifier>.
105+
</entry>
106+
</row>
99107
<row>
100108
<entry>PECL mongodb 2.0.0</entry>
101109
<entry>

reference/mongodb/mongodb/driver/exception/commandexception.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<!-- }}} -->
4343
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
4444
<fieldsynopsis>
45-
<modifier>protected</modifier>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
4647
<type>object</type>
4748
<varname linkend="mongodb-driver-exception-commandexception.props.resultdocument">resultDocument</varname>
4849
</fieldsynopsis>
@@ -84,6 +85,31 @@
8485
</section>
8586
<!-- }}} -->
8687

88+
<section role="changelog">
89+
&reftitle.changelog;
90+
<para>
91+
<informaltable>
92+
<tgroup cols="2">
93+
<thead>
94+
<row>
95+
<entry>&Version;</entry>
96+
<entry>&Description;</entry>
97+
</row>
98+
</thead>
99+
<tbody>
100+
<row>
101+
<entry>PECL mongodb 2.3.0</entry>
102+
<entry>
103+
The <varname>resultDocument</varname> property is now
104+
<modifier>public</modifier> <modifier>readonly</modifier>.
105+
</entry>
106+
</row>
107+
</tbody>
108+
</tgroup>
109+
</informaltable>
110+
</para>
111+
</section>
112+
87113
</partintro>
88114

89115
&reference.mongodb.mongodb.driver.exception.entities.commandexception;

reference/mongodb/mongodb/driver/monitoring/commandfailedevent.xml

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,199 @@
3333
</ooclass>
3434
</classsynopsisinfo>
3535
<!-- }}} -->
36-
36+
37+
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
38+
<fieldsynopsis>
39+
<modifier>public</modifier>
40+
<modifier>readonly</modifier>
41+
<type>string</type>
42+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.host">host</varname>
43+
</fieldsynopsis>
44+
<fieldsynopsis>
45+
<modifier>public</modifier>
46+
<modifier>readonly</modifier>
47+
<type>int</type>
48+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.port">port</varname>
49+
</fieldsynopsis>
50+
<fieldsynopsis>
51+
<modifier>public</modifier>
52+
<modifier>readonly</modifier>
53+
<type>string</type>
54+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.commandname">commandName</varname>
55+
</fieldsynopsis>
56+
<fieldsynopsis>
57+
<modifier>public</modifier>
58+
<modifier>readonly</modifier>
59+
<type>string</type>
60+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.databasename">databaseName</varname>
61+
</fieldsynopsis>
62+
<fieldsynopsis>
63+
<modifier>public</modifier>
64+
<modifier>readonly</modifier>
65+
<type>int</type>
66+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.duration">duration</varname>
67+
</fieldsynopsis>
68+
<fieldsynopsis>
69+
<modifier>public</modifier>
70+
<modifier>readonly</modifier>
71+
<type>Exception</type>
72+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.error">error</varname>
73+
</fieldsynopsis>
74+
<fieldsynopsis>
75+
<modifier>public</modifier>
76+
<modifier>readonly</modifier>
77+
<type>object</type>
78+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.reply">reply</varname>
79+
</fieldsynopsis>
80+
<fieldsynopsis>
81+
<modifier>public</modifier>
82+
<modifier>readonly</modifier>
83+
<type>string</type>
84+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.operationid">operationId</varname>
85+
</fieldsynopsis>
86+
<fieldsynopsis>
87+
<modifier>public</modifier>
88+
<modifier>readonly</modifier>
89+
<type>string</type>
90+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.requestid">requestId</varname>
91+
</fieldsynopsis>
92+
<fieldsynopsis>
93+
<modifier>public</modifier>
94+
<modifier>readonly</modifier>
95+
<type class="union"><type>MongoDB\BSON\ObjectId</type><type>null</type></type>
96+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.serviceid">serviceId</varname>
97+
</fieldsynopsis>
98+
<fieldsynopsis>
99+
<modifier>public</modifier>
100+
<modifier>readonly</modifier>
101+
<type class="union"><type>int</type><type>null</type></type>
102+
<varname linkend="mongodb-driver-monitoring-commandfailedevent.props.serverconnectionid">serverConnectionId</varname>
103+
</fieldsynopsis>
104+
37105
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
38106
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-driver-monitoring-commandfailedevent')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
39107
</classsynopsis>
40108
<!-- }}} -->
41109

42110
</section>
43111

112+
<!-- {{{ MongoDB\Driver\Monitoring\CommandFailedEvent properties -->
113+
<section xml:id="mongodb-driver-monitoring-commandfailedevent.props">
114+
&reftitle.properties;
115+
<variablelist>
116+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.host">
117+
<term><varname>host</varname></term>
118+
<listitem>
119+
<para>The hostname of the server that executed the command.</para>
120+
</listitem>
121+
</varlistentry>
122+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.port">
123+
<term><varname>port</varname></term>
124+
<listitem>
125+
<para>The port of the server that executed the command.</para>
126+
</listitem>
127+
</varlistentry>
128+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.commandname">
129+
<term><varname>commandName</varname></term>
130+
<listitem>
131+
<para>The command name.</para>
132+
</listitem>
133+
</varlistentry>
134+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.databasename">
135+
<term><varname>databaseName</varname></term>
136+
<listitem>
137+
<para>The database name.</para>
138+
</listitem>
139+
</varlistentry>
140+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.duration">
141+
<term><varname>duration</varname></term>
142+
<listitem>
143+
<para>
144+
The duration of the command in microseconds. The duration is a
145+
calculated value that includes the time to send the message and
146+
receive the response from the server.
147+
</para>
148+
</listitem>
149+
</varlistentry>
150+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.error">
151+
<term><varname>error</varname></term>
152+
<listitem>
153+
<para>The exception that was thrown when the command failed.</para>
154+
</listitem>
155+
</varlistentry>
156+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.reply">
157+
<term><varname>reply</varname></term>
158+
<listitem>
159+
<para>The failure reply document returned by the server.</para>
160+
</listitem>
161+
</varlistentry>
162+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.operationid">
163+
<term><varname>operationId</varname></term>
164+
<listitem>
165+
<para>
166+
The operation ID. This may be used to link events together such as
167+
bulk writes, which may dispatch multiple commands.
168+
</para>
169+
</listitem>
170+
</varlistentry>
171+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.requestid">
172+
<term><varname>requestId</varname></term>
173+
<listitem>
174+
<para>
175+
The request ID. This may be used to associate this
176+
<classname>MongoDB\Driver\Monitoring\CommandFailedEvent</classname>
177+
with a corresponding
178+
<classname>MongoDB\Driver\Monitoring\CommandStartedEvent</classname>.
179+
</para>
180+
</listitem>
181+
</varlistentry>
182+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.serviceid">
183+
<term><varname>serviceId</varname></term>
184+
<listitem>
185+
<para>
186+
The service ID, or &null; if the server does not support it (i.e.
187+
not using load-balanced mode).
188+
</para>
189+
</listitem>
190+
</varlistentry>
191+
<varlistentry xml:id="mongodb-driver-monitoring-commandfailedevent.props.serverconnectionid">
192+
<term><varname>serverConnectionId</varname></term>
193+
<listitem>
194+
<para>
195+
The server connection ID, or &null; if not available.
196+
</para>
197+
</listitem>
198+
</varlistentry>
199+
</variablelist>
200+
</section>
201+
<!-- }}} -->
202+
203+
<section role="changelog">
204+
&reftitle.changelog;
205+
<para>
206+
<informaltable>
207+
<tgroup cols="2">
208+
<thead>
209+
<row>
210+
<entry>&Version;</entry>
211+
<entry>&Description;</entry>
212+
</row>
213+
</thead>
214+
<tbody>
215+
<row>
216+
<entry>PECL mongodb 2.3.0</entry>
217+
<entry>
218+
Added public <modifier>readonly</modifier> properties. The
219+
<varname>duration</varname> property replaces the
220+
<methodname>getDurationMicros</methodname> method.
221+
</entry>
222+
</row>
223+
</tbody>
224+
</tgroup>
225+
</informaltable>
226+
</para>
227+
</section>
228+
44229
</partintro>
45230

46231
&reference.mongodb.mongodb.driver.monitoring.entities.commandfailedevent;

0 commit comments

Comments
 (0)