This test suite is prepared to test the newly added annotations for SQL databases and introspection support for bal persist
.
Create alias for the ballerina distribution built from persist-tools
and spin up docker containers for databases.
alias balx=path/to/your/bal/distribution/bin/bal
cd docker
docker compose up --build --force-recreate -d
Delete persist
and modules
directories.
Run the pull command
balx persist pull --host localhost --user root --database hospital --port 3300
Enter password
Verify there are no changes in persist/model.bal
file.
Run the generate command
balx persist generate --datastore mysql --module entities
Verify there are no changes in modules/entities
Run the tests
balx test
Delete persist
and modules
directories.
Run the pull command
balx persist pull --host localhost --user root --database hospital_unsupported --port 3300
Enter password
Verify there are no changes in persist/model.bal
file.
Run the generate command
balx persist generate --datastore mysql --module entities
Verify there are no changes in modules/entities
Run the tests
balx test
Delete the modules
directory.
Run the generate command (remember to use the correct datastore).
balx persist generate --datastore mssql --module entities
Verify there are no changes in modules/entities
Run the tests
balx test
Delete the modules
directory.
Run the generate command (remember to use the correct datastore).
balx persist generate --datastore mssql --module entities
Verify there are no changes in modules/entities
Run the tests
balx test
cd docker
docker compose down