Class SpiRawSql.Sql
java.lang.Object
io.ebeaninternal.server.rawsql.SpiRawSql.Sql
- All Implemented Interfaces:
Serializable
- Enclosing interface:
SpiRawSql
Represents the sql part of the query. For parsed RawSql the sql is broken
up so that Ebean can insert extra WHERE and HAVING expressions into the
SQL.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn the SQL ORDER BY clause.Return the 'order by' keywords.Return the static SQL to emit after the dynamic order-by injection point (template / withPlaceholders() mode only - typically empty since ORDER BY is usually last).Return the SQL prior to FROM clause.Return the SQL prior to HAVING clause.Return the static SQL to emit immediately before the dynamic order-by injection point (template / withPlaceholders() mode only, e.g. static SQL between a ${having} and ${orderBy} placeholder).Return the SQL prior to WHERE clause.Return the SQL when it is unparsed.booleanReturn true if there is already a HAVING clause and any extra having expressions start with AND.booleanReturn true if there is already a WHERE clause and any extra where expressions start with AND.booleanbooleanReturn true if a ${orderBy}/${andOrderBy} placeholder was found (template / withPlaceholders() mode only).booleanisParsed()Return true if the SQL is left completely unmodified.toString()
-
Method Details
-
toString
-
isDistinct
public boolean isDistinct() -
isParsed
public boolean isParsed()Return true if the SQL is left completely unmodified.This means Ebean can't add WHERE or HAVING expressions into the query - it will be left completely unmodified.
-
getUnparsedSql
Return the SQL when it is unparsed. -
getPreFrom
Return the SQL prior to FROM clause. -
getPreWhere
Return the SQL prior to WHERE clause. -
isAndWhereExpr
public boolean isAndWhereExpr()Return true if there is already a WHERE clause and any extra where expressions start with AND. -
getPreHaving
Return the SQL prior to HAVING clause. -
isAndHavingExpr
public boolean isAndHavingExpr()Return true if there is already a HAVING clause and any extra having expressions start with AND. -
getOrderByPrefix
Return the 'order by' keywords. This can contain additional keywords, for example 'order siblings by' as Oracle syntax. -
getOrderBy
Return the SQL ORDER BY clause. -
getPreOrderBy
Return the static SQL to emit immediately before the dynamic order-by injection point (template / withPlaceholders() mode only, e.g. static SQL between a ${having} and ${orderBy} placeholder). -
getPostOrderBy
Return the static SQL to emit after the dynamic order-by injection point (template / withPlaceholders() mode only - typically empty since ORDER BY is usually last). -
isOrderByPlaceholder
public boolean isOrderByPlaceholder()Return true if a ${orderBy}/${andOrderBy} placeholder was found (template / withPlaceholders() mode only). When false, any dynamic order by set on the query is ignored rather than risk producing invalid SQL by injecting it at an undefined position.
-