/** * Creates the data source based on a JDBC url. See `Config.fromJdbcUrl` for * more details. * * @param url * the JDBC url * @return the data source instance */ public static MysqlDataSource fromJdbcUrl(final String url) { return create(io.trane.ndbc.DataSource.fromJdbcUrl(url)); }
/** * Creates the data source based on system properties. See * `Config.fromSystemProperties` for more details. * * @param prefix * the configuration prefix * @return the data source instance */ public static DataSource<PreparedStatement, Row> fromSystemProperties(final String prefix) { return fromConfig(Config.fromSystemProperties(prefix)); }
/** * Creates the data source based on a `Config` instance. * * @param config * the config * @return the data source instance */ public static PostgresDataSource fromConfig(final Config config) { return create(DataSource.fromConfig(config)); }
/** * Creates the data source based on a `Config` instance. * * @param config * the config * @return the data source instance */ public static MysqlDataSource fromConfig(final Config config) { return create(DataSource.fromConfig(config)); }
/** * Creates the data source based on a JDBC url. See `Config.fromJdbcUrl` for * more details. * * @param url * the JDBC url * @return the data source instance */ public static DataSource<PreparedStatement, Row> fromJdbcUrl(final String url) { return fromConfig(Config.fromJdbcUrl(url)); }
/** * Creates the data source based on a `Properties` object. See * `Config.fromProperties` for more details. * * @param prefix * the configuration prefix * @param properties * the properties object * @return the data source instance */ public static DataSource<PreparedStatement, Row> fromProperties(final String prefix, final Properties properties) { return fromConfig(Config.fromProperties(prefix, properties)); }
/** * Creates the data source based on system properties. See * `Config.fromSystemProperties` for more details. * * @param prefix * the configuration prefix * @return the data source instance */ public static PostgresDataSource fromSystemProperties(final String prefix) { return create(io.trane.ndbc.DataSource.fromSystemProperties(prefix)); }
/** * Creates the data source based on a JDBC url. See `Config.fromJdbcUrl` for * more details. * * @param url * the JDBC url * @return the data source instance */ public static PostgresDataSource fromJdbcUrl(final String url) { return create(io.trane.ndbc.DataSource.fromJdbcUrl(url)); }
/** * Creates the data source based on system properties. See * `Config.fromSystemProperties` for more details. * * @param prefix * the configuration prefix * @return the data source instance */ public static MysqlDataSource fromSystemProperties(final String prefix) { return create(io.trane.ndbc.DataSource.fromSystemProperties(prefix)); }
/** * Creates the data source based on a `Properties` object. See * `Config.fromProperties` for more details. * * @param prefix * the configuration prefix * @param properties * the properties object * @return the data source instance */ public static PostgresDataSource fromProperties(final String prefix, final Properties properties) { return create(io.trane.ndbc.DataSource.fromProperties(prefix, properties)); }
/** * Creates the data source based on a `Properties` object. See * `Config.fromProperties` for more details. * * @param prefix * the configuration prefix * @param properties * the properties object * @return the data source instance */ public static MysqlDataSource fromProperties(final String prefix, final Properties properties) { return create(io.trane.ndbc.DataSource.fromProperties(prefix, properties)); }
@Override public Future<Void> commit() { return underlying.commit(); } };
public final Config poolMaxSize(final Optional<Integer> poolMaxSize) { return new Config(dataSourceSupplierClass, host, port, user, charset, scheduler, password, database, poolMaxSize, poolMaxWaiters, connectionTimeout, queryTimeout, poolValidationInterval, encodingClasses, nioThreads, ssl, embedded); }
public final Config queryTimeout(final Optional<Duration> queryTimeout) { return new Config(dataSourceSupplierClass, host, port, user, charset, scheduler, password, database, poolMaxSize, poolMaxWaiters, connectionTimeout, queryTimeout, poolValidationInterval, encodingClasses, nioThreads, ssl, embedded); }