-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose CLI API programmatically #948
Comments
What functions do you need to run from the CLI? You can setup and run migrations manually: https://docs.rs/sqlx/0.4.2/sqlx/migrate/struct.Migrator.html Creating and dropping databases can be done in SQL, that's all |
I am interested in the I am using the Using the |
You'll probably be interested in #941 then as it aims to make |
Thank you for the link, I will follow this MR then. I still think that it would be nice if any feature provided by the CLI was also available through an API. |
From what I understand – apart from Most of sqlx-cli is minuscule, see the implementation of the |
I confirm that everything is possible with the API. The wording in the issue may be overly general when I was mostly interested in You may close this issue if you feel that it is not relevant. |
I would like to avoid installing the CLI manually and would prefer to use it from a
build.rs
file. This way I can define it as a build dependency and have it in myCargo.lock
. It would also be one less command to have to install manually.The current implementation only exposes the
Opt
struct andrun
function. Would it be possible to expose more functions?The text was updated successfully, but these errors were encountered: