Wt  4.11.1
Public Member Functions | List of all members
Wt::Dbo::backend::MySQLStatement Class Referencefinal

MySQL prepared statement. More...

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

Public Member Functions

virtual void reset () override
 Resets the statement.
 
virtual void bind (int column, const std::string &value) override
 Binds a value to a column.
 
virtual void bind (int column, short value) override
 Binds a value to a column.
 
virtual void bind (int column, int value) override
 Binds a value to a column.
 
virtual void bind (int column, long long value) override
 Binds a value to a column.
 
virtual void bind (int column, float value) override
 Binds a value to a column.
 
virtual void bind (int column, double value) override
 Binds a value to a column.
 
virtual void bind (int column, const std::chrono::system_clock::time_point &value, SqlDateTimeType type) override
 Binds a value to a column.
 
virtual void bind (int column, const std::chrono::duration< int, std::milli > &value) override
 Binds a value to a column.
 
virtual void bind (int column, const std::vector< unsigned char > &value) override
 Binds a value to a column.
 
virtual void bindNull (int column) override
 Binds null to a column.
 
virtual void execute () override
 Executes the statement.
 
virtual long long insertedId () override
 Returns the id if the statement was an SQL insert.
 
virtual int affectedRowCount () override
 Returns the affected number of rows. More...
 
virtual bool nextRow () override
 Fetches the next result row. More...
 
virtual int columnCount () const override
 Returns the number of columns in the result. More...
 
virtual bool getResult (int column, short *value) override
 Fetches a result value. More...
 
virtual bool getResult (int column, int *value) override
 Fetches a result value. More...
 
virtual bool getResult (int column, long long *value) override
 Fetches a result value. More...
 
virtual bool getResult (int column, float *value) override
 Fetches a result value. More...
 
virtual bool getResult (int column, double *value) override
 Fetches a result value. More...
 
virtual bool getResult (int column, std::chrono::system_clock::time_point *value, SqlDateTimeType type) override
 Fetches a result value. More...
 
virtual bool getResult (int column, std::chrono::duration< int, std::milli > *value) override
 Fetches a result value. More...
 
virtual std::string sql () const override
 Returns the prepared SQL string.
 
- Public Member Functions inherited from Wt::Dbo::SqlStatement
virtual ~SqlStatement ()
 Destructor.
 
bool use ()
 Uses the statement. More...
 
void done ()
 Finish statement use. More...
 
virtual bool getResult (int column, std::string *value, int size)=0
 Fetches a result value. More...
 
virtual bool getResult (int column, std::vector< unsigned char > *value, int size)=0
 Fetches a result value. More...
 

Detailed Description

MySQL prepared statement.

Member Function Documentation

◆ affectedRowCount()

virtual int Wt::Dbo::backend::MySQLStatement::affectedRowCount ( )
overridevirtual

Returns the affected number of rows.

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

Implements Wt::Dbo::SqlStatement.

◆ columnCount()

virtual int Wt::Dbo::backend::MySQLStatement::columnCount ( ) const
overridevirtual

Returns the number of columns in the result.

Note
The column count may only be available after the query was executed.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [1/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
double *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [2/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
float *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [3/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
int *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [4/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
long long *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [5/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
short *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [6/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
std::chrono::duration< int, std::milli > *  value 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ getResult() [7/7]

virtual bool Wt::Dbo::backend::MySQLStatement::getResult ( int  column,
std::chrono::system_clock::time_point *  value,
SqlDateTimeType  type 
)
overridevirtual

Fetches a result value.

Returns true when the value was not null.

Implements Wt::Dbo::SqlStatement.

◆ nextRow()

virtual bool Wt::Dbo::backend::MySQLStatement::nextRow ( )
overridevirtual

Fetches the next result row.

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

Implements Wt::Dbo::SqlStatement.