Class StringAgg
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.Expression
-
- com.feedzai.commons.sql.abstraction.dml.StringAgg
-
- All Implemented Interfaces:
Serializable
public class StringAgg extends Expression
- Since:
- 2.2.3
- Author:
- Francisco Santos (francisco.santos@feedzai.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ExpressioncolumnThe column to aggregate.-
Fields inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringAggdelimiter(char delimiter)Sets the delimiter.StringAggdistinct()Apply distinct.ExpressiongetColumn()Returns the column to be aggregated.chargetDelimiter()Returns the delimiter.booleanisDistinct()Returns if it should apply DISTINCT.static StringAggstringAgg(Expression column)Returns a new StringAgg.Stringtranslate()Translates the expression.-
Methods inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, asc, desc, enclose, fullOuterJoin, getAlias, getJoins, getOrdering, innerJoin, isAliased, isEnclosed, isQuote, isQuotes, isWithNoLock, leftOuterJoin, rightOuterJoin, unquote, withNoLock
-
-
-
-
Field Detail
-
column
public final Expression column
The column to aggregate.
-
-
Method Detail
-
stringAgg
public static StringAgg stringAgg(Expression column)
Returns a new StringAgg.- Parameters:
column- column to be aggregated.- Returns:
- a new StringAgg.
-
getColumn
public Expression getColumn()
Returns the column to be aggregated.- Returns:
- column to be aggregated.
-
getDelimiter
public char getDelimiter()
Returns the delimiter.- Returns:
- the delimiter.
-
isDistinct
public boolean isDistinct()
Returns if it should apply DISTINCT.- Returns:
- if it should apply DISTINCT.
-
translate
public String translate()
Description copied from class:ExpressionTranslates the expression.- Specified by:
translatein classExpression- Returns:
- A translation of the implementing expression.
-
distinct
public StringAgg distinct()
Apply distinct.- Returns:
- this
-
delimiter
public StringAgg delimiter(char delimiter)
Sets the delimiter.- Parameters:
delimiter- char that splits records aggregated.- Returns:
- this
-
-