![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtSqlPackage class provides a full serializable QSqlQuery storage More...
#include <QxtSqlPackage>
Inherits QObject.
The QxtSqlPackage class provides a full serializable QSqlQuery storage
Sometimes you want to send sql results over network or store them into files. QxtSqlPackage can provide you a storage that is still valid after the actual QSqlQuery has been destroyed. for confidence the interface is similar to QSqlQuery.
Constructs a QxtSqlPackage with parent.
Constructs a copy of other with parent.
curent pointer position
Returns the number of rows stored
Returns serialised data
See also setData().
point to first entry in storage
return a specific index as Hash
return the curent row as Hash
read from query
read out a QSqlQuery and store the result. you may close the query after reading, the data will stay.
QxSqlPackage::insert(QSqlQuery::exec("select name,foo,bar from table;"));
Returns true if the package is valid, false otherwise.
point to last entry in storage
point to next entry
returns false if there is no next entry. provided for easy porting from QSqlQuery.
while (query.next()) { }
Deserialise data
See also data().
return a column in current row in contrast to QSqlQuery you have to provide the name of the key.
the entry is returned as QString becouse in most cases you need QString anyway, and converting to needed data type is easy.
QString name = query.value("name");
copy other
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |