Member Junction
    Preparing search index...

    One-shot transpiler for MemberJunction T-SQL → PostgreSQL via the MJ sqlglot dialect (mj_postgres.py). Unlike SqlGlotClient (a long-lived FastAPI microservice for generic dialect conversion), this invokes the dialect script directly per call — deterministic, no server lifecycle, suited to CLI batch conversion where each migration is transpiled exactly once.

    The dialect's contract: every input statement is either emitted as PostgreSQL or reported in unhandled — never silently dropped.

    const transpiler = new MJPostgresTranspiler({ extraBitColumns: bitCols });
    const result = await transpiler.transpile(keptTsql);
    // result.sql → PG statements; result.unhandled → gaps to surface
    Index

    Constructors

    Methods

    • Collect the BIT/BOOLEAN column registry (Table.Column pairs) declared in the given SQL — used to build the cross-file registry from baselines before transpiling individual migrations.

      Parameters

      • sql: string

      Returns Promise<string[]>

    • Verify the interpreter + sqlglot are available; throws with install guidance if not.

      Returns Promise<void>