Closed canuran closed 1 year ago
Generating models from the command line is sometimes not easy to use, when we need to create a table while executing the command:
func TestJetGen(t *testing.T) { // after create table in memory wd, _ := os.Getwd() err := sqlitegen.GenerateDSN("file::memory:?cache=shared", path.Join(wd, "jetgen")) assert.Nil(t, err) }
Even some companies' databases cannot be connected through dsn, but use it's sdk to create sql.DB objects. At this time, we need to rewrite the GenerateDSN method.
I found it from wiki.
Generating models from the command line is sometimes not easy to use, when we need to create a table while executing the command:
Even some companies' databases cannot be connected through dsn, but use it's sdk to create sql.DB objects. At this time, we need to rewrite the GenerateDSN method.