Member Junction
    Preparing search index...
    SaveCallBinding:
        | {
            callArgsSQL: string;
            kind: "mssql-declare-exec";
            preambleSQL: string;
            setSQL: string;
            simpleParamsSQL: string;
        }
        | { callArgsSQL: string; kind: "pg-positional"; values: unknown[] }
        | { callArgsSQL: string; kind: "pg-json-arg"; values: [string] }

    Dialect-specific binding shape produced by RenderSaveCallBinding. Treated as opaque by GenerateSaveSQL — the same provider's WrapSaveCallForResult / WrapSaveCallWithRecordChange pattern-match the variant they produced.

    Adding a new dialect (e.g. MySQL) adds a new variant here — touches this file once, no provider-side changes elsewhere.

    Type Declaration

    • {
          callArgsSQL: string;
          kind: "mssql-declare-exec";
          preambleSQL: string;
          setSQL: string;
          simpleParamsSQL: string;
      }

      SQL Server: parameter values inlined as DECLARE/SET statements (so SQL Server's per-save variable naming for batched saves works), with an EXEC line that consumes the variables.

      • callArgsSQL: string

        Comma-joined @CodeName=@x_uuid, ... for the EXEC line.

      • kind: "mssql-declare-exec"
      • preambleSQL: string

        DECLARE @x_uuid type, @y_uuid type — empty if no params.

      • setSQL: string

        SET @x_uuid = N'value'\nSET @y_uuid = 1 — empty if no params.

      • simpleParamsSQL: string

        Back-compat inline single-line @CodeName=N'value', ... form.

    • { callArgsSQL: string; kind: "pg-positional"; values: unknown[] }

      PostgreSQL positional-arg shape: typed $N placeholders bound via values at execution time.

      • callArgsSQL: string

        p_name => $1, p_other => $2 for the call site.

      • kind: "pg-positional"
      • values: unknown[]

        Parameter values bound in $N order.

    • { callArgsSQL: string; kind: "pg-json-arg"; values: [string] }

      PostgreSQL JSON-arg shape for wide entities — single $1::jsonb arg with field values JSON-encoded. Used when the typed-arg shape would exceed ProcedureParamLimit.

      • callArgsSQL: string

        Always p_data => $1::jsonb.

      • kind: "pg-json-arg"
      • values: [string]

        Single-element [jsonString].