Home · All Classes · alphabetical Classes List · Modules · Functions ·

QxtSqlPackage Class Reference
[Sql]

full serialiseable QSqlQuery storage More...

Public Member Functions


Detailed Description

full serialiseable QSqlQuery storage

Sometimes you want to set 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 similiar to QSqlQuery.


Member Function Documentation

bool QxtSqlPackage::next ( )

point to next entry

returns false if there is no next entry.
provided for easy porting from QSqlQuery.

                while (query.next())
                        {
                        }


QString QxtSqlPackage::value ( QString  key )

return a cloumn in curent 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");     


void QxtSqlPackage::insert ( QSqlQuery  query )

read from QSqlQuery

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;"));



(c) 2007A.Picciani and A.Higerd LGPL
libqxt 0.2