public interface ConnectionFactory
Connection of database, it is necessary
for ObjectiveSql in runtime. Injecting the ConnectionFactory at the application
initializing.
Get the different dataSourceName while in the multiple data source scenario, the
application should return the different data source by the name.| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_DATA_SOURCE_NAME |
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
getConnection(String dataSourceName)
Return a new connection of database, certainly, the connection can be retrieved
from a connection pool also.
|
default boolean |
isDefaultDataSource(String dataSourceName)
Returns true if current name of data source is
DEFAULT_DATA_SOURCE_NAME |
Connection getConnection(String dataSourceName) throws SQLException
dataSourceName - the name is acquired from ThreadLocalSQLExceptiondefault boolean isDefaultDataSource(String dataSourceName)
DEFAULT_DATA_SOURCE_NAMECopyright © 2020 com.github.braisdom. All rights reserved.