Represents a potentially parameterized SQL statement.
@<param name>
in the SQL string. Values for parameters are a collection of std::pair<std::string const, google::cloud:bigtable::
Value
>
.
Constructors
SqlStatement()
SqlStatement(std::string)
Constructs a SqlStatement without parameters.
Parameter | |
---|---|
Name | Description |
statement |
std::string
|
SqlStatement(std::string, ParamType)
Constructs a SqlStatement with specified parameters.
Parameters | |
---|---|
Name | Description |
statement |
std::string
|
params |
ParamType
|
SqlStatement(SqlStatement const &)
Copy and move.
Parameter | |
---|---|
Name | Description |
|
SqlStatement const &
|
SqlStatement(SqlStatement &&)
Parameter | |
---|---|
Name | Description |
|
SqlStatement &&
|
Operators
operator=(SqlStatement const &)
Parameter | |
---|---|
Name | Description |
|
SqlStatement const &
|
Returns | |
---|---|
Type | Description |
SqlStatement & |
operator=(SqlStatement &&)
Parameter | |
---|---|
Name | Description |
|
SqlStatement &&
|
Returns | |
---|---|
Type | Description |
SqlStatement & |
Functions
sql() const
Returns the SQL statement.
No parameter substitution is performed in the statement string.
Returns | |
---|---|
Type | Description |
std::string const & |
params() const
Returns the collection of parameters.
Returns | |
---|---|
Type | Description |
ParamType const & |
If no parameters were specified, the container will be empty. |
ParameterNames() const
Returns the names of all the parameters.
Returns | |
---|---|
Type | Description |
std::vector< std::string > |
GetParameter(std::string const &) const
Returns the requested parameter.
Parameter | |
---|---|
Name | Description |
parameter_name |
std::string const &
name of requested parameter. |
Returns | |
---|---|
Type | Description |
google::cloud::StatusOr< Parameter > |
|
Type Aliases
ParamType
std::unordered_map< std::string, Parameter >
Type alias for parameter collection.
The key represents the name of the parameter.