Commit Graph

5 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
9c44f8d88d Sqlite: Add blob support
Change-Id: Ic2ec5f20c8585241b9e9aaa8465e70b6ab4f004c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-27 13:09:27 +00: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