node-sql-template-strings icon indicating copy to clipboard operation
node-sql-template-strings copied to clipboard

Feature request: nested SQL query

Open HanchaiN opened this issue 2 months ago • 0 comments

While the append method is a nice way to extend the query, sometimes I want something different. For example,

const book = 'harry potter'
const author = 'J. K. Rowling'
const query = SQL`SELECT author FROM books WHERE category = (${SQL`SELECT category FROM books WHERE name = ${book}`}) AND author = ${author}`

Is something like this possible?

HanchaiN avatar Nov 30 '25 05:11 HanchaiN