返回介绍

QSqlRecordInfo Class

发布于 2019-10-04 15:03:01 字数 2037 浏览 1098 评论 0 收藏 0

The QSqlRecordInfo class encapsulates a set of database field meta data. More...

#include <qsqlrecord.h>

List of all member functions.

Public Members

  • QSqlRecordInfo ()
  • QSqlRecordInfo ( constQSqlFieldInfoList&other )
  • QSqlRecordInfo ( constQSqlRecord&other )
  • size_type contains ( constQString&fieldName ) const
  • QSqlFieldInfo find ( constQString&fieldName ) const
  • QSqlRecord toRecord () const

Detailed Description

The QSqlRecordInfo class encapsulates a set of database field meta data.

This class is a QValueList that holds a set of database field meta data. Use contains() to see if a given field name exists in the record, and use find() to get a QSqlFieldInfo record for a named field.

See also QValueList, QSqlFieldInfo and Database Classes.


Member Function Documentation

QSqlRecordInfo::QSqlRecordInfo ()

Constructs an empty recordinfo object

QSqlRecordInfo::QSqlRecordInfo ( constQSqlFieldInfoList&other )

Constructs a copy of other.

QSqlRecordInfo::QSqlRecordInfo ( constQSqlRecord&other )

Constructs a QSqlRecordInfo object based on the fields in the QSqlRecord other.

size_type QSqlRecordInfo::contains ( constQString&fieldName ) const

Returns the number of times a field named fieldName occurs in the record. Returns 0 if no field by that name could be found.

QSqlFieldInfo QSqlRecordInfo::find ( constQString&fieldName ) const

Returns a QSqlFieldInfo object for the first field in the record which has the field name fieldName. If no matching field is found then an empty QSqlFieldInfo object is returned.

QSqlRecord QSqlRecordInfo::toRecord () const

Returns an empty QSqlRecord based on the field information in this QSqlRecordInfo.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文