Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
4f28a83f
提交
4f28a83f
authored
7 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Copy javadoc to *BackwardsCompat to fix building of documentation
上级
eee80b52
master
version-1.4.198
version-1.4.197
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
128 行增加
和
0 行删除
+128
-0
JdbcPreparedStatementBackwardsCompat.java
...ain/org/h2/jdbc/JdbcPreparedStatementBackwardsCompat.java
+16
-0
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+13
-0
JdbcStatementBackwardsCompat.java
h2/src/main/org/h2/jdbc/JdbcStatementBackwardsCompat.java
+99
-0
没有找到文件。
h2/src/main/org/h2/jdbc/JdbcPreparedStatementBackwardsCompat.java
浏览文件 @
4f28a83f
...
@@ -17,5 +17,21 @@ public interface JdbcPreparedStatementBackwardsCompat {
...
@@ -17,5 +17,21 @@ public interface JdbcPreparedStatementBackwardsCompat {
// JDBC 4.2 (incomplete)
// JDBC 4.2 (incomplete)
/**
* Executes a statement (insert, update, delete, create, drop)
* and returns the update count.
* If another result set exists for this statement, this will be closed
* (even if this statement fails).
*
* If auto commit is on, this statement will be committed.
* If the statement is a DDL statement (create, drop, alter) and does not
* throw an exception, the current transaction (if any) is committed after
* executing the statement.
*
* @return the update count (number of row affected by an insert, update or
* delete, or 0 if no rows or the statement was a create, drop,
* commit or rollback)
* @throws SQLException if this object is closed or invalid
*/
long
executeLargeUpdate
()
throws
SQLException
;
long
executeLargeUpdate
()
throws
SQLException
;
}
}
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
4f28a83f
...
@@ -900,6 +900,19 @@ public class JdbcStatement extends TraceObject implements Statement, JdbcStateme
...
@@ -900,6 +900,19 @@ public class JdbcStatement extends TraceObject implements Statement, JdbcStateme
}
}
}
}
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys supports at most one columns and row.
*
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occurred or a
* select statement was executed
*/
@Override
@Override
public
long
executeLargeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
public
long
executeLargeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/jdbc/JdbcStatementBackwardsCompat.java
浏览文件 @
4f28a83f
...
@@ -17,25 +17,124 @@ public interface JdbcStatementBackwardsCompat {
...
@@ -17,25 +17,124 @@ public interface JdbcStatementBackwardsCompat {
// JDBC 4.2
// JDBC 4.2
/**
* Returns the last update count of this statement.
*
* @return the update count (number of row affected by an insert, update or
* delete, or 0 if no rows or the statement was a create, drop,
* commit or rollback; -1 if the statement was a select).
* @throws SQLException if this object is closed or invalid
*/
long
getLargeUpdateCount
()
throws
SQLException
;
long
getLargeUpdateCount
()
throws
SQLException
;
/**
* Gets the maximum number of rows for a ResultSet.
*
* @param maxRows the number of rows where 0 means no limit
* @throws SQLException if this object is closed
*/
void
setLargeMaxRows
(
long
max
)
throws
SQLException
;
void
setLargeMaxRows
(
long
max
)
throws
SQLException
;
/**
* Gets the maximum number of rows for a ResultSet.
*
* @return the number of rows where 0 means no limit
* @throws SQLException if this object is closed
*/
long
getLargeMaxRows
()
throws
SQLException
;
long
getLargeMaxRows
()
throws
SQLException
;
/**
* Executes the batch.
* If one of the batched statements fails, this database will continue.
*
* @return the array of update counts
*/
long
[]
executeLargeBatch
()
throws
SQLException
;
long
[]
executeLargeBatch
()
throws
SQLException
;
/**
* Executes a statement (insert, update, delete, create, drop)
* and returns the update count.
* If another result set exists for this statement, this will be closed
* (even if this statement fails).
*
* If auto commit is on, this statement will be committed.
* If the statement is a DDL statement (create, drop, alter) and does not
* throw an exception, the current transaction (if any) is committed after
* executing the statement.
*
* @param sql the SQL statement
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occurred or a
* select statement was executed
*/
long
executeLargeUpdate
(
String
sql
)
throws
SQLException
;
long
executeLargeUpdate
(
String
sql
)
throws
SQLException
;
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys supports at most one columns and row.
*
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occurred or a
* select statement was executed
*/
long
executeLargeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
;
long
executeLargeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
;
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys supports at most one columns and row.
*
* @param sql the SQL statement
* @param columnIndexes ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occurred or a
* select statement was executed
*/
long
executeLargeUpdate
(
String
sql
,
int
columnIndexes
[])
throws
SQLException
;
long
executeLargeUpdate
(
String
sql
,
int
columnIndexes
[])
throws
SQLException
;
/**
* Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys supports at most one columns and row.
*
* @param sql the SQL statement
* @param columnNames ignored
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occurred or a
* select statement was executed
*/
long
executeLargeUpdate
(
String
sql
,
String
columnNames
[])
throws
SQLException
;
long
executeLargeUpdate
(
String
sql
,
String
columnNames
[])
throws
SQLException
;
// JDBC 4.3 (incomplete)
// JDBC 4.3 (incomplete)
/**
* Enquotes the specified identifier.
*
* @param identifier
* identifier to quote if required
* @param alwaysQuote
* if {@code true} identifier will be quoted unconditionally
* @return specified identifier quoted if required or explicitly requested
*/
String
enquoteIdentifier
(
String
identifier
,
boolean
alwaysQuote
)
throws
SQLException
;
String
enquoteIdentifier
(
String
identifier
,
boolean
alwaysQuote
)
throws
SQLException
;
/**
* Checks if specified identifier may be used without quotes.
*
* @param identifier
* identifier to check
* @return is specified identifier may be used without quotes
*/
boolean
isSimpleIdentifier
(
String
identifier
)
throws
SQLException
;
boolean
isSimpleIdentifier
(
String
identifier
)
throws
SQLException
;
}
}
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论