Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MustBuild (0.19 sec)

  1. internal/s3select/sql/parser_test.go

    package sql
    
    import (
    	"bytes"
    	"testing"
    
    	"github.com/alecthomas/participle"
    	"github.com/alecthomas/participle/lexer"
    )
    
    func TestJSONPathElement(t *testing.T) {
    	p := participle.MustBuild(
    		&JSONPathElement{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    		participle.CaseInsensitive("Timeword"),
    	)
    
    	j := JSONPathElement{}
    	cases := []string{
    		// Key
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. internal/s3select/sql/jsonpath_test.go

    	f, err := os.Open(filepath.Join("jsondata", "books.json"))
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	b, err := io.ReadAll(f)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	p := participle.MustBuild(
    		&JSONPath{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    	)
    	cases := []struct {
    		str string
    		res []interface{}
    	}{
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  3. internal/s3select/sql/parser.go

    		`|(?P<Int>\d+)` +
    		`|(?P<LitString>'([^']*('')?)*')` +
    		`|(?P<Operators><>|!=|<=|>=|\.\*|\[\*\]|[-+*/%,.()=<>\[\]])`,
    	))
    
    	// SQLParser is used to parse SQL statements
    	SQLParser = participle.MustBuild(
    		&Select{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    		participle.CaseInsensitive("Timeword"),
    	)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
Back to top