Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
landawn committed Jan 26, 2021
1 parent edf1fd6 commit 42bed2e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/main/java/com/landawn/abacus/util/SQLExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.landawn.abacus.DirtyMarker;
import com.landawn.abacus.EntityId;
import com.landawn.abacus.IsolationLevel;
import com.landawn.abacus.annotation.Beta;
import com.landawn.abacus.core.DirtyMarkerUtil;
import com.landawn.abacus.exception.DuplicatedResultException;
import com.landawn.abacus.exception.UncheckedSQLException;
Expand Down Expand Up @@ -504,6 +505,31 @@ public SQLExecutor(final DataSource dataSource, final JdbcSettings jdbcSettings,
_defaultIsolationLevel = defaultIsolationLevel;
}

/**
*
* @param url
* @param user
* @param password
* @return
*/
@Beta
public static SQLExecutor create(final String url, final String user, final String password) {
return new SQLExecutor(JdbcUtil.createHikariDataSource(url, user, password));
}

/**
*
* @param driverClass
* @param url
* @param user
* @param password
* @return
*/
@Beta
public static SQLExecutor create(final DataSource dataSource) {
return new SQLExecutor(dataSource);
}

/**
*
* @return
Expand Down

0 comments on commit 42bed2e

Please sign in to comment.