summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2025-05-06 01:07:43 +0200
committerGravatar Vincent Rischmann2025-05-06 01:07:43 +0200
commit35be8ba98eaf7e77a7cbd16e0c5cb34caccd76cd (patch)
tree2fe1713923548b2c5c50a1e47c479048062fa2ee /README.md
parentci: pin to zig 0.14.0 (diff)
downloadzig-sqlite-35be8ba98eaf7e77a7cbd16e0c5cb34caccd76cd.tar.gz
zig-sqlite-35be8ba98eaf7e77a7cbd16e0c5cb34caccd76cd.tar.xz
zig-sqlite-35be8ba98eaf7e77a7cbd16e0c5cb34caccd76cd.zip
update readme
Diffstat (limited to '')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 041b715..f4c1b15 100644
--- a/README.md
+++ b/README.md
@@ -562,7 +562,7 @@ There are a limited number of types allowed currently:
562 * strings with `sqlite.Text`. 562 * strings with `sqlite.Text`.
563 * blobs with `sqlite.Blob`. 563 * blobs with `sqlite.Blob`.
564 564
565It's probably possible to support arbitrary types if they can be marshaled to a sqlite type. This is something to investigate. 565It is probably possible to support arbitrary types if they can be marshaled to an SQLite type. This is something to investigate.
566 566
567**NOTE**: this is done at compile time and is quite CPU intensive, therefore it's possible you'll have to play with [@setEvalBranchQuota](https://ziglang.org/documentation/master/#setEvalBranchQuota) to make it compile. 567**NOTE**: this is done at compile time and is quite CPU intensive, therefore it's possible you'll have to play with [@setEvalBranchQuota](https://ziglang.org/documentation/master/#setEvalBranchQuota) to make it compile.
568 568
@@ -616,7 +616,7 @@ Each input arguments in the function call in the statement is passed on to the r
616 616
617## Aggregate functions 617## Aggregate functions
618 618
619You can define a aggregate function using `db.createAggregateFunction`: 619You can define an aggregate function using `db.createAggregateFunction`:
620```zig 620```zig
621const MyContext = struct { 621const MyContext = struct {
622 sum: u32, 622 sum: u32,
@@ -647,5 +647,5 @@ const result = try db.one(usize, "SELECT mySum(nb) FROM foobar", .{}, .{});
647Each input arguments in the function call in the statement is passed on to the registered `step` function. 647Each input arguments in the function call in the statement is passed on to the registered `step` function.
648The `finalize` function is called once at the end. 648The `finalize` function is called once at the end.
649 649
650The context (2nd argument of `createAggregateFunction`) can be whatever you want; both `step` and `finalize` function must 650The context (2nd argument of `createAggregateFunction`) can be whatever you want; both the `step` and `finalize` functions must
651have their first argument of the same type as the context. 651have their first argument of the same type as the context.