Keyv
MSSQL storage adapter forUsage
Install keyv and keyv-mssql
npm install --save keyv keyv-mssql
Then Create a new Keyv instance, passing an instanciated KeyvMssql object as the store
const Keyv = ;const KeyvMssql = ; const store = connection: user: "SA" password: "Password1" host: "localhost" database: "TestDB" ;const keyv = store: store ;
You can specify a custom table with the table
option, the primary key size with keySize
, and whether or not to use null as default with useNullAsDefault
.
e.g:
const store = connection: user: "SA" password: "Password1" host: "localhost" database: "TestDB" table: "keyv" useNullAsDefault: true keySize: 255;