StatementBackwardsCompat
Allows us to compile on older platforms, while still implementing the methods
from the newer JDBC API.
Methods |
String |
enquoteIdentifier(String identifier, boolean alwaysQuote)
Enquotes the specified identifier.
|
String |
enquoteIdentifier(String identifier, boolean alwaysQuote) throws SQLException
Enquotes the specified identifier.
Parameters:
identifier - identifier to quote if required
alwaysQuote - if {@code true} identifier will be quoted unconditionally
Returns:
specified identifier quoted if required or explicitly requested
|
long[] |
executeLargeBatch()
Executes the batch.
|
long[] |
executeLargeBatch() throws SQLException
Executes the batch.
If one of the batched statements fails, this database will continue.
Returns:
the array of update counts
|
long |
executeLargeUpdate(String sql)
Executes a statement (insert, update, delete, create, drop)
and returns the update count.
|
long |
executeLargeUpdate(String sql) 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.
Parameters:
sql - the SQL statement
Returns:
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)
Executes a statement and returns the update count.
|
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.
Parameters:
sql - the SQL statement
autoGeneratedKeys - ignored
Returns:
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)
Executes a statement and returns the update count.
|
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.
Parameters:
sql - the SQL statement
columnIndexes - ignored
Returns:
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)
Executes a statement and returns the update count.
|
long |
executeLargeUpdate(String sql, String[] columnNames) 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.
Parameters:
sql - the SQL statement
columnNames - ignored
Returns:
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 |
getLargeMaxRows()
Gets the maximum number of rows for a ResultSet.
|
long |
getLargeMaxRows() throws SQLException
Gets the maximum number of rows for a ResultSet.
Returns:
the number of rows where 0 means no limit
Throws:
SQLException - if this object is closed
|
long |
getLargeUpdateCount()
Returns the last update count of this statement.
|
long |
getLargeUpdateCount() throws SQLException
Returns the last update count of this statement.
Returns:
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
|
boolean |
isSimpleIdentifier(String identifier)
Checks if specified identifier may be used without quotes.
|
boolean |
isSimpleIdentifier(String identifier) throws SQLException
Checks if specified identifier may be used without quotes.
Parameters:
identifier - identifier to check
Returns:
is specified identifier may be used without quotes
|
void |
setLargeMaxRows(long max)
Gets the maximum number of rows for a ResultSet.
|
void |
setLargeMaxRows(long max) throws SQLException
Gets the maximum number of rows for a ResultSet.
Parameters:
max - the number of rows where 0 means no limit
Throws:
SQLException - if this object is closed
|
|