@botbuildercommunity/storage-mssql
v1.0.1
Published
Microsoft SQL Server storage option for the Microsoft Bot Framework
Downloads
5
Readme
Bot Builder Microsoft SQL Server Storage
This is a simple storage adapter for Microsoft SQL Server.
Installation
npm install @botbuildercommunity/storage-mssql --save
Usage
import { MSSQLStorage } from '@botbuildercommunity/storage-mssql';
const storage = new MSSQLStorage({
user: <DATABASE_USERNAME>,
password: <DATABASE_PASSWORD>,
server: <DATABASE_SERVER>,
database: <DATABASE_NAME>,
table: <DATABASE_TABLE>
});
const conversationState = new ConversationState(storage);
const userState = new UserState(storage);
This module uses the node-mssql package for SQL connectivity. The
MSSQLOptions
that is passed to theMSSQLStorage
object extends theconfig
object of that package. All options from thatconfig
option can be passed in.
This module assumes two string-based columns in your database table:
id
anddata
.