adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.91k stars 94 forks source link

Include query name in `PreparedQuery` #546

Closed logan12358 closed 5 months ago

PhilipTrauner commented 8 months ago

Would be delighted if this made it in! 🙌

Right now I'm hashing the unsubstituted versions of queries to serve as their identifiers when logging. While this does uniquely identify queries regardless of provided bindings, it is definitely less readable than just using their names.