Interface DbSqlContext


public interface DbSqlContext
Used to provide context during sql construction.
  • Method Details

    • addJoin

      void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2, String extraWhere)
      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.
    • encryptedProps

      BeanProperty[] encryptedProps()
      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, String tableAlias)
      Append a Sql Formula join. This converts the "${ta}" keyword to the current table alias.
    • length

      int length()
      Return the current content length.
    • content

      String content()
      Return the current context of the sql context.
    • pushJoin

      void pushJoin(String prefix)
      Push a join node onto the stack.
    • popJoin

      void popJoin()
      Pop a join node off the stack.
    • tableAlias

      String tableAlias(String prefix)
      Return a table alias without many where clause joins. Typically this is for the select clause (fetch joins).
    • tableAliasManyWhere

      String tableAliasManyWhere(String prefix)
      Return a table alias that takes into account many where joins.
    • relativePrefix

      String relativePrefix(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.
    • asOfTableCount

      int asOfTableCount()
      Return the count of history table AS OF predicates added via joins.
    • startGroupBy

      void startGroupBy()
      Start group by clause.
    • appendFromForUpdate

      void appendFromForUpdate()
      Append 'for update' lock hints on FROM clause (sql server only).
    • addExtraJoin

      void addExtraJoin(SqlTreeJoin treeJoin)
      Delay adding an extra join to support inheritance discriminator in projection (IF required).
    • flushExtraJoins

      void flushExtraJoins()
      Add extra joins *IF* required to support inheritance discriminator in projection.
    • joinAdded

      boolean joinAdded()
      Return true if the last join was added and false means the join was suppressed as it was already added to the query.