SqlWorker
#include <bb/data/SqlWorker>
To link against this class, add the following line to your .pro file: LIBS += -lbbdata
A worker that executes SQL commands in another thread.
BlackBerry 10.0.0
Inheritance
| bb::data::AsyncWorker | ||
| bb::data::SqlWorker | ||
Public Functions Index
| SqlWorker (const QString &dbPath, QObject *parent=0) | |
| SqlWorker (const QString &dbPath, const QString &connectionName, QObject *parent=0) | |
| virtual | ~SqlWorker () |
| virtual void | execute (const QVariant &command, bb::data::DataAccessReply *replyData) |
| AsyncWorker (QObject *parent=0) |
Public Functions
Constructs an SqlWorker object with the specified path to a database file and parent.
If the specified parent is not 0, the ownership of this object will be transferred to the parent.
| Parameters | |
|---|---|
| dbPath |
The path to the SQL database. It is an absolute or relative file path to the local database. This path is also used as the connection name. |
| parent |
The parent owner or 0. Optional and will default to 0 if not specified. |
BlackBerry 10.0.0
Constructs an SqlWorker object with the specified path to a database file, connection name, and parent.
If the specified parent is not 0, the ownership of this object will be transferred to the parent.
| Parameters | |
|---|---|
| dbPath |
The path to the SQL database. It is an absolute or relative file path to the local database. |
| connectionName |
The name of the database connection. |
| parent |
The parent owner or 0. Optional and will default to 0 if not specified. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
virtual void
Executes the specified SQL command.
Internally, an instance of SqlDataAccess is used to execute SQL commands and, for queries, to return the results in the replyData parameter.
| Parameters | |
|---|---|
| command |
The SQL string to be executed (other than transaction-related commands, which are not strings). |
| replyData |
A previously created DataAccessReply with the ID value populated from the original call. |
BlackBerry 10.0.0
Constructs a worker that will perform asynchronous work.
Ownership will be managed by the async framework. The object ownership will be transferred to an internal object within this framework.
| Parameters | |
|---|---|
| parent |
The parent owner. Do not specify as ownership will be overridden. |
BlackBerry 10.0.0