MySQL Connector/C++ 9.1.0
MySQL connector library for C and C++ applications
|
The CollectionValidation class defines collection schema and level of validation. More...
Public Types | |
enum | Level { OFF = 1 , STRICT = 2 } |
Collection validation level options. More... | |
enum | Option { SCHEMA = 1 , LEVEL = 2 , LAST } |
Collection validation options More... | |
Public Member Functions | |
CollectionValidation (DbDoc doc) | |
Constructor using a document. More... | |
template<typename... Rest> | |
CollectionValidation (Option opt, Rest &&... rest) | |
Construct CollectionValidation from list of Option and value pairs. More... | |
template<typename... Rest> | |
void | set (Rest &&... options) |
Set list of Option and value pairs. More... | |
The CollectionValidation class defines collection schema and level of validation.
enum Level |
Collection validation level options.
Enumerator | |
---|---|
OFF | No validation will be done on the collection. |
STRICT | All collection documents have to comply to validation schema. |
enum Option |
Collection validation options
Enumerator | |
---|---|
SCHEMA | Collection validation schema, as defined by https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-valid |
LEVEL | Defines level of validation on the collection, see CollectionValidation::Level. In plain C code the value should be mysqlx_collection_validation_level_t. |
|
inline |
Constructor using a document.
Document example:
Document keys:
level
: See CollectionValidation::LEVEL;schema
: See CollectionValidation::SCHEMA;
|
inline |
Construct CollectionValidation from list of Option and value pairs.
See CollectionValidation::Option for possible options.
|
inline |
Set list of Option and value pairs.