A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

A

AbstractQueryCommand(java.lang.String) - Constructor in Sql.AbstractQueryCommand
add(Map<String,Object>) - Method in DataSet
Adds the provided map of key-value pairs as a new row in the table represented by this DataSet.
add(java.util.Map) - Method in GroovyResultSet
Adds a new row to this result set
add(java.util.Map) - Method in GroovyResultSetExtension
Adds a new row to the result set
addBatch(List<Object>) - Method in BatchingPreparedStatementWrapper
addBatch(java.lang.String) - Method in BatchingStatementWrapper
ALL_RESULT_SETS - Field in Sql
ARRAY - Field in Sql
asBoolean(groovy.sql.GroovyResultSet) - Method in SqlExtensions
Coerce a GroovyResultSet to a boolean value.
asList(java.lang.String, java.sql.ResultSet, int, int, groovy.lang.Closure) - Method in Sql
asSql(groovy.lang.GString, List<Object>) - Method in Sql
Hook to allow derived classes to override sql generation from GStrings.

B

batchCount - Field in BatchingStatementWrapper
BatchingPreparedStatementWrapper - Class in groovy.sql
Class which delegates to a PreparedStatement but keeps track of a batch count size.
BatchingPreparedStatementWrapper(java.sql.PreparedStatement, List<Tuple>, int, java.util.logging.Logger, groovy.sql.Sql) - Constructor in BatchingPreparedStatementWrapper
BatchingStatementWrapper - Class in groovy.sql
Class which delegates to a Statement but keeps track of a batch count size.
BatchingStatementWrapper(java.sql.Statement, int, java.util.logging.Logger) - Constructor in BatchingStatementWrapper
batchSize - Field in BatchingStatementWrapper
BIGINT - Field in Sql
BINARY - Field in Sql
BIT - Field in Sql
BLOB - Field in Sql
BOOLEAN - Field in Sql
buildSqlWithIndexedProps(java.lang.String) - Method in Sql
Hook to allow derived classes to override behavior associated with the parsing and indexing of parameters from a given sql statement.

C

cacheConnection(groovy.lang.Closure) - Method in DataSet
cacheConnection(groovy.lang.Closure) - Method in Sql
Caches the connection used while the closure is active.
cacheStatements(groovy.lang.Closure) - Method in Sql
Caches every created preparedStatement in Closure closure Every cached preparedStatement is closed after closure has been called.
call(groovy.lang.GString, groovy.lang.Closure) - Method in Sql
Performs a stored procedure call with the given parameters, calling the closure once with all result objects.
callWithAllRows(java.lang.String, List<Object>, groovy.lang.Closure) - Method in Sql
Performs a stored procedure call with the given parameters, calling the closure once with all result objects, and also returning a list of lists with the rows of the ResultSet(s).
callWithRows(java.lang.String, List<Object>, int, groovy.lang.Closure) - Method in Sql
Base internal method for call(), callWithRows(), and callWithAllRows() style of methods.
CHAR - Field in Sql
checkForNamedParams(java.lang.String, List<Object>) - Method in Sql
clear() - Method in GroovyRowResult
clearBatch() - Method in BatchingStatementWrapper
CLOB - Field in Sql
close() - Method in BatchingStatementWrapper
close() - Method in DataSet
close() - Method in Sql
If this SQL object was created with a Connection then this method closes the connection.
closeResources(java.sql.Connection, java.sql.Statement) - Method in DataSet
closeResources(java.sql.Connection) - Method in Sql
An extension point allowing the behavior of resource closing to be overridden in derived classes.
closeResources(java.sql.ResultSet) - Method in Sql.AbstractQueryCommand
After performing the execute operation and making use of its return, it's necessary to free the resources allocated for the statement.
commit() - Method in DataSet
commit() - Method in Sql
If this SQL object was created with a Connection then this method commits the connection.
configure(java.sql.Statement) - Method in Sql
Provides a hook for derived classes to be able to configure JDBC statements.
containsKey(java.lang.Object) - Method in GroovyRowResult
Checks if the result contains (ignoring case) the given key.
containsValue(java.lang.Object) - Method in GroovyRowResult
createConnection() - Method in DataSet
createConnection() - Method in Sql
An extension point allowing derived classes to change the behavior of connection creation.
createPreparedQueryCommand(java.lang.String, List<Object>) - Method in Sql
Factory for the PreparedQueryCommand command pattern object allows subclass to supply implementations of the command class.
createQueryCommand(java.lang.String) - Method in Sql
Factory for the QueryCommand command pattern object allows subclasses to supply implementations of the command class.
createView(groovy.lang.Closure) - Method in DataSet

