From 9db36d6394b907a289d4a91661c822a29d947930 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sat, 16 Apr 2022 21:51:22 +0200 Subject: document CreateFunctionFlag --- sqlite.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sqlite.zig') diff --git a/sqlite.zig b/sqlite.zig index b310939..52a28dd 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -601,8 +601,16 @@ pub const Db = struct { return Savepoint.init(self, name); } + /// CreateFunctionFlag controls the flags used when creating a custom SQL function. + /// See https://sqlite.org/c3ref/c_deterministic.html. + /// + /// The flags SQLITE_UTF16LE, SQLITE_UTF16BE are not supported yet. SQLITE_UTF8 is the default and always on. + /// + /// TODO(vincent): allow these flags when we know how to handle UTF16 data. pub const CreateFunctionFlag = struct { + /// Equivalent to SQLITE_DETERMINISTIC deterministic: bool = true, + /// Equivalent to SQLITE_DIRECTONLY direct_only: bool = true, }; -- cgit v1.2.3