Exemple #1
0
QSqlRecordInfo QSQLiteDriver::recordInfo(const QSqlQuery& query) const
{
    if (query.isActive() && query.driver() == this) {
        QSQLiteResult* result = (QSQLiteResult*)query.result();
        return result->d->rInf;
    }
    return QSqlRecordInfo();
}
Exemple #2
0
QSqlRecordInfo SqliteDriver::recordInfo2(const QString &tbl) const
{
  if (!isOpen() || !dataBase_)
    return QSqlRecordInfo();

  QSqlQuery q = createQuery();
  q.setForwardOnly(TRUE);
  q.exec("SELECT * FROM " + tbl + " LIMIT 1");
  return recordInfo(q);
}
Exemple #3
0
/*!
    \overload

    Returns a QSqlRecordInfo object with meta data for the QSqlQuery
    \a query. Note that this overloaded function may return less
    information than the recordInfo() function which takes the name of
    a table as parameter.
*/
QSqlRecordInfo QSqlDriver::recordInfo( const QSqlQuery& query ) const
{
    return QSqlRecordInfo( record( query ) );
}
Exemple #4
0
/*!
    Returns a QSqlRecordInfo object with meta data about the table \a
    tablename.
*/
QSqlRecordInfo QSqlDriver::recordInfo( const QString& tablename ) const
{
    return QSqlRecordInfo( record( tablename ) );
}
Exemple #5
0
QSqlRecordInfo SqliteDriver::recordInfo(const QSqlQuery &query) const
{
  return QSqlRecordInfo();
}