Commit Graph

9 Commits

Author SHA1 Message Date
Marco Bubke
2bf45ec998 Sqlite: Fix handling of blob and blob views
Change-Id: I90c31307ff3299975f820e191085ba93ed8afe0f
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-19 12:25:22 +00:00
Marco Bubke
710b96cc89 Sqlite: Value can now handle blob too
This can be quite handy if we want to handle images in the database
dynamically.

Change-Id: I76b87d6b59e999b043bb2335192c90a371187431
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-30 07:30:08 +00:00
Marco Bubke
d1b0c12d6b QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.

Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-16 10:01:21 +00:00
Marco Bubke
acf5329422 Sqlite: Fix null handling
Most of it is only silencing a warning but one is fixing a faulty test. So
writing null values should now be working.

Change-Id: If702e1fc8176a9e0ae82a5589c719d567929202b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-10 09:05:00 +00:00
Tim Jenssen
90fcca16e8 sqlite: mingw compile fix
Change-Id: Ia427231c864144b7a83a8346e050acc2d4531851
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-05 16:04:03 +00:00
Marco Bubke
a61eff0079 Sqlite: Add session support
Session are captured by hooking in the sqlite changes. They are saved in
blobs and containing inserts, update and deletes. Because the are
semantically coupled to translactions we add a

Change-Id: Ie095558ebc50601fcaae32958ebeeb98b72d73b9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-05 09:52:42 +00:00
Marco Bubke
7a274cc4aa Sqlite: A value std::string constructor
Change-Id: Ife68911bdafdf75e6cf39d46ae430c95d06bfba4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-26 18:11:56 +02:00
Marco Bubke
33a833d187 Sqlite: Add null value
So we can distingish between a null value and zero or an empty string.

Change-Id: I9122fdafdf85cf04dcf8bca7bf294be9b28ee251
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-14 18:02:18 +00:00
Marco Bubke
0e1870368c Sqlite: Add Sqlite::Value
It adds a layer if you don't know if the type is integer, float or string.
It does not handle bytearrays here because so far there is no need. There
are two classes, Sqlite::Value and Sqlite::ValueView. Value owns the
string, ValueView holds only a view the string. So there is no allocation.
It is designed to hold Utf-8 string like Sqlite but it can be easily
converted in and from QString or QVariant but mind about that this is not
free. ValueView has no constructors on perpose because it would be
ambiguous if there would be constructors for the other primitives of
the Sqlite layer like "int64", "double" and "string view".

Change-Id: Ia39364eb2fc1998e5c59fdb4316add22c748507d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-27 18:17:11 +00:00