Member Junction
    Preparing search index...

    Contract a relational data provider implements so a colocated vector provider can borrow its connection — running vector DDL/DML in the SAME database (and, when a transaction is open, the same transaction) as the application's entity data.

    Implemented by SQLServerDataProvider / PostgreSQLDataProvider. When a host is wired in, the vector provider never opens its own pool.

    interface IColocatedVectorHost {
        ColocatedDialect: DatabasePlatform;
        ColocatedSchema: string;
        RunColocatedSQL<T = Record<string, unknown>>(
            sql: string,
            params?: readonly unknown[],
        ): Promise<T[]>;
    }

    Implemented by

    Index

    Properties

    ColocatedDialect: DatabasePlatform

    Which SQL platform this host speaks — selects the colocated provider's SQL/placeholder syntax. Reuses the canonical DatabasePlatform from @memberjunction/sql-dialect.

    ColocatedSchema: string

    Default schema where MJ entity tables/views live (e.g. "__mj").

    Methods

    • Execute a parameterized statement against the host connection and return result rows. Placeholders use the host dialect's native convention: $1..$n (PostgreSQL) or @p0..@pN (SQL Server). Params are positional; index i maps to $${i+1} / @p${i}.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • sql: string
      • Optionalparams: readonly unknown[]

      Returns Promise<T[]>