diff options
author | Mark Brand <mabrand@mabrand.nl> | 2011-03-29 15:27:17 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:47 (GMT) |
commit | b855615b228bdb3ff9583a8342684d79acb46128 (patch) | |
tree | 8f235cb38c18886a9eb54f6c8ee89c5295940ac9 /LICENSE.PREVIEW.COMMERCIAL | |
parent | d5560e2cc3271138cf977ebd83f346a375278fd8 (diff) | |
download | Qt-b855615b228bdb3ff9583a8342684d79acb46128.zip Qt-b855615b228bdb3ff9583a8342684d79acb46128.tar.gz Qt-b855615b228bdb3ff9583a8342684d79acb46128.tar.bz2 |
let generated flag control SQL generation
Previously, if QSqlField's QVariant value had type "invalid", this
caused the field to be omitted in data-changing SQL statements generated
from QSqlRecord edit buffers.
Complaints against this mechanism:
- It precludes initializing value type to field type, which would
otherwise seem sensible and useful, such as when using model.data() in
contexts where the field type is not readily available.
- QSqlField::clear() does initialize value type to match field type and
so is incompatible with this mechanism.
- Problems such as described in QTBUG-13211.
- Unwanted distinction between "invalid" and "null" when mapping field
values to SQL values.
- QSqlField's generated flag already provides a mechanism for
controlling SQL generation.
These complaints are redressed here by replacing this mechanism with
reliance on QSqlField's generated flag. The flag is initialized to false
in new edit records and set to true when a value is set. Applications
can still manipulate generated flags directly to control SQL generation.
Generation of SELECT statements already used the generated flag and is
unaffected by this change.
Merge-request: 1114
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Michael Goddard
Diffstat (limited to 'LICENSE.PREVIEW.COMMERCIAL')
0 files changed, 0 insertions, 0 deletions