Modifier and Type | Method and Description |
---|---|
IDatabaseConnectionHolder |
JDBC.getConnectionHolder(String dataSourceName) |
IDatabaseConnectionHolder |
JDBC.getDefaultConnectionHolder() |
Modifier and Type | Method and Description |
---|---|
IDatabaseSession |
JDBC.openSession(IDatabaseConnectionHolder connectionHolder) |
<T> T |
JDBC.openSession(IDatabaseConnectionHolder connectionHolder,
IDatabaseSessionExecutor<T> executor) |
<T> T |
IDatabase.openSession(IDatabaseConnectionHolder connectionHolder,
IDatabaseSessionExecutor<T> executor)
开启会话并执行会话执行器接口逻辑(执行完毕会话将自动关闭)
|
void |
JDBC.releaseConnectionHolder(IDatabaseConnectionHolder connectionHolder) |
Modifier and Type | Method and Description |
---|---|
IDatabaseConnectionHolder |
AbstractOperator.getConnectionHolder() |
IDatabaseConnectionHolder |
IOperator.getConnectionHolder()
获取当前使用的数据库连接对象
|
Constructor and Description |
---|
AbstractOperator(String sql,
IDatabaseConnectionHolder connectionHolder) |
AbstractOperator(String sql,
IDatabaseConnectionHolder connectionHolder,
IAccessorConfig accessorConfig) |
Modifier and Type | Class and Description |
---|---|
class |
DefaultDatabaseConnectionHolder
默认数据库Connection对象持有者接口实现
|
Modifier and Type | Method and Description |
---|---|
IDatabaseConnectionHolder |
DefaultDatabaseSession.getConnectionHolder() |
Constructor and Description |
---|
DefaultDatabaseSession(IDatabase owner,
IDatabaseConnectionHolder connectionHolder) |
Modifier and Type | Method and Description |
---|---|
static String |
Query.wrapIdentifierField(IDatabaseConnectionHolder connectionHolder,
String field) |
Modifier and Type | Method and Description |
---|---|
static TableInfo |
TableInfo.create(IDatabaseConnectionHolder connectionHolder,
Scaffold scaffold,
String tableName,
boolean view) |
Modifier and Type | Method and Description |
---|---|
protected IDatabaseConnectionHolder |
BaseEntity.doGetSafeConnectionHolder() |
IDatabaseConnectionHolder |
BaseEntity.getConnectionHolder() |
IDatabaseConnectionHolder |
EntityWrapper.getConnectionHolder() |
static IDatabaseConnectionHolder |
BaseEntity.getSafeConnectionHolder(IDatabase owner,
IDatabaseConnectionHolder connectionHolder,
String dataSourceName)
确保能够正确获取到数据库连接持有对象,即连接持有对象为null时尝试获取JDBC默认连接
|
Modifier and Type | Method and Description |
---|---|
static <Entity extends IEntity> |
BaseEntity.find(IDatabase owner,
IDatabaseConnectionHolder connectionHolder,
String dataSourceName,
IShardingable shardingable,
Class<Entity> entityClass,
Where where,
Fields fields,
Page page,
IDBLocker dbLocker) |
static <Entity extends IEntity> |
BaseEntity.findFirst(IDatabase owner,
IDatabaseConnectionHolder connectionHolder,
String dataSourceName,
IShardingable shardingable,
Class<Entity> entityClass,
Where where,
Fields fields,
IDBLocker dbLocker) |
static IDatabaseConnectionHolder |
BaseEntity.getSafeConnectionHolder(IDatabase owner,
IDatabaseConnectionHolder connectionHolder,
String dataSourceName)
确保能够正确获取到数据库连接持有对象,即连接持有对象为null时尝试获取JDBC默认连接
|
void |
BaseEntity.setConnectionHolder(IDatabaseConnectionHolder connectionHolder) |
void |
EntityWrapper.setConnectionHolder(IDatabaseConnectionHolder connectionHolder) |
Modifier and Type | Method and Description |
---|---|
IDatabaseConnectionHolder |
ITransaction.getConnectionHolder(String dsName)
获取数据库连接持有者对象
|
Modifier and Type | Method and Description |
---|---|
void |
ITransaction.registerConnectionHolder(IDatabaseConnectionHolder connectionHolder)
注册一个ConnectionHolder对象由事务管理(相同数据源仅允许注册一次)
|
Modifier and Type | Method and Description |
---|---|
IDatabaseConnectionHolder |
DefaultTransaction.getConnectionHolder(String dsName) |
Modifier and Type | Method and Description |
---|---|
void |
DefaultTransaction.registerConnectionHolder(IDatabaseConnectionHolder connectionHolder) |
Copyright © 2022. All rights reserved.