|
wxSQLite3 3.0.0
|
Represents a prepared SQL statement. More...
#include <wxsqlite3.h>
Public Member Functions | |
| wxSQLite3Statement () | |
| Constructor. | |
| wxSQLite3Statement (const wxSQLite3Statement &statement) | |
| Copy constructor. | |
| wxSQLite3Statement & | operator= (const wxSQLite3Statement &statement) |
| Assignement constructor. | |
| wxSQLite3Statement (wxSQLite3DatabaseReference *db, wxSQLite3StatementReference *stmt) | |
| Constructor (internal use only) | |
| virtual | ~wxSQLite3Statement () |
| Destructor. | |
| int | ExecuteUpdate () |
| Execute the database update represented by this statement. | |
| wxSQLite3ResultSet | ExecuteQuery () |
| Execute the query represented by this statement. | |
| int | ExecuteScalar () |
| Execute a scalar SQL query statement given as a wxString. | |
| int | GetParamCount () |
| Get the number of statement parameters. | |
| int | GetParamIndex (const wxString ¶mName) |
| Get the index of a parameter with a given name. | |
| wxString | GetParamName (int paramIndex) |
| Get the name of a paramater at the given position. | |
| void | Bind (int paramIndex, const wxString &stringValue) |
| Bind parameter to a string value. | |
| void | Bind (int paramIndex, int intValue) |
| Bind parameter to a integer value. | |
| void | Bind (int paramIndex, wxLongLong int64Value) |
| Bind parameter to a 64-bit integer value. | |
| void | Bind (int paramIndex, double doubleValue) |
| Bind parameter to a double value. | |
| void | Bind (int paramIndex, const char *charValue) |
| Bind parameter to a utf-8 character string value. | |
| void | Bind (int paramIndex, const unsigned char *blobValue, int blobLen) |
| Bind parameter to a BLOB value. | |
| void | Bind (int paramIndex, const wxMemoryBuffer &blobValue) |
| Bind parameter to a BLOB value. | |
| void | BindDate (int paramIndex, const wxDateTime &date) |
| Bind parameter to a date value. | |
| void | BindTime (int paramIndex, const wxDateTime &time) |
| Bind parameter to a time value. | |
| void | BindDateTime (int paramIndex, const wxDateTime &datetime) |
| Bind parameter to a date and time value. | |
| void | BindTimestamp (int paramIndex, const wxDateTime ×tamp) |
| Bind parameter to a timestamp value. | |
| void | BindNumericDateTime (int paramIndex, const wxDateTime &datetime) |
| Bind parameter to a date and time value. | |
| void | BindJulianDayNumber (int paramIndex, const wxDateTime &datetime) |
| Bind parameter to a date and time value. | |
| void | BindBool (int paramIndex, bool value) |
| Bind parameter to a boolean value. | |
| void | BindNull (int paramIndex) |
| Bind parameter to a NULL value. | |
| void | BindZeroBlob (int paramIndex, int blobSize) |
| Bind parameter to a Zero BLOB value. | |
| void | ClearBindings () |
| Clear all parameter bindings. | |
| wxString | GetSQL () |
| Get the original SQL string for the prepared statement. | |
| void | Reset () |
| Reset the prepared statement. | |
| bool | IsReadOnly () |
| Determine whether the statement is read-only. | |
| void | Finalize () |
| Finalize the prepared statement. | |
| bool | IsOk () |
| Validate associated SQLite database and statement. | |
| bool | IsBusy () |
| Determine if a prepared statement has been reset. | |
Represents a prepared SQL statement.
| wxSQLite3Statement::wxSQLite3Statement | ( | ) |
Constructor.
| wxSQLite3Statement::wxSQLite3Statement | ( | const wxSQLite3Statement & | statement | ) |
Copy constructor.
| wxSQLite3Statement::wxSQLite3Statement | ( | wxSQLite3DatabaseReference * | db, |
| wxSQLite3StatementReference * | stmt | ||
| ) |
Constructor (internal use only)
| wxSQLite3Statement::~wxSQLite3Statement | ( | ) | [virtual] |
Destructor.
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| const wxString & | stringValue | ||
| ) |
Bind parameter to a string value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| stringValue | value of the parameter |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| int | intValue | ||
| ) |
Bind parameter to a integer value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| intValue | value of the parameter |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| wxLongLong | int64Value | ||
| ) |
Bind parameter to a 64-bit integer value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| int64Value | value of the parameter |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| double | doubleValue | ||
| ) |
Bind parameter to a double value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| doubleValue | value of the parameter |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| const char * | charValue | ||
| ) |
Bind parameter to a utf-8 character string value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| charValue | value of the parameter |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| const unsigned char * | blobValue, | ||
| int | blobLen | ||
| ) |
Bind parameter to a BLOB value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| blobValue | value of the parameter |
| blobLen | length of the blob in bytes |
| void wxSQLite3Statement::Bind | ( | int | paramIndex, |
| const wxMemoryBuffer & | blobValue | ||
| ) |
Bind parameter to a BLOB value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| blobValue | value of the parameter |
| void wxSQLite3Statement::BindBool | ( | int | paramIndex, |
| bool | value | ||
| ) |
Bind parameter to a boolean value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| value | value of the parameter |
| void wxSQLite3Statement::BindDate | ( | int | paramIndex, |
| const wxDateTime & | date | ||
| ) |
Bind parameter to a date value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| date | value of the parameter |
| void wxSQLite3Statement::BindDateTime | ( | int | paramIndex, |
| const wxDateTime & | datetime | ||
| ) |
Bind parameter to a date and time value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| datetime | value of the parameter |
| void wxSQLite3Statement::BindJulianDayNumber | ( | int | paramIndex, |
| const wxDateTime & | datetime | ||
| ) |
Bind parameter to a date and time value.
The date/time value is transferred to the database as a Julian Day Number value (i.e. double).
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| datetime | value of the parameter |
| void wxSQLite3Statement::BindNull | ( | int | paramIndex | ) |
Bind parameter to a NULL value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| void wxSQLite3Statement::BindNumericDateTime | ( | int | paramIndex, |
| const wxDateTime & | datetime | ||
| ) |
Bind parameter to a date and time value.
The date/time value is transferred to the database as a numeric value (i.e. int64).
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| datetime | value of the parameter |
| void wxSQLite3Statement::BindTime | ( | int | paramIndex, |
| const wxDateTime & | time | ||
| ) |
Bind parameter to a time value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| time | value of the parameter |
| void wxSQLite3Statement::BindTimestamp | ( | int | paramIndex, |
| const wxDateTime & | timestamp | ||
| ) |
Bind parameter to a timestamp value.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| timestamp | value of the parameter |
| void wxSQLite3Statement::BindZeroBlob | ( | int | paramIndex, |
| int | blobSize | ||
| ) |
Bind parameter to a Zero BLOB value.
Space for a BLOB is reserved and filled with binary zeros for later reference through a BLOB handle.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| blobSize | size of the BLOB |
| void wxSQLite3Statement::ClearBindings | ( | ) |
Clear all parameter bindings.
Sets all the parameters in the prepared SQL statement back to NULL.
| wxSQLite3ResultSet wxSQLite3Statement::ExecuteQuery | ( | ) |
Execute the query represented by this statement.
| int wxSQLite3Statement::ExecuteScalar | ( | ) |
Execute a scalar SQL query statement given as a wxString.
Allows to easily retrieve the result of queries returning a single integer result like SELECT COUNT(*) FROM table WHERE condition.
| int wxSQLite3Statement::ExecuteUpdate | ( | ) |
Execute the database update represented by this statement.
| void wxSQLite3Statement::Finalize | ( | ) |
Finalize the prepared statement.
| int wxSQLite3Statement::GetParamCount | ( | ) |
Get the number of statement parameters.
| int wxSQLite3Statement::GetParamIndex | ( | const wxString & | paramName | ) |
Get the index of a parameter with a given name.
| paramName |
| wxString wxSQLite3Statement::GetParamName | ( | int | paramIndex | ) |
Get the name of a paramater at the given position.
| paramIndex | index of the parameter. The first parameter has an index of 1. |
| wxString wxSQLite3Statement::GetSQL | ( | ) |
Get the original SQL string for the prepared statement.
| bool wxSQLite3Statement::IsBusy | ( | ) |
Determine if a prepared statement has been reset.
| bool wxSQLite3Statement::IsOk | ( | ) |
Validate associated SQLite database and statement.
| bool wxSQLite3Statement::IsReadOnly | ( | ) |
Determine whether the statement is read-only.
| wxSQLite3Statement & wxSQLite3Statement::operator= | ( | const wxSQLite3Statement & | statement | ) |
Assignement constructor.
| void wxSQLite3Statement::Reset | ( | ) |
Reset the prepared statement.
Resets the statement back to it's initial state, ready to be re-executed. Any SQL statement variables that had values bound to them retain their values.
1.7.4