be

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Base = func() (r types.NamedStruct) {
	f := entry.Fields()
	r.Struct.Nullability = proto.Type_NULLABILITY_REQUIRED
	for i := range f {
		x := &f[i]
		r.Names = append(r.Names, x.Name)
		all = append(all, x.Name)
		switch x.Type.ID() {
		case arrow.STRING:
			r.Struct.Types = append(r.Struct.Types, &types.StringType{
				Nullability: proto.Type_NULLABILITY_REQUIRED,
			})
		case arrow.INT64:
			r.Struct.Types = append(r.Struct.Types, &types.Int64Type{
				Nullability: proto.Type_NULLABILITY_REQUIRED,
			})
		default:
			must.AssertFMT(false)("unsupported field type %v", x.Type.ID())
		}
	}
	return
}()

Functions

func Schema

func Schema(fields ...string) (r types.NamedStruct)

Types

type ParseResult

type ParseResult struct {
	Explain bool
	Plan    *plan.Plan
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(sql string) (ParseResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL