diff options
Diffstat (limited to '')
| -rw-r--r-- | README.md | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -451,6 +451,11 @@ Now when you bind a value of type `MyArray` the value returned by `bindField` wi | |||
| 451 | 451 | ||
| 452 | Same for reading, when you select _into_ a `MyArray` row or field the value returned by `readField` will be used instead. | 452 | Same for reading, when you select _into_ a `MyArray` row or field the value returned by `readField` will be used instead. |
| 453 | 453 | ||
| 454 | _NOTE_: when you _do_ allocate in `bindField` or `readField` make sure to pass a `std.heap.ArenaAllocator`-based allocator. | ||
| 455 | |||
| 456 | The binding or reading code does not keep tracking of allocations made in custom types so it can't free the allocated data itself; it's therefore required | ||
| 457 | to use an arena to prevent memory leaks. | ||
| 458 | |||
| 454 | # Comptime checks | 459 | # Comptime checks |
| 455 | 460 | ||
| 456 | Prepared statements contain _comptime_ metadata which is used to validate every call to `exec`, `one` and `all` _at compile time_. | 461 | Prepared statements contain _comptime_ metadata which is used to validate every call to `exec`, `one` and `all` _at compile time_. |