Versions in this module Expand all Collapse all v0 v0.0.1 Nov 23, 2020 Changes in this version + var SQLParser = participle.MustBuild(&Select{}, participle.Lexer(sqlLexer), participle.CaseInsensitive("Keyword"), ...) + func FormatSQLTimestamp(t time.Time) string + func IterToValue(iter simdjson.Iter) (interface{}, error) + type AliasedExpression struct + As string + Expression *Expression + type AndCondition struct + Condition []*Condition + type Between struct + End *Operand + Not bool + Start *Operand + type Boolean bool + func (b *Boolean) Capture(values []string) error + type CastFunc struct + CastType string + Expr *Expression + type Compare struct + Operand *Operand + Operator string + type Condition struct + Not *Condition + Operand *ConditionOperand + type ConditionOperand struct + ConditionRHS *ConditionRHS + Operand *Operand + type ConditionRHS struct + Between *Between + Compare *Compare + In *In + Like *Like + type CountFunc struct + ExprArg *Expression + StarArg bool + type DateAddFunc struct + DatePart string + Quantity *Operand + Timestamp *PrimaryTerm + type DateDiffFunc struct + DatePart string + Timestamp1 *PrimaryTerm + Timestamp2 *PrimaryTerm + type Expression struct + And []*AndCondition + type ExtractFunc struct + From *PrimaryTerm + Timeword string + type FuncExpr struct + Cast *CastFunc + Count *CountFunc + DateAdd *DateAddFunc + DateDiff *DateDiffFunc + Extract *ExtractFunc + SFunc *SimpleArgFunc + Substring *SubstringFunc + Trim *TrimFunc + type FuncName string + type Identifier struct + Quoted *QuotedIdentifier + Unquoted *string + func (i *Identifier) String() string + type In struct + ListExpression *Expression + type JSONPath struct + BaseKey *Identifier + PathExpr []*JSONPathElement + func (e *JSONPath) String() string + type JSONPathElement struct + ArrayWildcard bool + Index *int + Key *ObjectKey + ObjectWildcard bool + func (e *JSONPathElement) String() string + type Like struct + EscapeChar *Operand + Not bool + Pattern *Operand + type ListExpr struct + Elements []*Expression + type LitValue struct + Boolean *Boolean + Null bool + Number *float64 + String *LiteralString + type LiteralList []string + func (ls *LiteralList) Capture(values []string) error + type LiteralString string + func (ls *LiteralString) Capture(values []string) error + type MultOp struct + Left *UnaryTerm + Right []*OpUnaryTerm + type NegatedTerm struct + Term *PrimaryTerm + type ObjectKey struct + ID *Identifier + Lit *LiteralString + func (o *ObjectKey) String() string + type OpFactor struct + Op string + Right *MultOp + type OpUnaryTerm struct + Op string + Right *UnaryTerm + type Operand struct + Left *MultOp + Right []*OpFactor + type PrimaryTerm struct + FuncCall *FuncExpr + JPathExpr *JSONPath + ListExpr *ListExpr + SubExpression *Expression + Value *LitValue + type QuotedIdentifier string + func (qi *QuotedIdentifier) Capture(values []string) error + type Record interface + Clone func(dst Record) Record + Get func(name string) (*Value, error) + Raw func() (SelectObjectFormat, interface{}) + Replace func(k interface{}) error + Reset func() + Set func(name string, value *Value) (Record, error) + WriteCSV func(writer io.Writer, opts WriteCSVOpts) error + WriteJSON func(writer io.Writer) error + type Select struct + Expression *SelectExpression + From *TableExpression + Limit *LitValue + Where *Expression + type SelectExpression struct + All bool + Expressions []*AliasedExpression + type SelectObjectFormat int + const SelectFmtCSV + const SelectFmtJSON + const SelectFmtParquet + const SelectFmtSIMDJSON + const SelectFmtUnknown + type SelectStatement struct + func ParseSelectStatement(s string) (stmt SelectStatement, err error) + func (e *SelectStatement) AggregateResult(output Record) error + func (e *SelectStatement) AggregateRow(input Record) error + func (e *SelectStatement) Eval(input, output Record) (Record, error) + func (e *SelectStatement) EvalFrom(format string, input Record) ([]*Record, error) + func (e *SelectStatement) IsAggregated() bool + func (e *SelectStatement) LimitReached() bool + type SimpleArgFunc struct + ArgsList []*Expression + FunctionName string + type SubstringFunc struct + Arg2 *Operand + Arg3 *Operand + Expr *PrimaryTerm + For *Operand + From *Operand + type TableExpression struct + As string + Table *JSONPath + func (from *TableExpression) HasKeypath() bool + type TrimFunc struct + TrimChars *PrimaryTerm + TrimFrom *PrimaryTerm + TrimWhere *string + type UnaryTerm struct + Negated *NegatedTerm + Primary *PrimaryTerm + type Value struct + func FromArray(a []Value) *Value + func FromBool(b bool) *Value + func FromBytes(b []byte) *Value + func FromFloat(f float64) *Value + func FromInt(f int64) *Value + func FromNull() *Value + func FromString(str string) *Value + func FromTimestamp(t time.Time) *Value + func (v *Value) InferBytesType() (err error) + func (v Value) CSVString() string + func (v Value) Equals(b Value) (ok bool) + func (v Value) GetTypeString() string + func (v Value) IsArray() (ok bool) + func (v Value) IsNull() bool + func (v Value) MarshalJSON() ([]byte, error) + func (v Value) Repr() string + func (v Value) SameTypeAs(b Value) (ok bool) + func (v Value) String() string + func (v Value) ToArray() (val []Value, ok bool) + func (v Value) ToBool() (val bool, ok bool) + func (v Value) ToBytes() (val []byte, ok bool) + func (v Value) ToFloat() (val float64, ok bool) + func (v Value) ToInt() (val int64, ok bool) + func (v Value) ToString() (val string, ok bool) + func (v Value) ToTimestamp() (t time.Time, ok bool) + type WriteCSVOpts struct + AlwaysQuote bool + FieldDelimiter rune + Quote rune + QuoteEscape rune