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.
Type declaration
conventions()?
readonly
optional
conventions: (conventions
:Convention
[]) =>Convention
[]
An optional function that allows you to add or customize conventions.
Parameters
Parameter | Type |
---|---|
conventions | Convention [] |
Returns
driver
readonly
driver:Driver
The database driver.
isolation?
readonly
optional
isolation:IsolationLevel
The default transaction isolation level.
logger?
readonly
optional
logger:Logger
A logger instance.
Example
const config = {
driver: new PostgresDriver(),
logger: new ConsoleLogger(),
}
const db = verse({
config,
{
// model definition...
}
});