1QSqlRecord(3qt) QSqlRecord(3qt)
2
3
4
6 QSqlRecord - Encapsulates a database record, i.e. a set of database
7 fields
8
10 #include <qsqlrecord.h>
11
12 Inherited by QSqlCursor and QSqlIndex.
13
14 Public Members
15 QSqlRecord ()
16 QSqlRecord ( const QSqlRecord & other )
17 QSqlRecord & operator= ( const QSqlRecord & other )
18 virtual ~QSqlRecord ()
19 virtual QVariant value ( int i ) const
20 virtual QVariant value ( const QString & name ) const
21 virtual void setValue ( int i, const QVariant & val )
22 virtual void setValue ( const QString & name, const QVariant & val )
23 bool isGenerated ( int i ) const
24 bool isGenerated ( const QString & name ) const
25 virtual void setGenerated ( const QString & name, bool generated )
26 virtual void setGenerated ( int i, bool generated )
27 virtual void setNull ( int i )
28 virtual void setNull ( const QString & name )
29 bool isNull ( int i ) const
30 bool isNull ( const QString & name ) const
31 int position ( const QString & name ) const
32 QString fieldName ( int i ) const
33 QSqlField * field ( int i )
34 QSqlField * field ( const QString & name )
35 const QSqlField * field ( int i ) const
36 const QSqlField * field ( const QString & name ) const
37 virtual void append ( const QSqlField & field )
38 virtual void insert ( int pos, const QSqlField & field )
39 virtual void remove ( int pos )
40 bool isEmpty () const
41 bool contains ( const QString & name ) const
42 virtual void clear ()
43 virtual void clearValues ( bool nullify = FALSE )
44 uint count () const
45 virtual QString toString ( const QString & prefix = QString::null,
46 const QString & sep = "," ) const
47 virtual QStringList toStringList ( const QString & prefix =
48 QString::null ) const
49
51 The QSqlRecord class encapsulates a database record, i.e. a set of
52 database fields.
53
54 The QSqlRecord class encapsulates the functionality and characteristics
55 of a database record (usually a table or view within the database).
56 QSqlRecords support adding and removing fields as well as setting and
57 retrieving field values.
58
59 QSqlRecord is implicitly shared. This means you can make copies of the
60 record in time O(1). If multiple QSqlRecord instances share the same
61 data and one is modifying the record's data then this modifying
62 instance makes a copy and modifies its private copy - thus it does not
63 affect other instances.
64
65 See also QSqlRecordInfo and Database Classes.
66
69 Constructs an empty record.
70
72 Constructs a copy of other.
73
75 Destroys the object and frees any allocated resources.
76
78 Append a copy of field field to the end of the record.
79
80 Reimplemented in QSqlIndex.
81
83 Removes all the record's fields.
84
85 See also clearValues().
86
87 Reimplemented in QSqlCursor.
88
90 Clears the value of all fields in the record. If nullify is TRUE, (the
91 default is FALSE), each field is set to NULL.
92
94 Returns TRUE if ther