Wt: Wt::Dbo::backend::MySQLStatement Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Dbo::backend::MySQLStatement Class Reference

MySQL prepared statement. More...

Inheritance diagram for Wt::Dbo::backend::MySQLStatement:
[legend]

List of all members.

## Public Member Functions
virtual void | reset ()
| Resets the statement.
virtual void | bind (int column, const std::string &value)
| Binds a value to a column.
virtual void | bind (int column, short value)
| Binds a value to a column.
virtual void | bind (int column, int value)
| Binds a value to a column.
virtual void | bind (int column, long long value)
| Binds a value to a column.
virtual void | bind (int column, float value)
| Binds a value to a column.
virtual void | bind (int column, double value)
| Binds a value to a column.
virtual void | bind (int column, const boost::posix_time::ptime &value, SqlDateTimeType type)
| Binds a value to a column.
virtual void | bind (int column, const boost::posix_time::time_duration &value)
| Binds a value to a column.
virtual void | bind (int column, const std::vector< unsigned char > &value)
| Binds a value to a column.
virtual void | bindNull (int column)
| Binds `null` to a column.
virtual void | execute ()
| Executes the statement.
virtual long long | insertedId ()
| Returns the id if the statement was an SQL `insert`.
virtual int | affectedRowCount ()
| Returns the affected number of rows.
virtual bool | nextRow ()
| Fetches the next result row.
virtual bool | getResult (int column, std::string *value, int size)
| Fetches a result value.
virtual bool | getResult (int column, short *value)
| Fetches a result value.
virtual bool | getResult (int column, int *value)
| Fetches a result value.
virtual bool | getResult (int column, long long *value)
| Fetches a result value.
virtual bool | getResult (int column, float *value)
| Fetches a result value.
virtual bool | getResult (int column, double *value)
| Fetches a result value.
virtual bool | getResult (int column, boost::posix_time::ptime *value, SqlDateTimeType type)
| Fetches a result value.
virtual bool | getResult (int column, boost::posix_time::time_duration *value)
| Fetches a result value.
virtual bool | getResult (int column, std::vector< unsigned char > *value, int size)
| Fetches a result value.
virtual std::string | sql () const
| Returns the prepared SQL string.

## Detailed Description

MySQL prepared statement.

## Member Function Documentation

virtual int Wt::Dbo::backend::MySQLStatement::affectedRowCount | ( |  | ) | `[virtual]`

Returns the affected number of rows.

This is only useful for an SQL `update` or `delete` statement.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | std::string * | value,
|  | int | size
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | short * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | int * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | long long * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | float * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | double * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | boost::posix_time::ptime * | value,
|  | SqlDateTimeType | type
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | boost::posix_time::time_duration * | value
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::getResult | ( | int | column,
|  | std::vector< unsigned char > * | value,
|  | int | size
| ) |  | `[virtual]`

Fetches a result value.

Returns `true` when the value was not `null`.

Implements Wt::Dbo::SqlStatement.

virtual bool Wt::Dbo::backend::MySQLStatement::nextRow | ( |  | ) | `[virtual]`

Fetches the next result row.

Returns `true` if there was one more row to be fetched.

Implements Wt::Dbo::SqlStatement.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator