tsql
v0.1.7
Published
Tagged template literals for tedious
Downloads
12
Readme
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()