MySQL Connector/C++
MySQL connector library for C and C++ applications
Public Member Functions | List of all members

Represents a collection of key-value pairs where value can be a scalar or another document. More...

Public Member Functions

 DbDoc ()
 Create null document instance. More...
 
 DbDoc (const std::string &)
 Creates DbDoc instance out of given JSON string description.
 
bool isNull () const
 Check if document is null.
 
virtual bool hasField (const Field &) const
 Check if named field is a top-level field in the document.
 
virtual int fieldType (const Field &) const
 Return Value::XXX constant that identifies type of value stored at given field.
 
virtual const Valueoperator[] (const Field &) const
 Return value of given field.
 
virtual void print (std::ostream &) const
 Print JSON description of the document.
 

Detailed Description

Represents a collection of key-value pairs where value can be a scalar or another document.

Note
Internal document implementation is shared among DbDoc instances and thus using DbDoc objects should be cheap.

Constructor & Destructor Documentation

◆ DbDoc()

DbDoc ( )
inline

Create null document instance.

Note
Null document is different from empty document that has no fields.

The documentation for this class was generated from the following file: