MCPcopy Create free account
hub / github.com/araddon/qlbridge / CountStar

Method CountStar

rel/sql.go:680–691  ·  view source on GitHub ↗

Is this a select count(*) column

()

Source from the content-addressed store, hash-verified

678
679// Is this a select count(*) column
680func (m *Column) CountStar() bool {
681 if m.Expr == nil {
682 return false
683 }
684 if fn, ok := m.Expr.(*expr.FuncNode); ok {
685 if len(fn.Args) != 1 {
686 return false
687 }
688 return strings.ToLower(fn.Name) == "count" && fn.Args[0].String() == `*`
689 }
690 return false
691}
692func (m *Column) InFinalProjection() bool {
693 return m.ParentIndex >= 0
694}

Callers 1

IsLiteralMethod · 0.95

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected