sql-template-tag
sql-template-tag copied to clipboard
[feat]: Unique name for prepared statement
Hi! Thanks for this awersome library!
Some library like pg has a name parameter for prepared statement. My suggestion is autogenerate this name, maybe by hashing the SQL
Eg.:
import { xxh32 } from "@node-rs/xxhash";
get name() {
return xxh32(this.text).toString(16);
}