Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Config

Keyvify Configuration (Common for all Dialects)

Example:

SQLite

const config = {
     dialect: "sqlite",
     storage: "./database.sqlite"
}

Postgres

const config = {
     dialect: "postgres",
     username: "someuser",
     password: "youshallnotpass",
     host: "localhost",
     port: "8080"
}

MongoDB

const config = {
     dialect: "mongodb",
     uri: "mongodb://mongodb0.example.com:27017"
}

Hierarchy

  • Config

Index

Properties

Optional cache

cache: BaseCache | false

Whether to disable caching

Optional database

database: undefined | string

Database name

Optional deserializer

deserializer: undefined | ((input: string) => any)

Data deserializer

dialect

Can be a Dialect name or the instance of it. Refer all the Dialects here: SupportedDialectsType

Optional host

host: undefined | string

Database's host

Optional password

password: undefined | string

Password of the Database

Optional port

port: undefined | number

Database's Port

Optional serializer

serializer: undefined | ((input: any) => string)

Data serializer

Optional storage

storage: undefined | string

Path to Database file (only when using SQLite)

Optional uri

uri: undefined | string

MongoDB URL (only when using MongoDB)

Optional username

username: undefined | string

Username of the Database

Generated using TypeDoc