Package io.ebeaninternal.server.deploy
Interface DbSqlContext
-
public interface DbSqlContext
Used to provide context during sql construction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addEncryptedProp(BeanProperty prop)
Add an encrypted property which will require additional binding.void
addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2)
Add a join to the sql query.DbSqlContext
append(String s)
Append a string directly to the SQL buffer.void
appendColumn(String column)
Append a column with the current table alias.void
appendColumn(String tableAlias, String column)
Append a column with an explicit table alias.void
appendFormulaJoin(String sqlFormulaJoin, SqlJoinType joinType)
Append a Sql Formula join.void
appendFormulaSelect(String sqlFormulaSelect)
Append a Sql Formula select.void
appendFromForUpdate()
Append 'for update' lock hints on FROM clause (sql server only).void
appendHistorySysPeriod()
Append the lower and upper bound columns into the select clause for findVersions() queries.void
appendParseSelect(String parseSelect, String alias)
Parse and add formula with standard table alias replacement.void
appendRawColumn(String rawcolumnWithTableAlias)
Add a raw column to the sql.String
getContent()
Return the current context of the sql context.BeanProperty[]
getEncryptedProps()
Return a list of encrypted properties which require additional binding.String
getRelativePrefix(String propName)
String
getTableAlias(String prefix)
Return a table alias without many where clause joins.String
getTableAliasManyWhere(String prefix)
Return a table alias that takes into account many where joins.boolean
isDraftQuery()
Return true if the query is a 'asDraft' query.boolean
isIncludeSoftDelete()
Return true if the query includes soft deleted rows.int
length()
Return the current content length.String
peekTableAlias()
Peek the current table alias.void
popJoin()
Pop a join node off the stack.void
popTableAlias()
Pop the current table alias from the stack.void
pushJoin(String prefix)
Push a join node onto the stack.void
pushTableAlias(String tableAlias)
Push the current table alias onto the stack.void
startGroupBy()
Start group by clause.
-
-
-
Method Detail
-
addJoin
void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2)
Add a join to the sql query.
-
pushTableAlias
void pushTableAlias(String tableAlias)
Push the current table alias onto the stack.
-
popTableAlias
void popTableAlias()
Pop the current table alias from the stack.
-
addEncryptedProp
void addEncryptedProp(BeanProperty prop)
Add an encrypted property which will require additional binding.
-
getEncryptedProps
BeanProperty[] getEncryptedProps()
Return a list of encrypted properties which require additional binding.
-
append
DbSqlContext append(String s)
Append a string directly to the SQL buffer.
-
peekTableAlias
String peekTableAlias()
Peek the current table alias.
-
appendRawColumn
void appendRawColumn(String rawcolumnWithTableAlias)
Add a raw column to the sql.
-
appendColumn
void appendColumn(String tableAlias, String column)
Append a column with an explicit table alias.
-
appendColumn
void appendColumn(String column)
Append a column with the current table alias.
-
appendParseSelect
void appendParseSelect(String parseSelect, String alias)
Parse and add formula with standard table alias replacement.
-
appendFormulaSelect
void appendFormulaSelect(String sqlFormulaSelect)
Append a Sql Formula select. This converts the "${ta}" keyword to the current table alias.
-
appendFormulaJoin
void appendFormulaJoin(String sqlFormulaJoin, SqlJoinType joinType)
Append a Sql Formula join. This converts the "${ta}" keyword to the current table alias.
-
length
int length()
Return the current content length.
-
getContent
String getContent()
Return the current context of the sql context.
-
popJoin
void popJoin()
Pop a join node off the stack.
-
getTableAlias
String getTableAlias(String prefix)
Return a table alias without many where clause joins. Typically this is for the select clause (fetch joins).
-
getTableAliasManyWhere
String getTableAliasManyWhere(String prefix)
Return a table alias that takes into account many where joins.
-
getRelativePrefix
String getRelativePrefix(String propName)
-
appendHistorySysPeriod
void appendHistorySysPeriod()
Append the lower and upper bound columns into the select clause for findVersions() queries.
-
isIncludeSoftDelete
boolean isIncludeSoftDelete()
Return true if the query includes soft deleted rows.
-
isDraftQuery
boolean isDraftQuery()
Return true if the query is a 'asDraft' query.
-
startGroupBy
void startGroupBy()
Start group by clause.
-
appendFromForUpdate
void appendFromForUpdate()
Append 'for update' lock hints on FROM clause (sql server only).
-
-