Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

yesql

const sql = require('yesql')('/myproject/sql/',  {type: 'pg'})
const named = require('yesql').pg
const pg = require('pg').connect...

// read from file
pg.query(sql.updatePokemon({price: 5}), (err, result) => {...})

// use only named parameters
pg.query(named('UPDATE pokemon SET price = :price;')({price: 5}), (err, result) => {...})
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #yesql
ADD COMMENT
Topic
Name
8+5 =