import { Pool } from 'pg'
import { pg as named } from 'yesql'
const db = new Pool({
host: 'localhost',
user: 'postgres',
password: '1',
database: 'libcourse'
})
const query = `select * from table where column like '%:var%'`
const result = await db.query(named(query)({var: 'test'})).rows