You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to apply my migrations to an in-memory sqlite db and then generate the go-jet structures using that. However, right now it's not possible as GenerateDSN takes a connection string instead of an existing DB connection. My workaround is to write the DB to a temporary file and use that. I am aware that I can make the DB global in-memory to the process and then connect to it. However, this ruins isolation from other DBs in the process.
I also use alternative sqlite implementations like "modernc.org/sqlite" which are registered as "sqlite" instead of "sqlite3" which the GenerateDSN expects so I have to reregister the driver I want as "sqlite3" before calling the generator.
Describe the solution you'd like
Add the following function that behaves the same as GenerateDSN except it applies directly to the supplied *sql.DB.
Is your feature request related to a problem? Please describe.
I want to apply my migrations to an in-memory sqlite db and then generate the go-jet structures using that. However, right now it's not possible as GenerateDSN takes a connection string instead of an existing DB connection. My workaround is to write the DB to a temporary file and use that. I am aware that I can make the DB global in-memory to the process and then connect to it. However, this ruins isolation from other DBs in the process.
I also use alternative sqlite implementations like "modernc.org/sqlite" which are registered as "sqlite" instead of "sqlite3" which the GenerateDSN expects so I have to reregister the driver I want as "sqlite3" before calling the generator.
Describe the solution you'd like
Add the following function that behaves the same as GenerateDSN except it applies directly to the supplied *sql.DB.
The text was updated successfully, but these errors were encountered: