MySQL Connector/C++
MySQL connector library for C and C++ applications
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TableUpdate Class Reference

An operation which updates rows stored in a table. More...

Public Member Functions

TableUpdateset (const string &field, const Value &val)
 Set the given field in a row to the given value.
 
Operation & where (const string &expr)
 Specify selection criteria for rows that should be updated.
 
Operation & orderBy (Type... spec)
 Specify ordering of rows in a query results.
 
Operation & limit (unsigned items)
 Limit the operation to the given number of items (rows or documents).
 
BindOperationbind (const string &parameter, const Value &val)
 Bind parameter with given name to the given value.
 
Operation & bind (const Map &args)
 Bind parameters to values given by a map from parameter names to their values.
 
virtual Result execute ()
 Execute given operation and return its result.
 
virtual Result execute ()
 Execute given operation and return its result.
 
virtual Result execute ()
 Execute given operation and return its result.
 

Detailed Description

An operation which updates rows stored in a table.

Methods of this clas specify modifications to be applied to each row as well as the set of rows that should be modified.

Member Function Documentation

◆ set()

TableUpdate & set ( const string field,
const Value val 
)
inline

Set the given field in a row to the given value.

The value can be either a direct literal or an expression given as expr(<string>), to be evaluated in the server.

◆ orderBy()

Operation & orderBy ( Type...  spec)
inlineinherited

Specify ordering of rows in a query results.

Arguments are one or more strings of the form "<expr> <dir>" where <expr> gives the value to sort on and <dir> is a sorting direction ASC or DESC.

◆ bind()

BindOperation & bind ( const string parameter,
const Value val 
)
inlineinherited

Bind parameter with given name to the given value.

A statement or query can be executed only if all named parameters used by it are bound to values.


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