D

DATALINK - Field in Sql
DataSet - Class in groovy.sql
An enhancement of Groovy's Sql class providing support for accessing and querying databases using POGO fields and operators rather than JDBC-level API calls and RDBMS column names.
DataSet(groovy.sql.Sql, java.lang.String) - Constructor in DataSet
dataSet(Class<?>) - Method in Sql
DATE - Field in Sql
DECIMAL - Field in Sql
DISTINCT - Field in Sql
doCall(groovy.sql.BatchingPreparedStatementWrapper) - Method in DataSet
DOUBLE - Field in Sql

E

each(int, int, groovy.lang.Closure) - Method in DataSet
Calls the provided closure for a "page" of rows from the table represented by this DataSet.
eachRow(groovy.lang.Closure) - Method in GroovyResultSet
Call the closure once for each row in the result set.
eachRow(groovy.lang.Closure) - Method in GroovyResultSetExtension
Call the closure once for each row in the result set.
eachRow(groovy.lang.GString, groovy.lang.Closure) - Method in Sql
Performs the given SQL query calling the given Closure with each row of the result set.
entrySet() - Method in GroovyRowResult
equals(java.lang.Object) - Method in GroovyRowResult
execute(groovy.lang.GString, groovy.lang.Closure) - Method in Sql
Executes the given SQL with embedded expressions inside.
execute() - Method in Sql.AbstractQueryCommand
Execute the command that's defined by the subclass following the Command pattern.
executeBatch() - Method in BatchingStatementWrapper
executeInsert(groovy.lang.GString, List<String>) - Method in Sql
Executes the given SQL statement (typically an INSERT statement).
executePreparedQuery(java.lang.String, List<Object>) - Method in Sql
Useful helper method which handles resource management when executing a prepared query which returns a result set.
executeQuery(java.lang.String) - Method in Sql
Useful helper method which handles resource management when executing a query which returns a result set.
executeUpdate(groovy.lang.GString) - Method in Sql
Executes the given SQL update with embedded expressions inside.
expand(java.lang.Object) - Method in Sql
When using GString SQL queries, allows a variable to be expanded in the Sql string rather than representing an sql parameter.
ExpandedVariable - Interface in groovy.sql
Identifies a variable to be expanded into the sql string rather than representing a placeholder.

F

findAll(groovy.lang.Closure) - Method in DataSet
Return a lazy-implemented filtered view of this DataSet.
findWhereKeyword(java.lang.String) - Method in Sql
Hook to allow derived classes to override where clause sniffing.
FIRST_RESULT_SET - Field in Sql
firstRow() - Method in DataSet
Returns the first row from a DataSet's underlying table
firstRow(java.lang.String, java.lang.Object) - Method in Sql
Performs the given SQL query and return the first row of the result set.
FLOAT - Field in Sql

G

