mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix comment
This commit is contained in:
@@ -25,6 +25,7 @@ import cn.hutool.v7.db.sql.*;
|
||||
import cn.hutool.v7.db.sql.Condition.LikeType;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@@ -43,13 +44,20 @@ import java.util.Map;
|
||||
* @author Looly
|
||||
*/
|
||||
public abstract class AbstractDb<R extends AbstractDb<R>> extends DefaultConnectionHolder implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3858951941916349062L;
|
||||
|
||||
/**
|
||||
* 是否支持事务
|
||||
*/
|
||||
protected Boolean isSupportTransaction = null;
|
||||
/**
|
||||
* 数据库执行器
|
||||
*/
|
||||
protected DialectRunner runner;
|
||||
/**
|
||||
* 数据库配置
|
||||
*/
|
||||
protected DbConfig dbConfig;
|
||||
/**
|
||||
* 是否大小写不敏感(默认大小写不敏感)
|
||||
|
@@ -27,6 +27,9 @@ import java.sql.SQLException;
|
||||
*/
|
||||
public class DefaultConnectionHolder implements ConnectionHolder {
|
||||
|
||||
/**
|
||||
* 数据源
|
||||
*/
|
||||
protected final DataSource ds;
|
||||
|
||||
/**
|
||||
|
@@ -25,12 +25,66 @@ import cn.hutool.v7.core.text.StrUtil;
|
||||
* @author Looly
|
||||
*/
|
||||
public enum DialectName {
|
||||
ANSI, MYSQL, ORACLE, POSTGRESQL, SQLITE3, H2, SQLSERVER, SQLSERVER2012, PHOENIX, DM, HANA;
|
||||
/**
|
||||
* ANSI标准SQL数据库类型,代表使用ANSI SQL标准的数据库系统
|
||||
*/
|
||||
ANSI,
|
||||
|
||||
/**
|
||||
* MySQL数据库类型,代表MySQL数据库系统
|
||||
*/
|
||||
MYSQL,
|
||||
|
||||
/**
|
||||
* Oracle数据库类型,代表Oracle数据库系统
|
||||
*/
|
||||
ORACLE,
|
||||
|
||||
/**
|
||||
* PostgreSQL数据库类型,代表PostgreSQL数据库系统
|
||||
*/
|
||||
POSTGRESQL,
|
||||
|
||||
/**
|
||||
* SQLite3数据库类型,代表SQLite 3.x版本的轻量级嵌入式数据库
|
||||
*/
|
||||
SQLITE3,
|
||||
|
||||
/**
|
||||
* H2数据库类型,代表H2内存或磁盘数据库系统
|
||||
*/
|
||||
H2,
|
||||
|
||||
/**
|
||||
* SQL Server数据库类型,代表Microsoft SQL Server数据库系统
|
||||
*/
|
||||
SQLSERVER,
|
||||
|
||||
/**
|
||||
* SQL Server 2012数据库类型,代表Microsoft SQL Server 2012版本的数据库系统
|
||||
*/
|
||||
SQLSERVER2012,
|
||||
|
||||
/**
|
||||
* Phoenix数据库类型,代表Apache Phoenix数据库系统(基于HBase)
|
||||
*/
|
||||
PHOENIX,
|
||||
|
||||
/**
|
||||
* 达梦数据库类型,代表国产达梦(DM)数据库系统
|
||||
*/
|
||||
DM,
|
||||
|
||||
/**
|
||||
* SAP HANA数据库类型,代表SAP HANA实时内存数据库系统
|
||||
*/
|
||||
HANA;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为指定数据库方言,检查时不分区大小写
|
||||
*
|
||||
* @param dialectName 方言名
|
||||
* @param dialectName 方言名
|
||||
* @return 是否时Oracle数据库
|
||||
* @since 5.7.2
|
||||
*/
|
||||
|
@@ -30,6 +30,7 @@ import cn.hutool.v7.db.sql.Query;
|
||||
import cn.hutool.v7.db.sql.QuoteWrapper;
|
||||
import cn.hutool.v7.db.sql.SqlBuilder;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
@@ -39,9 +40,16 @@ import java.sql.PreparedStatement;
|
||||
* @author loolly
|
||||
*/
|
||||
public class AnsiSqlDialect implements Dialect {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2088101129774974580L;
|
||||
|
||||
/**
|
||||
* ANSI SQL 方言
|
||||
*/
|
||||
protected DbConfig dbConfig;
|
||||
/**
|
||||
* 默认的QuoteWrapper
|
||||
*/
|
||||
protected QuoteWrapper quoteWrapper = new QuoteWrapper();
|
||||
|
||||
/**
|
||||
|
@@ -18,32 +18,21 @@ package cn.hutool.v7.db.ds.pooled;
|
||||
|
||||
import cn.hutool.v7.core.lang.wrapper.Wrapper;
|
||||
|
||||
import java.sql.Array;
|
||||
import java.sql.Blob;
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Clob;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.NClob;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLClientInfoException;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Savepoint;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Struct;
|
||||
import java.sql.*;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* 连接包装,用于丰富功能
|
||||
* @author Looly
|
||||
*
|
||||
* @author Looly
|
||||
*/
|
||||
public abstract class ConnectionWrapper implements Connection, Wrapper<Connection> {
|
||||
|
||||
/**
|
||||
* 原始的连接
|
||||
*/
|
||||
protected Connection raw;//真正的连接
|
||||
|
||||
@Override
|
||||
@@ -307,7 +296,7 @@ public abstract class ConnectionWrapper implements Connection, Wrapper<Connectio
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getRaw(){
|
||||
public Connection getRaw() {
|
||||
return this.raw;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,13 @@ import java.sql.SQLException;
|
||||
*/
|
||||
public abstract class AbsRowHandler<R> implements RowHandler<R> {
|
||||
|
||||
/**
|
||||
* {@link ResultSetMetaData}
|
||||
*/
|
||||
protected final ResultSetMetaData meta;
|
||||
/**
|
||||
* 列数
|
||||
*/
|
||||
protected final int columnCount;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user