(err error, selectCommand *ast.SelectCommand, aggregateFunction token.Token)
| 332 | } |
| 333 | |
| 334 | func (parser *Parser) getColumnName(err error, selectCommand *ast.SelectCommand, aggregateFunction token.Token) error { |
| 335 | // Get column name |
| 336 | err = validateToken(parser.currentToken.Type, []token.Type{token.IDENT, token.ASTERISK}) |
| 337 | if err != nil { |
| 338 | return err |
| 339 | } |
| 340 | selectCommand.Space = append(selectCommand.Space, ast.Space{ColumnName: parser.currentToken, AggregateFunc: &aggregateFunction}) |
| 341 | parser.nextToken() |
| 342 | return nil |
| 343 | } |
| 344 | |
| 345 | func isAggregateFunction(t token.Type) bool { |
| 346 | return t == token.MIN || t == token.MAX || t == token.COUNT || t == token.SUM || t == token.AVG |
nothing calls this directly
no test coverage detected