File: create_array.md

package info (click to toggle)
mongo-cxx-driver 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 13,832 kB
  • sloc: cpp: 61,365; python: 1,436; sh: 356; xml: 253; perl: 215; makefile: 21
file content (83 lines) | stat: -rw-r--r-- 2,244 bytes parent folder | download
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
81
82
83
# Create an Array

## From a JSON String

### Basic Example

@snippet api/bsoncxx/examples/bson_documents/create_array/json_basic.cpp Example

### With Extended JSON

@snippet api/bsoncxx/examples/bson_documents/create_array/json_extended.cpp Example

### With a Sub-Document

@snippet api/bsoncxx/examples/bson_documents/create_array/json_sub_document.cpp Example

### With a Sub-Array

@snippet api/bsoncxx/examples/bson_documents/create_array/json_sub_array.cpp Example

### With a User-Defined Literal

@snippet api/bsoncxx/examples/bson_documents/create_array/json_udl.cpp Example

## Using the Basic Builder

### Basic Example

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_basic.cpp Example

### With make_document

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_make_document.cpp Example

### With concatenate

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_concatenate.cpp Example

### With Multiple Appends

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_append.cpp Example

### To Create Multiple Documents

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_reset.cpp Example

### With a Value Type

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_value_type.cpp Example

### With a BSON Type

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_bson_type.cpp Example

### With a BSON Value

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_bson_value.cpp Example

### With a Sub-Document

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_sub_document.cpp Example

### With Multiple Sub-Document Appends

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_sub_document_append.cpp Example

### With a Sub-Array

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_sub_array.cpp Example

### With Multiple Sub-Array Appends

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_sub_array_append.cpp Example

## From Raw Bytes

### As a View

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_raw_view.cpp Example

### As a Value

@snippet api/bsoncxx/examples/bson_documents/create_array/builder_raw_value.cpp Example