I need to set table_schema when using Norm to select from a specific database.table_schema.table on Postgres.
The point of ORM is to provide an OO abstraction layer on top of DB so that you don't think in shemas and tables but instead in objects and collections.
But the answer is still yes, you can use Norm with a custom DB but this makes very little sense since you'll basically have to define manually what Norm would generate for you automatically.
Also is it possible to mix sqlite/postgres modules in a single project?
It should be possible. You just won't be able to use global config. But since you explicitly pass DbConn to Norm procs, you're freee to pass different connections in different places of your project.
I am sorry I have tried to use this but it just does not work. When I try to import norm/[sqlite,postgres]
and have open a dbcon var iWantPostgres = postgres.open(....).
I can't do iWantPostgres.select(...<-here it wants to use sqlite select).
Also I cant seem to be able to connect to a specific table schema. Or at least I dont know how.
I have something like this production.(public|cron|other_schema).users
I am totally not sure how do I connect to users. This SQL query works in console select "public".users.user, "public".users.status from "public".users where "public".users.id = 1 LIMIT 1
But any variations with tableName does not work as it puts quotes at wrong places ie "public.users". Either only schema is in quotes or nothing is in quotes.