221 const int cnt =
count();
222 for (
int i = 0;
i < cnt; ++
i) {
225 const auto ¤tField = d->
fields.
at(
i);
226 const auto ¤tFieldName = currentField.
name();
558void QSqlRecord::detach()
563#ifndef QT_NO_DEBUG_STREAM
568 const int count =
r.count();
569 dbg <<
"QSqlRecord(" <<
count <<
')';
574 dbg <<
r.field(
i) <<
r.value(
i).toString();
589 for (
int i = retValues.count() - 1;
i >= 0; --
i)
590 retValues.setValue(
i,
value(retValues.fieldName(
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 the value of \l generated.
QString name
This property holds the name of the field.
bool isNull() const
Returns true if the field's value is NULL; otherwise returns false.
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
Returns true if the field index is null or if there is no field at position index; otherwise returns ...
QSqlField field(int i) const
Returns the field at position index.
bool contains(const QString &name) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
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
Returns true if the record has a field at position index and this field is to be generated (the defau...
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)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int indexOf(const QString &name) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
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 left(qsizetype n) const &
QString mid(qsizetype position, qsizetype n=-1) const &
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)