tsql
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

tsql

Simple wrapper for a more friendly tedious.

import {Pool} from 'tsql'
 
interface User {
  id: number
  name: string
}
 
async function main() {
  let pool = new Pool('mssql://user:password@localhost/database')
 
  let params = {id: 12}
  let rows: User[] = await pool.query`SELECT id, name FROM users WHERE id = ${params.id}`
}
 
main()

Readme

Keywords

none

Package Sidebar

Install

npm i tsql

Weekly Downloads

2

Version

0.1.7

License

MIT

Last publish

Collaborators

  • litek