code: func (p *Parser) parseSortFields() (SortFields, error) {
  	var fields SortFields
  
  	tok, pos, lit := p.ScanIgnoreWhitespace()
  
  	switch tok {
  	// The first field after an order by may not have a field name (e.g. ORDER BY ASC)
  	case ASC, DESC:
  		fields = append(fields, &SortField{Ascending: (tok == ASC)})
  	// If it's a token, parse it as a sort field.  At least one is required.
  	case IDENT:
  		p.Unscan()
  		field, err := p.parseSortField()
  		if err != nil {
  			return nil, err
  		}
  
  		if lit != "time" {
  			return nil, errors.New("only ORDER BY time supported at this time")
  		}
  
  		fields = append(fields, field)
  	// Parse error...
  	default:
  		return nil, newParseError(tokstr(tok, lit), []string{"identifier", "ASC", "DESC"}, pos)
  	}
  
  	// Parse additional fields.
  	for {
  		tok, _, _ := p.ScanIgnoreWhitespace()
  
  		if tok != COMMA {
  			p.Unscan()
  			break
  		}
  
  		field, err := p.parseSortField()
  		if err != nil {
  			return nil, err
  		}
  
  		fields = append(fields, field)
  	}
  
  	if len(fields) > 1 {
  		return nil, errors.New("only ORDER BY time supported at this time")
  	}
  
  	return fields, nil
  }
docs: // parseSortFields parses the sort fields for an ORDER BY clause.