go-jet / jet

Type safe SQL builder with code generation and automatic query result data mapping
Apache License 2.0
2.23k stars 110 forks source link

Support for reading from schema file instead of dsn #271

Closed NamLH1310 closed 4 months ago

NamLH1310 commented 10 months ago

I am running to a case where I cannot access to dsn due to ACL. Therefore, reading the schema from a file would be nice.

houten11 commented 10 months ago

What stops you from spinning up the local dev environment?

amanbolat commented 9 months ago

@houten11 What you are requesting seems to be out of scope of this library. Generating the code from an SQL Schema file requires parsing the file.

However, you already have schema, why not just spin up local docker and generate code from there?

qazwsxedckll commented 2 months ago

@go-jet It is because the dsn is changing so the command cannot be stored in Makefile or scripts and I have to teach other people how to use the command many times.

go-jet commented 2 months ago

Hi @qazwsxedckll. I assume dsn is changing because there is no local development set up. Lack of local development is a such bad practice, and adding a new feature to jet just to support such a practice is out of the question.
Also, see this discussion for more info https://github.com/go-jet/jet/discussions/150, https://github.com/go-jet/jet/discussions/165.