8#ifndef DBOBJECTSREQUESTWITHSTREAM_H
9#define DBOBJECTSREQUESTWITHSTREAM_H
44 const QString& conditions =
"" ):
55 for (
int i = 0; i < size; ++i) {
56 auto ptr = QSharedPointer<T>::create();
66 QDataStream &
toStream(QDataStream &stream)
const override {
69 stream << static_cast<int>(
_data.size());
71 for (
auto object:
_data) {
QString table() const override
table This method should be return name of the database table that should be contains objects with th...
QDataStream & toStream(QDataStream &stream) const override
fromStream This method should be write all members of the current object to the stream object.
QDataStream & fromStream(QDataStream &stream) override
fromStream This method should be read all bytes from the stream object and full the current object.
The DBObjectsRequestWithStream class is template class some as DBObjectsRequest but with implementati...
QDataStream & toStream(QDataStream &stream) const override
fromStream This method should be write all members of the current object to the stream object.
DBObjectsRequestWithStream(const Package &pkkg)
DBObjectsRequest This is default constructor for parsing packages.
QDataStream & fromStream(QDataStream &stream) override
fromStream This method should be read all bytes from the stream object and full the current object.
DBObjectsRequestWithStream(const QString &table, const QString &conditions="")
DBObjectsRequest This contsrucor create a object with request the array of T objects.
The DBObjectsRequest class is template class for get array of TEMPLATE Objects from database.
QList< QSharedPointer< T > > _data
The Package struct. This is base structure for transporting data by network between QH nodes....
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...