How to inspect generated query?
Hi I have the following:
the
_results
won't filtered based on affiliate.userId
, what do I do wrong?
Basically, I want to achieve this raw query:
Where .getDBContext()
is returning either PostgresJsDatabase
or PostgresJsTransaction
.3 Replies
You can't call the
.where
method twice, the second will override the first onw
You can pass all the conditions to an and
function
And to inspect the generated query, you can pass { logger: true } to drizzle function when you're intiantiating your db objectCan the log be coloured according to query or mutation?
I don't think drizzle have support for colored logs just yet