How / Where does the record returned from the DB get mapped to a plain JS object? #521
Unanswered
anthonyorona
asked this question in
Q&A
Replies: 1 comment
-
Slonik is built on top of pg. Additional details here: https://github.com/gajus/slonik#pg-vs-slonik
Here's a good starting point in slonik/src/connectionMethods/query.ts Lines 10 to 41 in 1228dba If you want to modify the behavior of slonik, you can use an interceptor, specifically a result parser interceptor or some of the community interceptors to modify how result objects are built |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using slonik to handle some of my more complex queries. I would like to learn more about where the DB row gets mapped to a plain JS object
Beta Was this translation helpful? Give feedback.
All reactions