com.github.zhengframework.jdbc.Sql2oProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zheng-jdbc-sql2o Show documentation
Show all versions of zheng-jdbc-sql2o Show documentation
zheng framework module: jdbc sql2o support
package com.github.zhengframework.jdbc;
import javax.inject.Inject;
import javax.inject.Provider;
import javax.sql.DataSource;
import org.sql2o.Sql2o;
public class Sql2oProvider implements Provider {
private Provider dataSourceProvider;
@Inject
public Sql2oProvider(Provider dataSourceProvider) {
this.dataSourceProvider = dataSourceProvider;
}
@Override
public Sql2o get() {
return new Sql2o(dataSourceProvider.get());
}
}