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

    Function getExprData

    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).

    • Get the inner data of an Expression at runtime.

      Type Parameters

      Parameters

      • expr: E

      Returns ExpressionData<E>

      const result = parse("SELECT 1");
      if (result.success && isExpressionType(result.ast[0], 'select')) {
      const selectData = getExprData(result.ast[0]);
      // selectData.expressions, selectData.from, etc.
      }