diff options
author | eerielili <lionel@les-miquelots.net> | 2024-08-25 13:32:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 13:32:38 +0000 |
commit | 45755727db79a2935376d24e7bde7eadb0f2f7ca (patch) | |
tree | 73715da99c9d980079df6f2d561822364655e04d /qlite | |
parent | 62cdea3a5e701c04f3a7fd9d6b5f48e28fef1f72 (diff) | |
parent | 51252f74c94c17d56aa75534652bdc5d43a504cb (diff) | |
download | dino-add-yourself.tar.gz dino-add-yourself.zip |
Merge branch 'master' into add-yourselfadd-yourself
Diffstat (limited to 'qlite')
-rw-r--r-- | qlite/src/upsert_builder.vala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qlite/src/upsert_builder.vala b/qlite/src/upsert_builder.vala index 7daf7109..79104972 100644 --- a/qlite/src/upsert_builder.vala +++ b/qlite/src/upsert_builder.vala @@ -26,9 +26,13 @@ public class UpsertBuilder : StatementBuilder { return this; } - public UpsertBuilder value_null<T>(Column<T> column) { + public UpsertBuilder value_null<T>(Column<T> column, bool key = false) { if (column.not_null) error("Can't set non-null column %s to null", column.name); - fields += new NullField<T>(column); + if (key) { + keys += new NullField<T>(column); + } else { + fields += new NullField<T>(column); + } return this; } |