refactor: NewCustomExpression -> CustomExpression
This commit is contained in:
parent
f48970d124
commit
3ec0e2cabd
3 changed files with 3 additions and 3 deletions
|
|
@ -278,7 +278,7 @@ type customExpression struct {
|
|||
parts []Serializer
|
||||
}
|
||||
|
||||
func NewCustomExpression(parts ...Serializer) Expression {
|
||||
func CustomExpression(parts ...Serializer) Expression {
|
||||
ret := customExpression{
|
||||
parts: parts,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ func TO_TIMESTAMP(timestampzStr, format StringExpression) TimestampzExpression {
|
|||
|
||||
// EXTRACT extracts time component from time expression
|
||||
func EXTRACT(field string, from Expression) Expression {
|
||||
return NewCustomExpression(Token("EXTRACT("), Token(field), Token("FROM"), from, Token(")"))
|
||||
return CustomExpression(Token("EXTRACT("), Token(field), Token("FROM"), from, Token(")"))
|
||||
}
|
||||
|
||||
// CURRENT_DATE returns current date
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func GROUPING(expressions ...Expression) IntegerExpression {
|
|||
// WITH_ROLLUP operator is used with the GROUP BY clause to generate all prefixes of a group of columns including the empty list.
|
||||
// It creates extra rows in the result set that represent the subtotal values for each combination of columns.
|
||||
func WITH_ROLLUP(expressions ...Expression) GroupByClause {
|
||||
return NewCustomExpression(
|
||||
return CustomExpression(
|
||||
parametersSerializer(expressions), Token("WITH ROLLUP"),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue