createMysqlStateProviderConformanceContext

FunctionExperimental

Signature

function createMysqlStateProviderConformanceContext(__namedParameters): Promise<MysqlStateProviderConformanceContext>;

mysql/src/conformance/state-provider-conformance.ts:97

Parameters

  • __namedParameters
    object
  • __namedParameters.createStateProvider
    () => Promise<MysqlStateProvider<any>>
    Creates the provider under test, over a database the suite may create tables in.
  • __namedParameters.dialect
    "mysql" | "mariadb"
    The server the provider connects to.
  • __namedParameters.stateAdapterOptions?
    Omit<{ countCap?: number; dialect: "mysql" | "mariadb"; generateJobId?: () => string; generateWorkerId?: () => string; jobIdType?: `varchar(${number})` | "uuid"; maxBlockersPerJob?: number; schema?: string; stateProvider: MysqlStateProvider<any>; tablePrefix?: string; validateJobId?: (id) => boolean; validateWorkerId?: (id) => boolean; workerIdType?: `varchar(${number})` | "uuid"; }, "stateProvider" | "dialect">
    Options every adapter of the suite is created with, besides its provider and dialect, such as the schema, tablePrefix and ID types your application configures. The suite migrates and clears the tables they name.
  • __namedParameters.withNonTransactionContext
    <T>(fn) => Promise<T>
    Runs the callback with a context of the provider's shape that is not inside a transaction.
  • __namedParameters.withSavepoint?
    <T>(txCtx, fn) => Promise<T>
    Runs fn in a savepoint of txCtx's transaction, opened the way the application opens one.

Returns

Used in guides

esc

Search guides, integrations and every exported symbol.

↑ ↓ to navigate↵ to open