Represents a connection to a SQL database
AnythingObjectSQLConnectionBasicIdentifiableObjectAnythingno subtypes hierarchy
| Initializer |
SQLConnection(SQLConnection unknown) |
| Inherited Attributes |
Attributes inherited from: Objecthash, string |
| Methods | |
call | shared default SQLConnection call(String sql, Anything(Throwable|ResultSet) resultHandler)Calls the given SQL Parameters:
|
callWithParams | shared default SQLConnection callWithParams(String sql, Array params, Array outputs, Anything(Throwable|ResultSet) resultHandler)Calls the given SQL Parameters:
|
close | shared default void close()Closes the connection. Important to always close the connection when you are done so it's returned to the pool. |
close | shared default void close(Anything(Throwable?) handler)Closes the connection. Important to always close the connection when you are done so it's returned to the pool. Parameters:
|
commit | shared default SQLConnection commit(Anything(Throwable?) handler)Commits all changes made since the previous commit/rollback. Parameters:
|
execute | shared default SQLConnection execute(String sql, Anything(Throwable?) resultHandler)Executes the given SQL statement Parameters:
|
query | shared default SQLConnection query(String sql, Anything(Throwable|ResultSet) resultHandler)Executes the given SQL Parameters:
|
queryWithParams | shared default SQLConnection queryWithParams(String sql, Array params, Anything(Throwable|ResultSet) resultHandler)Executes the given SQL Parameters:
|
rollback | shared default SQLConnection rollback(Anything(Throwable?) handler)Rolls back all changes made since the previous commit/rollback. Parameters:
|
setAutoCommit | shared default SQLConnection setAutoCommit(Boolean autoCommit, Anything(Throwable?) resultHandler)Sets the auto commit flag for this connection. True by default. Parameters:
|
update | shared default SQLConnection update(String sql, Anything(Throwable|UpdateResult) resultHandler)Executes the given SQL statement which may be an Parameters:
|
updateWithParams | shared default SQLConnection updateWithParams(String sql, Array params, Anything(Throwable|UpdateResult) resultHandler)Executes the given prepared statement which may be an Parameters:
|
| Inherited Methods |
Methods inherited from: Objectequals |