Replies: 1 comment
-
Most of dbmate's functions expects a It could be possible to optionally accept a I suppose if you're invoking |
Beta Was this translation helpful? Give feedback.
-
Most of dbmate's functions expects a It could be possible to optionally accept a I suppose if you're invoking |
Beta Was this translation helpful? Give feedback.
-
Hello,
@amacneil and other contributors I would like to thank you for the good job.
I was looking for a way instead passing a database URL to pass an *sql.DB connection.
This does not look possible from my quick research.
I would like also to point out the following:
there is a driver interface
but when you look at the implementation of postgres
I understood that you try to connect to a default database or something .
On top of that Open is used for every command (see Ping also for example).
What is the reason for this behavior?
Wouldn't be more intuitive to create a database connection and perfom the operatios with this connection ?
This probably would allow to pass an *sql.DB already connected, which would be useful when you want to use dbmate as a library
Beta Was this translation helpful? Give feedback.
All reactions