(pos Pos)
| 887 | } |
| 888 | |
| 889 | func (p *Parser) tryParsePrimaryKeyClause(pos Pos) (*PrimaryKeyClause, error) { |
| 890 | if !p.tryConsumeKeywords(KeywordPrimary) { |
| 891 | return nil, nil // nolint |
| 892 | } |
| 893 | |
| 894 | if err := p.expectKeyword(KeywordKey); err != nil { |
| 895 | return nil, err |
| 896 | } |
| 897 | |
| 898 | // parse partition key list |
| 899 | columnExpr, err := p.parseExpr(p.Pos()) |
| 900 | if err != nil { |
| 901 | return nil, err |
| 902 | } |
| 903 | return &PrimaryKeyClause{ |
| 904 | PrimaryPos: pos, |
| 905 | Expr: columnExpr, |
| 906 | }, nil |
| 907 | } |
| 908 | |
| 909 | func (p *Parser) tryParseOrderByClause(pos Pos) (*OrderByClause, error) { |
| 910 | if !p.tryConsumeKeywords(KeywordOrder) { |
no test coverage detected