@Module public class QueryContext extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static QueryContext |
allocate()
Returns a new query context.
|
void |
clearParameters() |
void |
close() |
static void |
free(QueryContext cxt) |
java.io.InputStream |
getBinaryStream(int index)
Returns the binary stream parameter.
|
int |
getBoolean(int index)
Returns the boolean parameter.
|
byte[] |
getBuffer()
Returns the temp buffer.
|
byte[] |
getBytes(int index)
Returns the binary stream parameter.
|
long |
getDate(int index)
Returns the date parameter.
|
double |
getDouble(int index)
Returns the double parameter.
|
GeneratedKeysResultSet |
getGeneratedKeysResultSet()
Gets the generated keys result set.
|
Data |
getGroupData(int index)
Returns the indexed group field.
|
double |
getGroupDouble(int index)
Sets the indexed group field as a double.
|
long |
getGroupLong(int index)
Sets the indexed group field as a long.
|
java.lang.String |
getGroupString(int index)
Sets the indexed group field.
|
int |
getLimit()
The max rows returned in a select
|
long |
getLong(int index)
Returns the long parameter.
|
SelectResult |
getResult()
Gets the result set.
|
int |
getRowUpdateCount()
Returns the number of rows updated.
|
java.lang.String |
getString(int index)
Returns the string parameter.
|
TableIterator[] |
getTableIterators()
Returns the table iterator.
|
DbTransaction |
getTransaction()
Returns the transaction.
|
Column.ColumnType |
getType(int index) |
void |
init(DbTransaction xa,
TableIterator[] tableIterators,
boolean isReadOnly)
Initializes the query state.
|
void |
initGroup(int size,
boolean[] isGroupByFields)
Initializes the group.
|
boolean |
isBinaryStream(int index) |
boolean |
isGroupNull(int index)
Sets the indexed group field.
|
boolean |
isNull(int index)
Returns the null parameter.
|
boolean |
isReturnGeneratedKeys()
Set if the query should return the generated keys.
|
boolean |
lock()
Lock the blocks.
|
void |
lockOld() |
void |
selectGroup()
Selects the actual group item.
|
void |
setBinaryStream(int index,
java.io.InputStream is,
int length)
Set a binary stream parameter.
|
void |
setBoolean(int index,
boolean value)
Set a boolean parameter.
|
void |
setBytes(int index,
byte[] bytes)
Set a binary stream parameter.
|
void |
setDate(int index,
long date)
Returns the date parameter.
|
void |
setDouble(int index,
double value)
Set a double parameter.
|
void |
setGroupDouble(int index,
double value)
Sets the indexed group field as a double.
|
void |
setGroupLong(int index,
long value)
Sets the indexed group field as a long.
|
void |
setGroupString(int index,
java.lang.String value)
Sets the indexed group field.
|
void |
setLimit(int limit)
The max rows returned in a select
|
void |
setLong(int index,
long value)
Set a long parameter.
|
void |
setNonLocking() |
void |
setNull(int index)
Set a null parameter.
|
void |
setResult(SelectResult result)
Sets the result set.
|
void |
setReturnGeneratedKeys(boolean isReturnGeneratedKeys)
Set if the query should return the generated keys.
|
void |
setRowUpdateCount(int count)
Sets the number of rows updated.
|
void |
setString(int index,
java.lang.String value)
Set a string parameter.
|
void |
setTransaction(DbTransaction xa)
Sets the transaction.
|
void |
unlock() |
void |
unlockOld()
Unlock the blocks.
|
public static QueryContext allocate()
public void setNonLocking()
public void clearParameters()
public void init(DbTransaction xa, TableIterator[] tableIterators, boolean isReadOnly)
public void initGroup(int size, boolean[] isGroupByFields)
public void selectGroup()
public TableIterator[] getTableIterators()
public void setTransaction(DbTransaction xa)
public DbTransaction getTransaction()
public byte[] getBuffer()
public int getRowUpdateCount()
public void setRowUpdateCount(int count)
public boolean isReturnGeneratedKeys()
public void setReturnGeneratedKeys(boolean isReturnGeneratedKeys)
public void setLimit(int limit)
public int getLimit()
public boolean isGroupNull(int index)
public void setGroupString(int index, java.lang.String value)
public java.lang.String getGroupString(int index)
public void setGroupLong(int index, long value)
public long getGroupLong(int index)
public void setGroupDouble(int index, double value)
public double getGroupDouble(int index)
public Data getGroupData(int index)
public void setNull(int index)
public boolean isNull(int index)
public void setLong(int index, long value)
public int getBoolean(int index)
public void setBoolean(int index, boolean value)
public long getLong(int index)
public long getDate(int index)
public void setDate(int index, long date)
public void setDouble(int index, double value)
public double getDouble(int index)
public void setString(int index, java.lang.String value)
public java.lang.String getString(int index)
public boolean isBinaryStream(int index)
public void setBinaryStream(int index, java.io.InputStream is, int length)
public java.io.InputStream getBinaryStream(int index)
public void setBytes(int index, byte[] bytes)
public byte[] getBytes(int index)
public Column.ColumnType getType(int index)
public void setResult(SelectResult result)
public SelectResult getResult()
public GeneratedKeysResultSet getGeneratedKeysResultSet()
public boolean lock() throws java.sql.SQLException
isWrite
- if true, the block should be locked for writingjava.sql.SQLException
public void unlock() throws java.sql.SQLException
java.sql.SQLException
public void lockOld() throws java.sql.SQLException
java.sql.SQLException
public void unlockOld() throws java.sql.SQLException
isWrite
- if true, the block should be unlocked for writingjava.sql.SQLException
public void close() throws java.sql.SQLException
java.sql.SQLException
public static void free(QueryContext cxt)