| java.lang.Object com.versant.core.jdbc.fetch.SqlBuffer
SqlBuffer | public class SqlBuffer (Code) | | Buffer holding the SQL for a query. This supports modification of the
SQL to convert nullparameter references into IS NULL, toggling SELECT
FOR UPDATE and other things.
|
Inner Class :final public static class Param implements Serializable | |
Inner Class :final public static class CharSpan implements Serializable | |
Method Summary | |
public void | createSpace(CharBuf charBuf, int index, int amount) This must create space in the charBuf at the index. | public SqlBuffer | getClone() | public String | getFirstTableOrAlias() | public char[] | getNotNullChars() | public char[] | getNullChars() | public char[] | getOriginalOrderByClause() | public char[] | getOriginalSelectList() | public Param | getParamList() | public synchronized String | getSql(SqlDriver driver, Object[] params, boolean forUpdate, boolean forCount, long fromIncl, long toExcl) Update all our Param's for the null/not null state of their parameters
and for 'select for update' or not. | public CharBuf | getSqlbuf() | public int | getSqlbufNotForUpdateSize() | public boolean | isAggregate() | public boolean | isDistinct() | public boolean | isSqlForCount() | public boolean | isSqlForUpdate() | public void | removeSpace(CharBuf charBuf, int index, int amount) This must create space in the charBuf at the index. | public void | setAggregate(boolean aggregate) | public void | setFirstTableOrAlias(String firstTableOrAlias) | public void | setNotNullChars(char[] notNullChars) | public void | setNullChars(char[] nullChars) | public void | setOrderByRange(int start, int end) Set the range of characters in our buffer that contain order by clause
including the 'order by' keywords. | public void | setParamList(Param paramList) | public void | setParamsOnPS(ModelMetaData jmd, SqlDriver driver, PreparedStatement ps, Object[] params, String sql) Set all the parameters for this query on ps. | public void | setSelectListRange(boolean distinct, int start, int firstColEnd, int end) Set the range of characters in our buffer that contain all the columns
in the select list. |
SqlBuffer | public SqlBuffer()(Code) | | |
createSpace | public void createSpace(CharBuf charBuf, int index, int amount)(Code) | | This must create space in the charBuf at the index.
|
getFirstTableOrAlias | public String getFirstTableOrAlias()(Code) | | |
getNotNullChars | public char[] getNotNullChars()(Code) | | |
getNullChars | public char[] getNullChars()(Code) | | |
getOriginalOrderByClause | public char[] getOriginalOrderByClause()(Code) | | |
getOriginalSelectList | public char[] getOriginalSelectList()(Code) | | |
getParamList | public Param getParamList()(Code) | | |
getSql | public synchronized String getSql(SqlDriver driver, Object[] params, boolean forUpdate, boolean forCount, long fromIncl, long toExcl)(Code) | | Update all our Param's for the null/not null state of their parameters
and for 'select for update' or not. Return the updated SQL.
Parameters: forUpdate - Generate SELECT FOR UPDATE type query Parameters: forCount - Generate a COUNT(*) query to just count the rows Parameters: fromIncl - Index of first row to return Parameters: toExcl - Index of row after last row to return |
getSqlbufNotForUpdateSize | public int getSqlbufNotForUpdateSize()(Code) | | |
isAggregate | public boolean isAggregate()(Code) | | |
isDistinct | public boolean isDistinct()(Code) | | |
isSqlForCount | public boolean isSqlForCount()(Code) | | |
isSqlForUpdate | public boolean isSqlForUpdate()(Code) | | |
removeSpace | public void removeSpace(CharBuf charBuf, int index, int amount)(Code) | | This must create space in the charBuf at the index.
|
setAggregate | public void setAggregate(boolean aggregate)(Code) | | |
setFirstTableOrAlias | public void setFirstTableOrAlias(String firstTableOrAlias)(Code) | | |
setNotNullChars | public void setNotNullChars(char[] notNullChars)(Code) | | |
setNullChars | public void setNullChars(char[] nullChars)(Code) | | |
setOrderByRange | public void setOrderByRange(int start, int end)(Code) | | Set the range of characters in our buffer that contain order by clause
including the 'order by' keywords. The end index is exclusive.
|
setParamList | public void setParamList(Param paramList)(Code) | | |
setSelectListRange | public void setSelectListRange(boolean distinct, int start, int firstColEnd, int end)(Code) | | Set the range of characters in our buffer that contain all the columns
in the select list.
Parameters: start - Index of the first character in the select list (after'SELECT ' or 'SELECT DISTINCT ') Parameters: firstColEnd - Index of the last character in the first column + 1 Parameters: end - Index of the last character in the list + 1 |
|
|