提交 4f28a83f authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Copy javadoc to *BackwardsCompat to fix building of documentation

上级 eee80b52
......@@ -17,5 +17,21 @@ public interface JdbcPreparedStatementBackwardsCompat {
// 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;
}
......@@ -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
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
try {
......
......@@ -17,25 +17,124 @@ public interface JdbcStatementBackwardsCompat {
// 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;
/**
* 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;
/**
* 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;
/**
* Executes the batch.
* If one of the batched statements fails, this database will continue.
*
* @return the array of update counts
*/
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;
/**
* 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;
/**
* 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;
/**
* 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;
// 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;
/**
* 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;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论