mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
2786055df4
- New parser written from scratch, allows easier and complete parsing of the full S3 Select SQL syntax. Parser definition is directly provided by the AST defined for the SQL grammar. - Bring support to parse and interpret SQL involving JSON path expressions; evaluation of JSON path expressions will be subsequently added. - Bring automatic type inference and conversion for untyped values (e.g. CSV data).
20 lines
565 B
Go
20 lines
565 B
Go
package participle
|
|
|
|
import (
|
|
"github.com/alecthomas/participle/lexer"
|
|
)
|
|
|
|
// Capture can be implemented by fields in order to transform captured tokens into field values.
|
|
type Capture interface {
|
|
Capture(values []string) error
|
|
}
|
|
|
|
// The Parseable interface can be implemented by any element in the grammar to provide custom parsing.
|
|
type Parseable interface {
|
|
// Parse into the receiver.
|
|
//
|
|
// Should return NextMatch if no tokens matched and parsing should continue.
|
|
// Nil should be returned if parsing was successful.
|
|
Parse(lex lexer.PeekingLexer) error
|
|
}
|