mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-22 07:31:39 +03:00
22 lines
508 B
Go
22 lines
508 B
Go
|
package ast
|
||
|
|
||
|
import "github.com/neilotoole/sq/libsq/ast/internal/slq"
|
||
|
|
||
|
// UniqueNode implements the SQL "DISTINCT" clause.
|
||
|
type UniqueNode struct {
|
||
|
baseNode
|
||
|
}
|
||
|
|
||
|
// String returns a log/debug-friendly representation.
|
||
|
func (n *UniqueNode) String() string {
|
||
|
return nodeString(n)
|
||
|
}
|
||
|
|
||
|
// VisitUniqueFunc implements slq.SLQVisitor.
|
||
|
func (v *parseTreeVisitor) VisitUniqueFunc(ctx *slq.UniqueFuncContext) interface{} {
|
||
|
node := &UniqueNode{}
|
||
|
node.ctx = ctx
|
||
|
node.text = ctx.GetText()
|
||
|
return v.cur.AddChild(node)
|
||
|
}
|