Caching QSqlQueries
Unsolved
General and Desktop
-
In order to allow caching the changes in
QSqlRelationalTableModel
i changed it's EditStrategy toOnManualSubmit
, but at the same time I am usingQSqlQueries
to update values of records or to copy the records.I was trying to work 100% on the models by getting the records (I can paste the exact code, but here it is for the brevity):
QSqlRecord record_basis = table_model->database().record(table_name); record.setValue(...); ... table_model->insertRecord(record );
but it failed with the
QSqlRelationalTableModel
, was workingo only fine withQSqlTableModel
so I switched to work with table queries.Is there any neat way of caching
QSqlQueries
and executing them on submit? I guess no, because QSqlQueries work directly on the table, not on the model. Should I just create queue and call them one buy one before submit?