Skip to content

Commit 4399d33

Browse files
committed
docs: 8.0.6 updates - part 2
1 parent 70a4848 commit 4399d33

File tree

10 files changed

+631
-323
lines changed

10 files changed

+631
-323
lines changed

cdk/parser/uri_parser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ struct URI_parser::Guard
277277

278278

279279
/*
280-
Character classess defined by the grammar.
280+
Character classes defined by the grammar.
281281
*/
282282

283283
#define LIST(X,Y) T_##X,

doc/devapi_ref.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ a result (ignored here; the results are used later).
9191
To insert documents use the @link mysqlx::Collection::add
9292
`Collection::add()`@endlink method. Documents are described by JSON strings
9393
using the same syntax as MySQL Server. Note that double quotes are required
94-
around field names and they must be escaped inside C strings:
94+
around field names and they must be escaped inside C strings, unless the new
95+
C++11 `R"(...)"` string literal syntax is used as in the example below:
9596

9697
@skipline {
9798
@until cout

include/devapi/collection_crud.h

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
@file
3030
Declarations for CRUD operations on document collections.
3131
32-
Classes declared here represent CRUD operations on a given document
32+
Classes declared here represent CRUD operations on a document
3333
collection. An Object of a class such as CollectionAdd represents
34-
a "yet-to-be-executed" operation and stores all the parameters for the
34+
a "yet-to-be-executed" operation and stores all the parameters of the
3535
operation. The operation is sent to server for execution only when
3636
`execute()` method is called.
3737
@@ -51,9 +51,11 @@
5151
CRUD operation objects have methods which can modify the operation
5252
before it gets executed. For example `CollectionAdd::add()`
5353
appends a document to the list of documents that should be added
54-
by given CollectionAdd operation. These methods can be chained
54+
by the given CollectionAdd operation. These methods can be chained
5555
as allowed by the fluent API grammar.
5656
57+
@internal
58+
5759
The order of fluent API calls is expressed by base classes, such as
5860
Collection_find_base, which are composed from CRUD templates defined
5961
in crud.h. The order of templates determines the allowed order of fluent
@@ -104,17 +106,17 @@ struct Collection_add_base
104106

105107

106108
/**
107-
Operation which adds documents to a collection.
109+
An operation which adds documents to a collection.
108110
109111
Documents to be added by this operation are specified with various variants
110112
of `add()` method.
111113
112114
Each document must have a unique identifier which is stored in `_id`
113115
field of the document. Document identifiers are character strings no longer
114116
than 32 characters. If added document does not have `_id` field, a unique
115-
identifier is generated for it. Document identifier generated by given
117+
identifier is generated for it. Document identifier generated by a given
116118
collection add operation can be examined using `Result::getDocumentIds()`
117-
method. Generated document identifiers are string of 32 hexadecimal digits,
119+
method. Generated document identifiers are strings of 32 hexadecimal digits,
118120
like this one `0512020981044082E6119DFA0E4C0584`.
119121
120122
@note Generated document identifiers are based on UUIDs but they are not
@@ -140,7 +142,7 @@ DLL_WARNINGS_POP
140142
public:
141143

142144
/**
143-
Create empty add operation for a given collection.
145+
Create an empty add operation for the given collection.
144146
*/
145147

146148
CollectionAdd(Collection &coll);
@@ -157,9 +159,7 @@ DLL_WARNINGS_POP
157159

158160

159161
/**
160-
Add all documents from a range defined by two iterators. These
161-
iterators should return a document object of one of accepted types
162-
(as given by the is_doc_type<> trait).
162+
Add all documents from a range defined by two iterators.
163163
*/
164164

165165
template <typename It>
@@ -241,7 +241,7 @@ struct Collection_remove_base
241241

242242

243243
/**
244-
Class representing operation which removes documents from a collection.
244+
An operation which removes documents from a collection.
245245
246246
@ingroup devapi_op
247247
@@ -257,17 +257,19 @@ class PUBLIC_API CollectionRemove
257257
public:
258258

259259
/**
260-
Create empty remove operation for a given collection.
260+
Create an empty remove operation for the given collection.
261261
*/
262262

263263
CollectionRemove(Collection &coll);
264264

265265
/**
266-
Create remove operation for given collection and documents
267-
selected by an expression.
266+
Create an operation which removes selected documnets from the given
267+
collection.
268+
269+
Documents to be removed are specified by the given Boolean expression.
268270
*/
269271

270-
CollectionRemove(Collection &coll, const string&);
272+
CollectionRemove(Collection &coll, const string &expr);
271273

272274

273275
CollectionRemove(const internal::Collection_remove_cmd &other)
@@ -308,7 +310,7 @@ struct Collection_find_base
308310

309311

310312
/**
311-
Operation which returns all or selected documents from a collection.
313+
An operation which returns all or selected documents from a collection.
312314
313315
@ingroup devapi_op
314316
*/
@@ -327,17 +329,19 @@ DLL_WARNINGS_POP
327329
public:
328330

329331
/**
330-
Create operation which returns all documents from a collection.
332+
Create an operation which returns all documents from the given collection.
331333
*/
332334

333335
CollectionFind(Collection &coll);
334336

335337
/**
336-
Create operation which returns all documents from a collection
337-
which satisfy given criteria.
338+
Create an operation which returns selected documents from the given
339+
collection.
340+
341+
Documents to be returned are specified by the given Boolean expression.
338342
*/
339343

340-
CollectionFind(Collection &coll, const string&);
344+
CollectionFind(Collection &coll, const string &expr);
341345

342346

343347
CollectionFind(const internal::Collection_find_cmd &other)
@@ -354,7 +358,7 @@ DLL_WARNINGS_POP
354358
public:
355359

356360
/**
357-
Specify projection for the documents found by this query.
361+
Specify a projection for the documents returned by this operation.
358362
359363
Projection is either a single document expression given by `expr(<string>)`
360364
or a list (or collection) of strings of the form
@@ -415,7 +419,7 @@ struct Collection_replace_base
415419
{};
416420

417421
/*
418-
Operation which replaces a document, using the id by a new one
422+
An operation which replaces a single document with a new one.
419423
*/
420424

421425
class PUBLIC_API CollectionReplace
@@ -456,7 +460,7 @@ class PUBLIC_API CollectionReplace
456460

457461

458462
/**
459-
Operation which modifies all or selected documents in a collection.
463+
An operation which modifies all or selected documents in a collection.
460464
461465
@ingroup devapi_op
462466
*/
@@ -467,7 +471,12 @@ class PUBLIC_API CollectionModify
467471

468472
public:
469473

470-
/// Create operation which modifies selected documents in a collection.
474+
/**
475+
Create an operation which modifies selected documents in the given
476+
collection.
477+
478+
Documents to be modified are specified by the given Boolean expression.
479+
*/
471480

472481
CollectionModify(Collection &base, const string &expr);
473482

@@ -484,10 +493,11 @@ class PUBLIC_API CollectionModify
484493

485494

486495
/**
487-
Set a given field in a document to the given value.
496+
Set the given field in a document to the given value.
488497
489-
Field is given by a document path. The value can be either a direct literal
490-
or an expression given by `expr(<string>)`, evaluated on the server.
498+
The field is given by a document path. The value can be either a direct
499+
literal or an expression given as `expr(<string>)`, to be evaluated on
500+
the server.
491501
*/
492502

493503
CollectionModify& set(const Field &field, internal::ExprValue &&val)
@@ -500,7 +510,7 @@ class PUBLIC_API CollectionModify
500510
}
501511

