Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Loading...
Searching...
No Matches
getmaxintegerid.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef GETMAXINTEGERID_H
9#define GETMAXINTEGERID_H
10
11#include "dbobject.h"
12
13
14namespace QH {
15namespace PKG {
16
20class HEARTSHARED_EXPORT GetMaxIntegerId: public DBObject
21{
22
23public:
29 GetMaxIntegerId(const QString& table, const QString& field);
30
35 int value() const;
36
37 DBObject *createDBObject() const override;
38 PrepareResult prepareSelectQuery(QSqlQuery &q) const override;
39 bool fromSqlRecord(const QSqlRecord &q) override;
40 bool isCached() const override;
41 QString table() const override;
42
43private:
44 QString _table;
45 QString _field;
46 int _value;
47};
48
49}
50}
51#endif // GETMAXINTEGERID_H
bool fromSqlRecord(const QSqlRecord &q) override
fromSqlRecord This method should be initialize this object from the executed sqlRecord....
PrepareResult prepareSelectQuery(QSqlQuery &q) const override
prepareSelectQuery This method should be prepare a query for selected data. Override this method for ...
int value() const
value This method return Maximum value of a sql tables field.
DBObject * createDBObject() const override
createDBObject This method should be create a object with the some type as the object called this met...
QString table() const override
table This method should be return name of the database table that should be contains objects with th...
bool isCached() const override
isCached This method sholud be return status of object. If this method return true then this object c...
GetMaxIntegerId(const QString &table, const QString &field)
GetMaxIntegerId This is default constructor of the GetMaxIntegerId class.
The PKG namesapce - this namespace contains all default packages of the Heart library....
Definition heart.h:211
PrepareResult
The PrepareResult enum is result of work prepare sql query of dbobjects.
Definition dbobject.h:24
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13