Open
Description
Repro:
let {createPool, sql} = require('slonik')
const {raw} = require('slonik-sql-tag-raw')
let slonik = createPool('postgresql://postgres:postgres@localhost:5432/postgres')
const queryFromFileSystem = `
select $$
this is just a string, it should be able to have any value
but this causes an error --> :foo:
$$
`
slonik.query(sql`${raw(queryFromFileSystem)}`)
Running this throws an error: InvalidInputError: Named parameter reference does not have a matching value.
Edit: it also reproduces for single-quoted strings:
select '
this is just a string, it should be able to have any value
but this causes an error --> :foo:
'
Metadata
Metadata
Assignees
Labels
No labels