502512
/**
503-
Unset a given field in a document.
513+
Remove the given field from a document.
504514
505515
The field is given by a document path.
506516
*/
@@ -515,7 +525,7 @@ class PUBLIC_API CollectionModify
515525
}
516526

517527
/**
518-
Insert value into an array field of a document.
528+
Insert a value into an array field of a document.
519529
520530
The `field` parameter should be a document path pointing at a location
521531
inside an array field. The given value is inserted at this position.
@@ -531,7 +541,7 @@ class PUBLIC_API CollectionModify
531541
}
532542

533543
/**
534-
Append value to an array field of a document.
544+
Append a value to an array field of a document.
535545
536546
The `field` parameter should be a document path pointing at an array
537547
field inside the document. The given value is appended at the end of the
@@ -548,10 +558,10 @@ class PUBLIC_API CollectionModify
548558
}
549559

550560
/**
551-
Delete element from an array field of a document.
561+
Delete an element from an array field of a document.
552562
553563
The `field` parameter should be a document path pointing at a location
554-
inside an array field. The element at indicated location is removed from
564+
inside an array field. The element at the indicated location is removed from
555565
the array.
556566
*/
557567

include/devapi/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ typedef unsigned long row_count_t;
167167
Method `begin()` returns pointer to the first byte in the
168168
region, `end()` to one past the last byte in the region.
169169
170-
@note Instance of `bytes` type does not store the bytes -
170+
@note An instance of `bytes` does not store the bytes -
171171
it merely describes a region of memory and is equivalent
172172
to a pair of pointers. It is very cheap to copy `bytes` and
173173
pass them by value.
174174
175175
@note This class extends std::pair<byte *, size_t> to make
176176
it consistent with how memory regions are described by
177177
std::get_temporary_buffer(). It is also possible to initialize
178-
bytes instance by buffer returned from
178+
a `bytes` instance by buffer returned from
179179
std::get_temporary_buffer(), as follows:
180180
181181
bytes buf = std::get_temporary_buffer<byte>(size);

0 commit comments

Comments
 (0)