Skip to content
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

Feature proposal: Statements to initialize new connections #195

Open
trecloux opened this issue Apr 27, 2022 · 1 comment
Open

Feature proposal: Statements to initialize new connections #195

trecloux opened this issue Apr 27, 2022 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@trecloux
Copy link
Contributor

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:

  • spring.datasource.dbcp2.connection-init-sqls
  • spring.datasource.tomcat.init-s-q-l
  • spring.datasource.hikari.connection-init-sql

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
Copy link
Collaborator

tomix26 commented May 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants