Open EmrysMyrddin opened 4 years ago
Any reason this wouldn't work?
client.query(Object.assign(sql`select ...`, { explain: true }));
Yes it probably works but it's really difficult to read for me.
@felixfbecker Hey ! Do you thing this can have some interest or you want to close it ?
It could be great to allow user to add custom attribute to the returned query.
My use-case is the usage of a custom Postgres client which enables some debuging utilities :
In this example, my client will also log the query plan of the request.
Today, I have to write it like this using your module, and it's not very handy:
I have tried with some destructuring but it doesn't play nicely with classes...
My proposition is to allow the addition of custom attributes in the same way we add a name:
This way it is really simple for me to add/remove my little debugging trick !
What do you think about this ?