Polyglot SQL API Documentation - v0.13.1
    Preparing search index...

    Function isExpressionValue

    AST Module

    This module provides types, type guards, helpers, and visitor utilities for working with SQL AST nodes.

    Query builders are in src/builders.ts (WASM-backed).

    • Check if a runtime value looks like an Expression.

      Expressions in the externally tagged format are single-key objects whose key is one of the variants generated from Rust's Expression enum. Checking the exact variant registry prevents one-field payload structs such as { this: expression } from being exposed as phantom expression nodes. DataType's own data_type discriminator also matches an Expression variant: { data_type: 'date' } is a descriptor, whereas the expression envelope is { data_type: { data_type: 'date' } }.

      Parameters

      • value: unknown

      Returns value is ast.Expression