Support string interface
ClaireNeveu opened this issue · comments
const myQuery = rawSql("select foo, bar from myTable" as const)
The existence of as const
and type-level template literals in typescript allow strings to be properly type-checked as sql then have their types inferred. There's a POC here: https://github.com/andoshin11/sqlpture.
Probably want some kind of type-level parser combinator library to make the code simpler for this.