Aggregate functions
This commit is contained in:
parent
dca028295d
commit
d69c67569a
5 changed files with 159 additions and 59 deletions
|
|
@ -177,19 +177,37 @@ func Date(year, month, day int) DateExpression {
|
|||
}
|
||||
|
||||
//--------------------------------------------------//
|
||||
type nullExpression struct {
|
||||
type nullLiteral struct {
|
||||
expressionInterfaceImpl
|
||||
}
|
||||
|
||||
func newNullExpression() expression {
|
||||
nullExpression := &nullExpression{}
|
||||
func newNullLiteral() expression {
|
||||
nullExpression := &nullLiteral{}
|
||||
|
||||
nullExpression.expressionInterfaceImpl.parent = nullExpression
|
||||
|
||||
return nullExpression
|
||||
}
|
||||
|
||||
func (n *nullExpression) serialize(statement statementType, out *queryData, options ...serializeOption) error {
|
||||
func (n *nullLiteral) serialize(statement statementType, out *queryData, options ...serializeOption) error {
|
||||
out.writeString("NULL")
|
||||
return nil
|
||||
}
|
||||
|
||||
//--------------------------------------------------//
|
||||
type starLiteral struct {
|
||||
expressionInterfaceImpl
|
||||
}
|
||||
|
||||
func newStarLiteral() expression {
|
||||
starExpression := &starLiteral{}
|
||||
|
||||
starExpression.expressionInterfaceImpl.parent = starExpression
|
||||
|
||||
return starExpression
|
||||
}
|
||||
|
||||
func (n *starLiteral) serialize(statement statementType, out *queryData, options ...serializeOption) error {
|
||||
out.writeString("*")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue