Description
Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it
I get frustrated whenever I try to create a database on the fly within my microservices. I would like to be able to make on-the-fly databases with the Microsoft SQL Server driver that my microservices can consume, since many times, I deploy them with the name of the desired database (For example, in continuous integration and testing situations) . It's something I can do with other database drivers, however, but not with yours.
Describe the preferred solution
For example with H2 or MySQL I have the ability to create databases on the fly. Either the driver itself creates them without specifying anything, or instead, adding some additional parameter as in the case of MySQL (createDatabaseIfNotExist = true). I think that the solution would be to incorporate some type of parameter to the Microsoft SQL jdbc driver that allows creating databases on the fly and does not cause an exception if the database does not exist.
I think, as a developer, that this is not as complex as simply adding a handler of the desired parameter and that in case of some type of exception related to the fact that the database does not exist, instead of returning it to the application, that issue an SQL statement "CREATE DATABASE (Database name)" on the connection string with the database name excluded and try connecting to the newly created database again.
Describe alternatives you've considered
Another solution to this problem could be that the driver creates the databases in the air instead of throwing an exception that it could not create them. But it is clear that there are situations in which this kind of behavior does not interest.
Additional context
Above all, I find this functionality useful in testing or pre-production environments, where it may be that the required database does not exist and the continuous integration process cannot continue since the driver has thrown a fatal exception and has killed the process to be tested. . This option would also be interesting for ephemeral architecture environments, where one day you can have a microservice in charge of a specific task and the next another microservice that does totally different tasks.
Reference Documentations/Specifications
Metadata
Metadata
Assignees
Labels
Type
Projects
Status