cotton icon indicating copy to clipboard operation
cotton copied to clipboard

Support schemas in query builder

Open zcdunn opened this issue 4 years ago • 2 comments

I might be missing something, but I don't see any examples of using the query builder to run a query in a specific schema. Looking through the code, I don't see any functions on the query builder to add a schema prefix either. I tried the snippet below to query my database:

const users = await db.table("app.user").where("id", 1).execute();
console.log(users);

But it fails with a PostgresError: relation "app.user" does not exist

zcdunn avatar Feb 24 '21 14:02 zcdunn

Did you solve the above issue?

khk37601 avatar Aug 04 '21 01:08 khk37601

I wasn't able to solve the issue using the query builder. I had to write out the whole query.

zcdunn avatar Oct 01 '21 00:10 zcdunn