Changeset View
Changeset View
Standalone View
Standalone View
src/drivers/mysql/MysqlPreparedStatement.h
Show All 30 Lines | |||||
31 | public: | 31 | public: | ||
32 | explicit MysqlPreparedStatement(MysqlConnectionInternal* conn); | 32 | explicit MysqlPreparedStatement(MysqlConnectionInternal* conn); | ||
33 | 33 | | |||
34 | ~MysqlPreparedStatement() override; | 34 | ~MysqlPreparedStatement() override; | ||
35 | 35 | | |||
36 | private: | 36 | private: | ||
37 | bool prepare(const KDbEscapedString& sql) override; | 37 | bool prepare(const KDbEscapedString& sql) override; | ||
38 | 38 | | |||
39 | KDbSqlResult *execute(KDbPreparedStatement::Type type, const KDbField::List &selectFieldList, | 39 | QSharedPointer<KDbSqlResult> execute(KDbPreparedStatement::Type type, | ||
40 | const KDbField::List &selectFieldList, | ||||
40 | KDbFieldList *insertFieldList, | 41 | KDbFieldList *insertFieldList, | ||
41 | const KDbPreparedStatementParameters ¶meters, | 42 | const KDbPreparedStatementParameters ¶meters) override Q_REQUIRED_RESULT; | ||
42 | bool *resultOwned) override Q_REQUIRED_RESULT; | | |||
43 | 43 | | |||
44 | bool init(); | 44 | bool init(); | ||
45 | void done(); | 45 | void done(); | ||
46 | 46 | | |||
47 | #ifdef KDB_USE_MYSQL_STMT | 47 | #ifdef KDB_USE_MYSQL_STMT | ||
48 | bool bindValue(KDbField *field, const QVariant& value, int arg); | 48 | bool bindValue(KDbField *field, const QVariant& value, int arg); | ||
49 | int m_realParamCount; | 49 | int m_realParamCount; | ||
50 | MYSQL_STMT *m_statement; | 50 | MYSQL_STMT *m_statement; | ||
51 | MYSQL_BIND *m_mysqlBind; | 51 | MYSQL_BIND *m_mysqlBind; | ||
52 | #endif | 52 | #endif | ||
53 | KDbEscapedString m_tempStatementString; | 53 | KDbEscapedString m_tempStatementString; | ||
54 | bool m_resetRequired; | 54 | bool m_resetRequired; | ||
55 | Q_DISABLE_COPY(MysqlPreparedStatement) | 55 | Q_DISABLE_COPY(MysqlPreparedStatement) | ||
56 | }; | 56 | }; | ||
57 | 57 | | |||
58 | #endif | 58 | #endif |