How to create a variable with the same name as the table name?
I have my schema defined like this.
And then I have this file, where I'm trying to query the users.
Is there anyway I can reuse the name of the table? For example, const
Also, I'm new to Postgres and JS ORMs in general, coming from Entity Framework, is there a way to define the model/schema in singular terms and then the ORM rename the table to a plural form? I mean, my schema would be User and then in the database, it will be Users.
Thanks!
And then I have this file, where I'm trying to query the users.
Is there anyway I can reuse the name of the table? For example, const
users?Also, I'm new to Postgres and JS ORMs in general, coming from Entity Framework, is there a way to define the model/schema in singular terms and then the ORM rename the table to a plural form? I mean, my schema would be User and then in the database, it will be Users.
Thanks!