Replies: 1 comment
-
|
Currently, the returned value of func (e TestEntity) GetTableName() string {
return "org1.t_user"
}I'm not sure if you want to use one struct to reference user tables in different schemas. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
in Postgres, databases can be "namespaced" using different schemas, with the default schema being "public".
so by default on a db connection the GetTableName() which if for example returned
t_userswould be referring to the table atpublic.t_users.However it would be useful to be able to reference different schemas e.g:
public.t_users
org1.t_users
org2.t_users
financeteam.t_users
etc
Beta Was this translation helpful? Give feedback.
All reactions