aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/sqlite.hh
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-08-04 20:20:59 -0700
committerJade Lovelace <lix@jade.fyi>2024-08-08 14:53:17 -0700
commit4ed8461cacced97717bf9a7525e12ba69fe168c0 (patch)
tree03308b2f43692cc306cb0f2825144a7ff97fc46a /src/libstore/sqlite.hh
parenta318c96851579b2a9812034c3a42f0e3fef05d9a (diff)
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
Diffstat (limited to 'src/libstore/sqlite.hh')
-rw-r--r--src/libstore/sqlite.hh1
1 files changed, 1 insertions, 0 deletions
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<std::string> getStrNullable(int col);
int64_t getInt(int col);
bool isNull(int col);
};