zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.
Apache License 2.0
399 stars 37 forks source link

Feature proposal: Statements to initialize new connections #195

Open trecloux opened 2 years ago

trecloux commented 2 years ago

Hi all,

Existing connection pools available in spring boot have a common feature to launch some SQL statements to initialize new SQL connections.

This feature is available in spring boot using these properties:

A sample usage is to set the connection TimeZone on PostgreSQL, that not possible with the driver connection properties.

As I understand it, embedded-database-spring-test injects it's own DataSource, so this feature is not available.

The proposal is to implement this feature as part of this library, would you be interested in a such feature ? I can start working on it if you think that it would fit,

tomix26 commented 2 years ago

Hi @trecloux, that's a great idea. I'm definitely interested in this feature and I think I'm not the only one who would appreciate it. Unfortunately I'm quite busy right now, but if you prepare a pull request, I'll make time for a code review and release a new version. Help is always welcome.