toRawType

Full name: taxi.stdlib.toRawType

Signature

declare extension function toRawType(source: Any):Any

Description

Removes the semantic typing from a scalar value, returning it typed as its raw primitive.

Useful when you need to compare values by their raw content while ignoring their semantic type.

  • For a scalar value: strips the semantic type, returning the underlying primitive.
  • For an array of scalars: strips the semantic type from each element.

Not supported on objects or arrays of objects.

find { order: Order } as {
   rawId: String = order.id.toRawType()
}

Examples

Strips the semantic type from a typed scalar, returning the raw primitive value.

Try it out

Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed
Next
Welcome to Taxi