diff options
| -rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -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 | ||
| 565 | It's probably possible to support arbitrary types if they can be marshaled to a sqlite type. This is something to investigate. | 565 | It 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 | ||
| 619 | You can define a aggregate function using `db.createAggregateFunction`: | 619 | You can define an aggregate function using `db.createAggregateFunction`: |
| 620 | ```zig | 620 | ```zig |
| 621 | const MyContext = struct { | 621 | const MyContext = struct { |
| 622 | sum: u32, | 622 | sum: u32, |
| @@ -647,5 +647,5 @@ const result = try db.one(usize, "SELECT mySum(nb) FROM foobar", .{}, .{}); | |||
| 647 | Each input arguments in the function call in the statement is passed on to the registered `step` function. | 647 | Each input arguments in the function call in the statement is passed on to the registered `step` function. |
| 648 | The `finalize` function is called once at the end. | 648 | The `finalize` function is called once at the end. |
| 649 | 649 | ||
| 650 | The context (2nd argument of `createAggregateFunction`) can be whatever you want; both `step` and `finalize` function must | 650 | The context (2nd argument of `createAggregateFunction`) can be whatever you want; both the `step` and `finalize` functions must |
| 651 | have their first argument of the same type as the context. | 651 | have their first argument of the same type as the context. |