From 4ed8461cacced97717bf9a7525e12ba69fe168c0 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sun, 4 Aug 2024 20:20:59 -0700 Subject: sqlite: add a Use::fromStrNullable There were several usages of the raw sqlite primitives along with C style casts, seemingly because nobody thought to use an optional for getting a string or NULL. Let's fix this API given we already *have* a wrapper. Change-Id: I526cceedc2e356209d8fb62e11b3572282c314e8 --- src/libstore/sqlite.hh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstore/sqlite.hh') diff --git a/src/libstore/sqlite.hh b/src/libstore/sqlite.hh index 003e4d101..ca021087f 100644 --- a/src/libstore/sqlite.hh +++ b/src/libstore/sqlite.hh @@ -107,6 +107,7 @@ struct SQLiteStmt bool next(); std::string getStr(int col); + std::optional getStrNullable(int col); int64_t getInt(int col); bool isNull(int col); }; -- cgit v1.2.3