diff options
author | Marvin W <git@larma.de> | 2021-03-06 08:31:53 -0600 |
---|---|---|
committer | Marvin W <git@larma.de> | 2021-03-06 08:31:53 -0600 |
commit | 9acb54df9254609f2fe4de83c9047d408412de28 (patch) | |
tree | 851f86316e0f8161b9913349f624ceab0f5e8d38 /qlite | |
parent | 80498c7e37170f993bb94d9c1234a2972c0692ac (diff) | |
download | dino-9acb54df9254609f2fe4de83c9047d408412de28.tar.gz dino-9acb54df9254609f2fe4de83c9047d408412de28.zip |
QLite: Adjust Real for latest vala version
Diffstat (limited to 'qlite')
-rw-r--r-- | qlite/src/column.vala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qlite/src/column.vala b/qlite/src/column.vala index 60125ddf..45385f38 100644 --- a/qlite/src/column.vala +++ b/qlite/src/column.vala @@ -96,12 +96,14 @@ public abstract class Column<T> { } } - public class Real : Column<double> { - public Real(string name) { + public class NullableReal : Column<double?> { + public NullableReal(string name) { base(name, FLOAT); } - public override double get(Row row, string? table_name = DEFALT_TABLE_NAME) { + public override bool not_null { get { return false; } set {} } + + public override double? get(Row row, string? table_name = DEFALT_TABLE_NAME) { return row.get_real(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); } @@ -109,7 +111,7 @@ public abstract class Column<T> { return !row.has_real(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); } - internal override void bind(Statement stmt, int index, double value) { + internal override void bind(Statement stmt, int index, double? value) { stmt.bind_double(index, value); } } |