SqlitePreparedStatement
#include <SqlitePreparedStatement.h>
Public Member Functions | |
SqlitePreparedStatement (SqliteConnectionInternal *conn) | |
Public Member Functions inherited from KDbResultable | |
KDbResultable (const KDbResultable &other) | |
void | clearResult () |
KDbMessageHandler * | messageHandler () const |
KDbResultable & | operator= (const KDbResultable &other) |
KDbResult | result () const |
virtual QString | serverResultName () const |
void | setMessageHandler (KDbMessageHandler *handler) |
void | showMessage () |
Protected Member Functions | |
bool | bindValue (KDbField *field, const QVariant &value, int arg) |
QSharedPointer< KDbSqlResult > | execute (KDbPreparedStatement::Type type, const KDbField::List &selectFieldList, KDbFieldList *insertFieldList, const KDbPreparedStatementParameters ¶meters) override |
bool | prepare (const KDbEscapedString &sql) override |
SqliteSqlResult * | sqlResult () |
Protected Member Functions inherited from KDbPreparedStatementInterface |
Protected Attributes | |
QSharedPointer< KDbSqlResult > | m_sqlResult |
Protected Attributes inherited from KDbResultable | |
Private *const | d |
KDbResult | m_result |
Detailed Description
Implementation of prepared statements for the SQLite driver.
Definition at line 29 of file SqlitePreparedStatement.h.
Constructor & Destructor Documentation
◆ SqlitePreparedStatement()
|
explicit |
Definition at line 24 of file SqlitePreparedStatement.cpp.
◆ ~SqlitePreparedStatement()
|
override |
Definition at line 32 of file SqlitePreparedStatement.cpp.
Member Function Documentation
◆ bindValue()
|
protected |
- Todo
- optimize: make a static copy so SQLITE_STATIC can be used
- Todo
- what about unsigned > INT_MAX ?
- Todo
- what about unsigned > LLONG_MAX ?
Definition at line 43 of file SqlitePreparedStatement.cpp.
◆ execute()
|
overrideprotectedvirtual |
For implementation, executes the prepared statement Type of statement is specified by the type parameter.
selectFieldList specifies fields for SELECT statement. insertFieldList is set to list of fields in INSERT statement. Parameters parameters are passed to the statement, usually using binding.
- Todo
- fetch result
Implements KDbPreparedStatementInterface.
Definition at line 191 of file SqlitePreparedStatement.cpp.
◆ prepare()
|
overrideprotectedvirtual |
For implementation. Initializes the prepared statement in a backend-dependent way using recently generated sql statement. It should be guaranteed that sql is valid and not empty. For example sqlite3_prepare() is used for SQLite. This is called only when d->dirty == true is encountered on execute(), i.e. when attributes of the object (like WHERE field names) change.
Implements KDbPreparedStatementInterface.
Definition at line 36 of file SqlitePreparedStatement.cpp.
◆ sqlResult()
|
inlineprotected |
Definition at line 46 of file SqlitePreparedStatement.h.
Member Data Documentation
◆ m_sqlResult
|
protected |
Definition at line 48 of file SqlitePreparedStatement.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.