1.7 KiB
1.7 KiB
title | description | menu | weight | introduced | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
debug.null() function | `debug.null()` returns the null value with a given type. |
|
201 | 0.179.0 |
debug.null()
returns the null value with a given type.
Function type signature
(?type: string) => A where A: Basic
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
type
Null type.
Supported types:
- string
- bytes
- int
- uint
- float
- bool
- time
- duration
- regexp
Examples
Include null values in an ad hoc stream of tables
import "array"
import "internal/debug"
array.from(rows: [{a: 1, b: 2, c: 3}, {a: debug.null(type: "int"), b: 5, c: 6}])
{{< expand-wrapper >}} {{% expand "View example output" %}}
Output data
a | b | c |
---|---|---|
1 | 2 | 3 |
5 | 6 |
{{% /expand %}} {{< /expand-wrapper >}}