TreeFrogFramework: src/tsqlobject.h Source File
21 virtual QString tableName() const;
25 void setRecord(const QSqlRecord &record, const QSqlError &error);
26 bool create() override;
27 bool update() override;
28 bool save() override;
29 bool remove() override;
31 bool isNull() const override { return QSqlRecord::isEmpty(); }
32 bool isNew() const { return QSqlRecord::isEmpty(); }
34 void clear() override { QSqlRecord::clear(); }
35 QSqlError error() const { return sqlError; }
The TModelObject class provides an abstract base for model objects.
Definition tmodelobject.h:9
The TSqlObject class is the base class of ORM objects.
Definition tsqlobject.h:13
virtual int autoValueIndex() const
Returns the position of the auto-generated value field on the table.
Definition tsqlobject.h:23
bool isNull() const override
Returns true if there is no database record associated with the object; otherwise returns false.
Definition tsqlobject.h:31
virtual int databaseId() const
Returns the database ID.
Definition tsqlobject.h:24
QSqlError sqlError
Definition tsqlobject.h:42
bool isNew() const
Returns true if it is a new object, otherwise returns false.
Definition tsqlobject.h:32
void clear() override
Clears the contents of the object.
Definition tsqlobject.h:34
QSqlError error() const
Returns a QSqlError object which contains information about the last error that occurred on the datab...
Definition tsqlobject.h:35
virtual int primaryKeyIndex() const
Returns the position of the primary key field on the table.
Definition tsqlobject.h:22
virtual ~TSqlObject()
Definition tsqlobject.h:19
#define T_CORE_EXPORT
Definition tdeclexport.h:28