Is this a select count(*) column
()
| 678 | |
| 679 | // Is this a select count(*) column |
| 680 | func (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 | } |
| 692 | func (m *Column) InFinalProjection() bool { |
| 693 | return m.ParentIndex >= 0 |
| 694 | } |