QtSql/qsqlresult.h Source File
Go to the documentation of this file.
57 template <typename T> class
QVector;
61 class QSqlResultPrivate;
66 friend class QSqlTableModelPrivate;
67 friend class QSqlResultPrivate;
70 virtual ~QSqlResult();
71 virtual QVariant handle()
const;
78 , BindByPosition = PositionalBinding,
79 BindByName = NamedBinding
83 explicit QSqlResult(
const QSqlDriver * db);
85 QString lastQuery()
const;
86 QSqlError lastError()
const;
88 bool isActive()
const;
89 bool isSelect()
const;
90 bool isForwardOnly()
const;
91 const QSqlDriver* driver()
const;
92 virtual void setAt(
int at);
93 virtual void setActive(
bool a);
94 virtual void setLastError(
const QSqlError& e);
95 virtual void setQuery(
const QString& query);
96 virtual void setSelect(
bool s);
97 virtual void setForwardOnly(
bool forward);
101 virtual bool prepare(
const QString& query);
102 virtual bool savePrepare(
const QString& sqlquery);
103 virtual void bindValue(
int pos,
const QVariant& val, QSql::ParamType
type);
104 virtual void bindValue(
const QString& placeholder,
const QVariant& val,
105 QSql::ParamType
type);
106 void addBindValue(
const QVariant& val, QSql::ParamType
type);
107 QVariant boundValue(
const QString& placeholder)
const;
108 QVariant boundValue(
int pos)
const;
109 QSql::ParamType bindValueType(
const QString& placeholder)
const;
110 QSql::ParamType bindValueType(
int pos)
const;
111 int boundValueCount()
const;
113 QString executedQuery()
const;
114 QString boundValueName(
int pos)
const;
116 bool hasOutValues()
const;
118 BindingSyntax bindingSyntax()
const;
120 virtual QVariant
data(
int i) = 0;
121 virtual bool isNull(
int i) = 0;
122 virtual bool reset(
const QString& sqlquery) = 0;
123 virtual bool fetch(
int i) = 0;
124 virtual bool fetchNext();
125 virtual bool fetchPrevious();
126 virtual bool fetchFirst() = 0;
127 virtual bool fetchLast() = 0;
128 virtual int size() = 0;
129 virtual int numRowsAffected() = 0;
130 virtual QSqlRecord record()
const;
131 virtual QVariant lastInsertId()
const;
134 virtual void virtual_hook(
int id,
void *
data);
135 bool execBatch(
bool arrayBind =
false);
136 void detachFromResultSet();
142 QSqlResultPrivate* d;
143 void resetBindCount();
146 Q_DISABLE_COPY(QSqlResult)
153 #endif // QSQLRESULT_H
GLuint GLuint GLsizei GLenum type
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLubyte GLubyte GLubyte a