|
ADBC
Arrow Database Connectivity
|
A typed option value wrapper. Attempts some conversions between types. More...
#include <base_driver.h>
Classes | |
| struct | Unset |
| The option is unset. More... | |
Public Types | |
| using | Value = std::variant<Unset, std::string, std::vector<uint8_t>, int64_t, double> |
| The possible values of an option. | |
Public Member Functions | |
| Option (const char *value) | |
| Construct an option from a C string. NULL strings are treated as unset. | |
| Option (std::string value) | |
| Option (std::vector< uint8_t > value) | |
| Option (double value) | |
| Option (int64_t value) | |
| const Value & | value () const & |
| Value & | value () && |
| bool | has_value () const |
| Check whether this option is set. | |
| Result< bool > | AsBool () const |
| Try to parse a string value as a boolean. | |
| Result< int64_t > | AsInt () const |
| Try to parse a string or integer value as an integer. | |
| Result< std::string_view > | AsString () const |
| Get the value if it is a string. | |
| std::string | Format () const |
| Provide a human-readable summary of the value. | |
Private Member Functions | |
| AdbcStatusCode | CGet (char *out, size_t *length, AdbcError *error) const |
| AdbcStatusCode | CGet (uint8_t *out, size_t *length, AdbcError *error) const |
| AdbcStatusCode | CGet (int64_t *out, AdbcError *error) const |
| AdbcStatusCode | CGet (double *out, AdbcError *error) const |
Private Attributes | |
| Value | value_ |
Friends | |
| class | ObjectBase |
A typed option value wrapper. Attempts some conversions between types.
| using adbc::driver::Option::Value = std::variant<Unset, std::string, std::vector<uint8_t>, int64_t, double> |
The possible values of an option.
|
inlineexplicit |
Construct an option from a C string. NULL strings are treated as unset.
|
inline |
Try to parse a string value as a boolean.
|
inline |
Try to parse a string or integer value as an integer.
|
inline |
Get the value if it is a string.
|
inline |
Provide a human-readable summary of the value.
|
inline |
Check whether this option is set.