207 const int cnt =
count();
208 for (
int i = 0;
i < cnt; ++
i) {
211 const auto ¤tField = d->
fields.
at(
i);
212 const auto ¤tFieldName = currentField.
name();
488void QSqlRecord::detach()
493#ifndef QT_NO_DEBUG_STREAM
498 const int count =
r.count();
499 dbg <<
"QSqlRecord(" <<
count <<
')';
504 dbg <<
r.field(
i) <<
r.value(
i).toString();
519 for (
int i = retValues.
count() - 1;
i >= 0; --
i)
void detach()
If the shared data object's reference count is greater than 1, this function creates a deep copy of t...
qsizetype size() const noexcept
bool isEmpty() const noexcept
iterator insert(qsizetype i, parameter_type t)
const_reference at(qsizetype i) const noexcept
T value(qsizetype i) const
void remove(qsizetype i, qsizetype n=1)
void append(parameter_type t)
The QSqlField class manipulates the fields in SQL database tables and views.
bool isGenerated() const
Returns true if the field is generated; otherwise returns false.
QVariant value() const
Returns the value of the field as a QVariant.
bool isNull() const
Returns true if the field's value is NULL; otherwise returns false.
QString name() const
Returns the name of the field.
bool contains(qsizetype index) const
QList< QSqlField > fields
The QSqlRecord class encapsulates a database record.
void clear()
Removes all the record's fields.
QVariant value(int i) const
Returns the value of the field located at position index in the record.
bool isNull(int i) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QSqlField field(int i) const
Returns the field at position index.
bool contains(const QString &name) const
Returns true if there is a field in the record called name; otherwise returns false.
bool isEmpty() const
Returns true if there are no fields in the record; otherwise returns false.
int count() const
Returns the number of fields in the record.
void remove(int pos)
Removes the field at position pos.
void replace(int pos, const QSqlField &field)
Replaces the field at position pos with the given field.
void append(const QSqlField &field)
Append a copy of field field to the end of the record.
~QSqlRecord()
Destroys the object and frees any allocated resources.
QSqlRecord keyValues(const QSqlRecord &keyFields) const
void insert(int pos, const QSqlField &field)
Inserts the field field at position pos in the record.
void setValue(int i, const QVariant &val)
Sets the value of the field at position index to val.
bool isGenerated(int i) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setNull(int i)
Sets the value of field index to null.
QSqlRecord()
Constructs an empty record.
QString fieldName(int i) const
Returns the name of the field at position index.
QSqlRecord & operator=(const QSqlRecord &other)
Sets the record equal to other.
void setGenerated(const QString &name, bool generated)
Sets the generated flag for the field called name to generated.
int indexOf(const QString &name) const
Returns the position of the field called name within the record, or -1 if it cannot be found.
bool operator==(const QSqlRecord &other) const
Returns true if this object is identical to other (i.e., has the same fields in the same order); othe...
void clearValues()
Clears the value of all fields in the record and sets each field to null.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
QString left(qsizetype n) const
Returns a substring that contains the n leftmost characters of the string.
Combined button and popup list for selecting options.
QTextStream & right(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignRight) on stream and returns stream.
QTextStream & left(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignLeft) on stream and returns stream.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum GLsizei count
#define QT_DEFINE_QESDP_SPECIALIZATION_DTOR(Class)
QDebug operator<<(QDebug dbg, const QSqlRecord &r)
QTextStreamManipulator qSetFieldWidth(int width)