Union Functions

Union Functions

isCase

available since: 1.0.0

Reports whether a union value has a certain case.

struct {}bool

Example:

Query:
e.data(d.list(d.expr(e.isCase({
  • value: e.data(d.union("foo", d.string("bar"))),
  • case: d.string("foo"),
}
)
)
, d.expr(e.isCase({
  • value: e.data(d.union("foo", d.string("bar"))),
  • case: d.string("bar"),
}
)
)
)
)
Result:
[ true, false ]