get(java.lang.Object) - Method in GroovyRowResult
Find the property value for the given name (ignoring case).
getAt(java.lang.String) - Method in GroovyResultSet
Gets the value of the designated column in the current row as an Object.
getAt(int) - Method in GroovyResultSetExtension
Supports integer based subscript operators for accessing at numbered columns starting at zero.
getAt(int) - Method in GroovyRowResult
Retrieve the value of the property by its index.
getConnection() - Method in Sql
If this instance was created with a single Connection then the connection is returned.
getDataSource() - Method in Sql
getImpl() - Method in GroovyResultSetProxy
Gets a proxy instance that can be used as GroovyResultSet.
getMaxRows() - Method in Sql.AbstractQueryCommand
Get the maximum number of rows to return in the ResultSet
getObject() - Method in ExpandedVariable
getObject() - Method in Sql
getOrderBy() - Method in SqlOrderByVisitor
getParameters() - Method in DataSet
getParameters(groovy.lang.GString) - Method in Sql
Hook to allow derived classes to override behavior associated with extracting params from a GString.
getParameters() - Method in SqlWhereVisitor
getParams() - Method in SqlWithParams
getProperty(java.lang.String) - Method in GroovyResultSetExtension
Gets the value of the designated column in the current row of as an Object.
getProperty(java.lang.String) - Method in GroovyRowResult
Retrieve the value of the property by its (case-insensitive) name.
getProperty(java.lang.String) - Method in ResultSetMetaDataWrapper
getResultSet() - Method in GroovyResultSetExtension
Gets the current result set.
getResultSetConcurrency() - Method in Sql
Gets the resultSetConcurrency for statements created using the connection.
getResultSetHoldability() - Method in Sql
Gets the resultSetHoldability for statements created using the connection.
getResultSetType() - Method in Sql
Gets the resultSetType for statements created using the connection.
getSql() - Method in DataSet
getSql() - Method in SqlWithParams
getSqlOrderByVisitor() - Method in DataSet
getSqlWhereVisitor() - Method in DataSet
getType() - Method in InParameter
The JDBC data type.
getType() - Method in OutParameter
Get the JDBC datatype for this parameter.
getType() - Method in Sql
getUpdateCount() - Method in Sql
Returns:
Returns the updateCount.
getUpdatedParams(List<Object>, List<Tuple>) - Method in Sql
getValue() - Method in InParameter
The object holding the data value.
getValue() - Method in Sql
getWhere() - Method in SqlWhereVisitor
GroovyResultSet - Interface in groovy.sql
Represents an extent of objects
GroovyResultSetExtension - Class in groovy.sql
GroovyResultSetExtension implements additional logic for ResultSet.
GroovyResultSetExtension(java.sql.ResultSet) - Constructor in GroovyResultSetExtension
Creates a GroovyResultSet implementation.
GroovyResultSetProxy - Class in groovy.sql
GroovyResultSetProxy is used to create a proxy for GroovyResultSet.
GroovyResultSetProxy(groovy.sql.GroovyResultSetExtension) - Constructor in GroovyResultSetProxy
Creates a new proxy instance with a custom extension.
GroovyRowResult - Class in groovy.sql
Represents an extent of objects.
GroovyRowResult(Map<String,Object>) - Constructor in GroovyRowResult

H

hashCode() - Method in GroovyRowResult

I

in(int, java.lang.Object) - Method in Sql
Create a new InParameter
incrementBatchCount() - Method in BatchingStatementWrapper
Increments batch count (after addBatch(..) has been called) and execute delegate.executeBatch() if batchSize has been reached.
inout(groovy.sql.InParameter) - Method in Sql
Create an inout parameter using this in parameter.
InOutParameter - Interface in groovy.sql
A typed parameter passed to, and returned from a CallableStatement.
InParameter - Interface in groovy.sql
A typed parameter to pass to a query
INTEGER - Field in Sql
invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object) - Method in GroovyResultSetProxy
Invokes a method for the GroovyResultSet.
invokeMethod(java.lang.String, java.lang.Object) - Method in BatchingStatementWrapper
invokeMethod(java.lang.String, java.lang.Object) - Method in GroovyResultSetExtension
invokeMethod(java.lang.String, java.lang.Object) - Method in ResultSetMetaDataWrapper
isCacheNamedQueries() - Method in Sql
Returns:
boolean true if caching is enabled (the default is true)
isCacheStatements() - Method in Sql
Returns:
boolean true if cache is enabled (default is false)
isEmpty() - Method in GroovyRowResult
isEnableNamedQueries() - Method in Sql
Returns:
boolean true if named query processing is enabled (the default is true)
isWithinBatch() - Method in Sql
Returns true if the current Sql object is currently executing a withBatch method call.
iterator(java.sql.ResultSetMetaData) - Method in SqlExtensions
Return an Iterator given a ResultSetMetaData.

