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

Provide a way to customize the DatabaseConfig #26

Closed
smougenot opened this issue Jun 4, 2013 · 2 comments
Closed

Provide a way to customize the DatabaseConfig #26

smougenot opened this issue Jun 4, 2013 · 2 comments

Comments

@smougenot
Copy link

For particular DBs it might be necessary to adjust behaviours using DatabaseConfig.
ex : a custom DataTypeFactory for use in Sybase (date fields are "specials")

For exemple :
Add a way to specify a "listener" that would have a method with the DatabaseConfig passed as a parameters.

Some code could be

void configureConnection(final IDatabaseConnection datasourceConnection) {
        final DatabaseConfig config = datasourceConnection.getConfig();

        // batch
        config.setProperty(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, true);

        // types
        config.setProperty(DatabaseConfig.FEATURE_DATATYPE_WARNING, true);
        config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new  DataTypeFactoryPatch());
    }

If I've some time I'll create a pull request.

@rsertelon
Copy link
Contributor

Hi @smougenot Is this issue still relevant?

@rsertelon
Copy link
Contributor

No answer in two weeks, I'm closing this issue that is already more than a year old.

If needed, just reopen it.

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

No branches or pull requests

2 participants