blakeembrey / blakeembrey/sql-template-tag

[feat]: Unique name for prepared statement

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
393
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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.:

```ts
import { xxh32 } from "@node-rs/xxhash";

get name() {
return xxh32(this.text).toString(16);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.