UNPKG

bs-lesstedious

Version:

Hello! This project provides typed bindings to the LessTedious library from Bucklescript / Reason.

40 lines (28 loc) 713 B
# Bucklescript / Reason bindings for LessTedious Hello! This project provides typed bindings to the LessTedious library from Bucklescript / Reason. ## Installation ``` npm install --save bs-lesstedious ``` Then include `bs-lesstedious` in your `bs-dependencies` in your `bsconfig.json`. ## Usage ``` import LessTedious.Core let options: configOptions = { database: "dbname", encrypt: true, }; let dbconfig: config = { server: "localhost", username: "uname", password: "pword", options, }; type user = { username: string } let getUsernames: query(user) = { sql: "select username from users (nolock)" } let p: Js.Promise(array(user)) = execute(dbconfig, getUsernames) ```