I want to be able to prefix the table of my query, with a schema, using the pg adapter.
Context
Let's say there is function in my codebase that accepts a schema does something like:
query({
text: `SELECT *
FROM schema.user
WHERE id = $1::uuid`,
values: [id]
})
I want to be able to use pg-mem and pass the the pg adapter's query in order to test it, but keep the query text as is. Currently, I cannot find a way that pg adapter accepts the table prefixed with the schema like that.
I also tried something like SELECT * from current_schema().user but this does not seem to be supported either.
I want to be able to prefix the table of my query, with a schema, using the
pg
adapter.Context Let's say there is function in my codebase that accepts a schema does something like:
I want to be able to use
pg-mem
and pass the thepg
adapter'squery
in order to test it, but keep the query text as is. Currently, I cannot find a way thatpg
adapter accepts the table prefixed with the schema like that.I also tried something like
SELECT * from current_schema().user
but this does not seem to be supported either.