J

JAVA_OBJECT - Field in Sql

K

keySet() - Method in GroovyRowResult

L

loadDriver(java.lang.String) - Method in Sql
Attempts to load the JDBC driver on the thread, current or system class loaders
log - Field in BatchingStatementWrapper
LOG - Field in Sql
Hook to allow derived classes to access the log
LONGVARBINARY - Field in Sql
LONGVARCHAR - Field in Sql

M

N

newInstance(Map<String,Object>) - Method in Sql
Creates a new Sql instance given parameters in a Map.
next() - Method in GroovyResultSetExtension
Moves the cursor down one row from its current position.
NO_RESULT_SETS - Field in Sql
normalizeIndex(int) - Method in GroovyResultSetExtension
Takes a zero based index and convert it into an SQL based 1 based index.
NULL - Field in Sql
nullify(java.lang.String) - Method in Sql
Hook to allow derived classes to override null handling.
NUMERIC - Field in Sql

O

OTHER - Field in Sql
out(int) - Method in Sql
Create a new OutParameter
OutParameter - Interface in groovy.sql
A parameter to be returned from a CallableStatement.

P

preCheckForNamedParams(java.lang.String) - Method in Sql
deprecated:
Use buildSqlWithIndexedProps(String) instead
previous() - Method in GroovyResultSetExtension
Moves the cursor to the previous row in this getResultSet() object.
processResult(int[]) - Method in BatchingStatementWrapper
put(java.lang.String, java.lang.Object) - Method in GroovyRowResult
Associates the specified value with the specified property name in this result.
putAll(Map<? extends String,?>) - Method in GroovyRowResult
Copies all of the mappings from the specified map to this result.
putAt(java.lang.String, java.lang.Object) - Method in GroovyResultSet
Updates the designated column with an Object value.
putAt(int, java.lang.Object) - Method in GroovyResultSetExtension
Supports integer based subscript operators for updating the values of numbered columns starting at zero.

Q

query(groovy.lang.GString, groovy.lang.Closure) - Method in Sql
Performs the given SQL query, which should return a single ResultSet object.

R

REAL - Field in Sql
REF - Field in Sql
remove(java.lang.Object) - Method in GroovyRowResult
reset() - Method in BatchingStatementWrapper
results - Field in BatchingStatementWrapper
resultSet(int) - Method in Sql
Create a new ResultSetOutParameter
ResultSetMetaDataWrapper - Class in groovy.sql
This class defines a wrapper for accessing a specific column in ResultSetMetaData.
ResultSetMetaDataWrapper(java.sql.ResultSetMetaData, int) - Constructor in ResultSetMetaDataWrapper
ResultSetOutParameter - Interface in groovy.sql
A ResultSet out parameter.
reverse() - Method in DataSet
Return a lazy-implemented reverse-ordered view of this DataSet.
rollback() - Method in DataSet
rollback() - Method in Sql
If this SQL object was created with a Connection then this method rolls back the connection.
rows(int, int) - Method in DataSet
Returns a "page" of the rows from the table a DataSet represents.
rows(groovy.lang.GString, int, int, groovy.lang.Closure) - Method in Sql
Performs the given SQL query and return a "page" of rows from the result set.
run() - Method in Sql
runQuery(java.sql.Connection) - Method in Sql.AbstractQueryCommand
Perform the query.

S

setCacheNamedQueries(boolean) - Method in Sql
Enables named query caching.
setCacheStatements(boolean) - Method in Sql
Enables statement caching.
setEnableNamedQueries(boolean) - Method in Sql
Enables named query support:
  • if enableNamedQueries is true, queries with ':propname' and '?
