Skip to main content

Type alias: Config

Config: {"conventions": (conventions: Convention[]) => Convention[];"driver": Driver;"isolation": IsolationLevel;"logger": Logger; }

An object specifying runtime configuration information like the database driver, logger, and default transaction isolation level.

Example

const config = {
driver: new PostgresDriver(),
logger: new ConsoleLogger(),
}

const db = verse({
config,
{
// model definition...
}
});

Type declaration

conventions()?

optional readonly conventions: (conventions: Convention[]) => Convention[]

An optional function that allows you to add or customize conventions.

Parameters

ParameterType
conventionsConvention[]

Returns

Convention[]

driver

readonly driver: Driver

The database driver.

isolation?

optional readonly isolation: IsolationLevel

The default transaction isolation level.

logger?

optional readonly logger: Logger

A logger instance.

Source

packages/verse-core/src/verse.ts:64