File: clients.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-- 1,909 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 a Client

## Single

### Basic Usage

@snippet api/mongocxx/examples/clients/create/single/basic.cpp Example

### With a Custom URI

@snippet api/mongocxx/examples/clients/create/single/with_uri.cpp Example

### With Client Options

#### Stable API Options

@snippet api/mongocxx/examples/clients/create/single/options/stable_api.cpp Example

#### TLS Options

@snippet api/mongocxx/examples/clients/create/single/options/tls.cpp Example

#### Automatic Encryption Options

@snippet api/mongocxx/examples/clients/create/single/options/auto_encryption.cpp Example

#### APM Options

@snippet api/mongocxx/examples/clients/create/single/options/apm.cpp Example

## Pool

### Basic Usage

@snippet api/mongocxx/examples/clients/create/pool/basic.cpp Example

### With Client Options

@snippet api/mongocxx/examples/clients/create/pool/options.cpp Example

### Try Acquire

@snippet api/mongocxx/examples/clients/create/pool/try_acquire.cpp Example

# Use a Client

## List Databases

@snippet api/mongocxx/examples/clients/use/list_databases.cpp Example

## List Databases With Options

@snippet api/mongocxx/examples/clients/use/list_databases_with_options.cpp Example

## List Database Names

@snippet api/mongocxx/examples/clients/use/list_database_names.cpp Example

## List Database Names With Options

@snippet api/mongocxx/examples/clients/use/list_database_names_with_options.cpp Example

# Error Handling

## Invalid Client

@snippet api/mongocxx/examples/clients/errors/invalid_client.cpp Example

## Wait Queue Timeout

@snippet api/mongocxx/examples/clients/errors/wait_queue_timeout.cpp Example

## Invalid Stable API Options

@snippet api/mongocxx/examples/clients/errors/stable_api.cpp Example

## TLS Not Enabled

@snippet api/mongocxx/examples/clients/errors/tls.cpp Example

## Invalid Auto Encryption Options

@snippet api/mongocxx/examples/clients/errors/auto_encryption.cpp Example