setInternalConnection(java.sql.Connection) - Method in Sql
Stub needed for testing.
setMaxRows(int) - Method in Sql.AbstractQueryCommand
Set the maximum number of rows to return in the ResultSet
setObject(java.sql.PreparedStatement, int, java.lang.Object) - Method in Sql
Strategy method allowing derived classes to handle types differently such as for CLOBs etc.
setParameters(List<Object>, java.sql.PreparedStatement) - Method in Sql
Hook to allow derived classes to override behavior associated with setting params for a prepared statement.
setProperty(java.lang.String, java.lang.Object) - Method in GroovyResultSetExtension
Updates the designated column with an Object value.
setProperty(java.lang.String, java.lang.Object) - Method in ResultSetMetaDataWrapper
setResultSetConcurrency(int) - Method in Sql
Sets the resultSetConcurrency for statements created using the connection.
setResultSetHoldability(int) - Method in Sql
Sets the resultSetHoldability for statements created using the connection.
setResultSetType(int) - Method in Sql
Sets the resultSetType for statements created using the connection.
size() - Method in GroovyRowResult
SMALLINT - Field in Sql
sort(groovy.lang.Closure) - Method in DataSet
Return a lazy-implemented re-ordered view of this DataSet.
Sql - Class in groovy.sql
A facade over Java's normal JDBC APIs providing greatly simplified resource management and result set handling.
Sql.AbstractQueryCommand - Class in groovy.sql
Sql(groovy.sql.Sql) - Constructor in Sql
sql - Field in Sql.AbstractQueryCommand
SqlExtensions - Class in org.apache.groovy.sql.extensions
This class defines all the new SQL-related groovy methods which enhance the normal JDK SQL classes when inside the Groovy environment.
SqlOrderByVisitor - Class in groovy.sql
SqlWhereVisitor - Class in groovy.sql
SqlWithParams - Class in groovy.sql
SqlWithParams(java.lang.String, List<Object>) - Constructor in SqlWithParams
statement - Field in Sql.AbstractQueryCommand
STRUCT - Field in Sql

T

TIME - Field in Sql
TIMESTAMP - Field in Sql
TINYINT - Field in Sql
tokenAsSql(org.codehaus.groovy.syntax.Token) - Method in SqlWhereVisitor
toRowResult(java.sql.ResultSet) - Method in SqlExtensions
Returns a GroovyRowResult given a ResultSet.
toString() - Method in GroovyResultSetExtension
toString() - Method in GroovyRowResult
toTimestamp(java.util.Date) - Method in SqlExtensions
Return a java.sql.Timestamp given a java.util.Date.

U

V

values() - Method in GroovyRowResult
VARBINARY - Field in Sql
VARCHAR - Field in Sql
visitBinaryExpression(org.codehaus.groovy.ast.expr.BinaryExpression) - Method in SqlWhereVisitor
visitBooleanExpression(org.codehaus.groovy.ast.expr.BooleanExpression) - Method in SqlWhereVisitor
visitConstantExpression(org.codehaus.groovy.ast.expr.ConstantExpression) - Method in SqlWhereVisitor
visitPropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) - Method in SqlOrderByVisitor
visitPropertyExpression(org.codehaus.groovy.ast.expr.PropertyExpression) - Method in SqlWhereVisitor
visitReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) - Method in SqlOrderByVisitor
visitReturnStatement(org.codehaus.groovy.ast.stmt.ReturnStatement) - Method in SqlWhereVisitor
visitVariableExpression(org.codehaus.groovy.ast.expr.VariableExpression) - Method in SqlWhereVisitor

W

withBatch(int, groovy.lang.Closure) - Method in DataSet
Performs the closure (containing batch operations) within a batch.
withBatch(int, java.lang.String, groovy.lang.Closure) - Method in Sql
Performs the closure (containing batch operations specific to an associated prepared statement) within a batch using a given batch size.
withInstance(Map<String,Object>, groovy.lang.Closure) - Method in Sql
Invokes a closure passing it a new Sql instance created from the given map of arguments.
withStatement(groovy.lang.Closure) - Method in Sql
Allows a closure to be passed in to configure the JDBC statements before they are executed.
withTransaction(groovy.lang.Closure) - Method in DataSet
withTransaction(groovy.lang.Closure) - Method in Sql
Performs the closure within a transaction using a cached connection.

X

Y

Z

_

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _