We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f7181e commit d1e3865Copy full SHA for d1e3865
README.md
@@ -625,12 +625,14 @@ try db.createAggregateFunction(
625
"mySum",
626
&my_ctx,
627
struct {
628
- fn step(ctx: *MyContext, input: u32) void {
+ fn step(fctx: sqlite.FunctionContext, input: u32) void {
629
+ var ctx = fctx.userContext(*MyContext) orelse return;
630
ctx.sum += input;
631
}
632
}.step,
633
- fn finalize(ctx: *MyContext) u32 {
634
+ fn finalize(fctx: sqlite.FunctionContext) u32 {
635
+ const ctx = fctx.userContext(*MyContext) orelse return 0;
636
return ctx.sum;
637
638
}.finalize,
0 commit comments