Iskra API Reference
    Preparing search index...

    Interface OracleSession

    What runs statements, the driver or a transaction: a repository typed against it works with both, and with a test fake.

    interface OracleSession {
        execute<
            T = Record<string, unknown>,
            const B extends OracleBinds = OracleBinds,
        >(
            sql: string,
            binds?: B,
            options?: StatementOptions,
        ): Promise<ExecuteResult<T, OutBinds<B>>>;
        executeMany(
            sql: string,
            rows: readonly OracleBinds[],
            options?: ExecuteManyOptions,
        ): Promise<ExecuteManyResult>;
        list<T = Record<string, unknown>, F = unknown, O = unknown>(
            options: ListOptions<T, F, O>,
            statement?: StatementOptions,
        ): Promise<ListResult<T>>;
        one<T = Record<string, unknown>>(
            sql: string,
            binds?: OracleBinds,
            options?: QueryOptions<T>,
        ): Promise<T>;
        query<T = Record<string, unknown>>(
            sql: string,
            binds?: OracleBinds,
            options?: QueryOptions<T>,
        ): Promise<T[]>;
        queryOne<T = Record<string, unknown>>(
            sql: string,
            binds?: OracleBinds,
            options?: QueryOptions<T>,
        ): Promise<T | undefined>;
    }

    Hierarchy (View Summary)

    Index
    • A page of rows and its counts (see ListOptions).

      Type Parameters

      • T = Record<string, unknown>
      • F = unknown
      • O = unknown

      Parameters

      Returns Promise<ListResult<T>>

    • The first row of a query, or a NoRowsError (NOT_FOUND, a 404 in web-kit).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<T>

    • The rows of a query.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<T[]>

    • The first row of a query (fetching only that one), or undefined.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<T | undefined>