internal

package
v0.17.2-nutshell-4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTime

func CurrentTime(ctx context.Context) *time.Time

func DateFromInt64Value

func DateFromInt64Value(v int64) (time.Time, error)

func EncodeGoValue

func EncodeGoValue(t types.Type, v interface{}) (interface{}, error)

func EncodeGoValues

func EncodeGoValues(v []interface{}, params []*ast.ParameterNode) ([]interface{}, error)

func EncodeNamedValues

func EncodeNamedValues(v []driver.NamedValue, params []*ast.ParameterNode) ([]sql.NamedArg, error)

func EncodeValue

func EncodeValue(v Value) (interface{}, error)

func LiteralFromValue

func LiteralFromValue(v Value) (string, error)

func LiteralFromZetaSQLValue

func LiteralFromZetaSQLValue(v types.Value) (string, error)

func RegisterFunctions

func RegisterFunctions(conn *sqlite3.SQLiteConn) error

func SubstituteDeclarationIfNeeded_Dumb

func SubstituteDeclarationIfNeeded_Dumb(stmt parsed_ast.Node, query string, declarationMap map[string]string) string

func TimestampFromFloatValue

func TimestampFromFloatValue(f float64) (time.Time, error)

func TimestampFromInt64Value

func TimestampFromInt64Value(v int64) (time.Time, error)

func Visit

func Visit(n parsed_ast.Node, cb func(parsed_ast.Node) string) string

func WithCurrentTime

func WithCurrentTime(ctx context.Context, now time.Time) context.Context

Types

type ANY_VALUE

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

func (*ANY_VALUE) Done

func (f *ANY_VALUE) Done() (Value, error)

func (*ANY_VALUE) Step

func (f *ANY_VALUE) Step(v Value, opt *AggregatorOption) error

type APPROX_COUNT_DISTINCT

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

func (*APPROX_COUNT_DISTINCT) Done

func (f *APPROX_COUNT_DISTINCT) Done() (Value, error)

func (*APPROX_COUNT_DISTINCT) Step

type APPROX_QUANTILES

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

func (*APPROX_QUANTILES) Done

func (f *APPROX_QUANTILES) Done() (Value, error)

func (*APPROX_QUANTILES) Step

func (f *APPROX_QUANTILES) Step(v Value, num int64, opt *AggregatorOption) error

type APPROX_TOP_COUNT

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

func (*APPROX_TOP_COUNT) Done

func (f *APPROX_TOP_COUNT) Done() (Value, error)

func (*APPROX_TOP_COUNT) Step

func (f *APPROX_TOP_COUNT) Step(v Value, num int64, opt *AggregatorOption) error

type APPROX_TOP_SUM

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

func (*APPROX_TOP_SUM) Done

func (f *APPROX_TOP_SUM) Done() (Value, error)

func (*APPROX_TOP_SUM) Step

func (f *APPROX_TOP_SUM) Step(v, weight Value, num int64, opt *AggregatorOption) error

type ARRAY

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

func (*ARRAY) Done

func (f *ARRAY) Done() (Value, error)

func (*ARRAY) Step

func (f *ARRAY) Step(v Value, opt *AggregatorOption) error

type ARRAY_AGG

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

func (*ARRAY_AGG) Done

func (f *ARRAY_AGG) Done() (Value, error)

func (*ARRAY_AGG) Step

func (f *ARRAY_AGG) Step(v Value, opt *AggregatorOption) error

type ARRAY_CONCAT_AGG

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

func (*ARRAY_CONCAT_AGG) Done

func (f *ARRAY_CONCAT_AGG) Done() (Value, error)

func (*ARRAY_CONCAT_AGG) Step

type AVG

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

func (*AVG) Done

func (f *AVG) Done() (Value, error)

func (*AVG) Step

func (f *AVG) Step(v Value, opt *AggregatorOption) error

type AbortBatchStmtNode

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

func (*AbortBatchStmtNode) FormatSQL

func (n *AbortBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type AddColumnActionNode

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

func (*AddColumnActionNode) FormatSQL

func (n *AddColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type AddConstraintActionNode

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

func (*AddConstraintActionNode) FormatSQL

func (n *AddConstraintActionNode) FormatSQL(ctx context.Context) (string, error)

type AddToRestricteeListActionNode

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

func (*AddToRestricteeListActionNode) FormatSQL

type AggregateBindFunction

type AggregateBindFunction func() func() *Aggregator

type AggregateFuncInfo

type AggregateFuncInfo struct {
	Name     string
	BindFunc AggregateBindFunction
}

type AggregateFunctionCallNode

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

func (*AggregateFunctionCallNode) FormatSQL

func (n *AggregateFunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type AggregateHavingModifierNode

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

func (*AggregateHavingModifierNode) FormatSQL

type AggregateOrderBy

type AggregateOrderBy struct {
	Value Value `json:"value"`
	IsAsc bool  `json:"isAsc"`
}

func (*AggregateOrderBy) UnmarshalJSON

func (a *AggregateOrderBy) UnmarshalJSON(b []byte) error

type AggregateScanNode

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

func (*AggregateScanNode) FormatSQL

func (n *AggregateScanNode) FormatSQL(ctx context.Context) (string, error)

type Aggregator

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

func (*Aggregator) Done

func (a *Aggregator) Done() (interface{}, error)

func (*Aggregator) Step

func (a *Aggregator) Step(stepArgs ...interface{}) error

type AggregatorFuncOption

type AggregatorFuncOption struct {
	Type  AggregatorFuncOptionType `json:"type"`
	Value interface{}              `json:"value"`
}

func (*AggregatorFuncOption) UnmarshalJSON

func (o *AggregatorFuncOption) UnmarshalJSON(b []byte) error

type AggregatorFuncOptionType

type AggregatorFuncOptionType string
const (
	AggregatorFuncOptionUnknown     AggregatorFuncOptionType = "aggregate_unknown"
	AggregatorFuncOptionDistinct    AggregatorFuncOptionType = "aggregate_distinct"
	AggregatorFuncOptionLimit       AggregatorFuncOptionType = "aggregate_limit"
	AggregatorFuncOptionOrderBy     AggregatorFuncOptionType = "aggregate_order_by"
	AggregatorFuncOptionIgnoreNulls AggregatorFuncOptionType = "aggregate_ignore_nulls"
)

type AggregatorOption

type AggregatorOption struct {
	Distinct    bool
	IgnoreNulls bool
	Limit       *int64
	OrderBy     []*AggregateOrderBy
}

type AlterAllRowAccessPoliciesStmtNode

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

func (*AlterAllRowAccessPoliciesStmtNode) FormatSQL

type AlterColumnDropDefaultActionNode

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

func (*AlterColumnDropDefaultActionNode) FormatSQL

type AlterColumnDropNotNullActionNode

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

func (*AlterColumnDropNotNullActionNode) FormatSQL

type AlterColumnOptionsActionNode

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

func (*AlterColumnOptionsActionNode) FormatSQL

type AlterColumnSetDataTypeActionNode

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

func (*AlterColumnSetDataTypeActionNode) FormatSQL

type AlterColumnSetDefaultActionNode

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

func (*AlterColumnSetDefaultActionNode) FormatSQL

type AlterDatabaseStmtNode

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

func (*AlterDatabaseStmtNode) FormatSQL

func (n *AlterDatabaseStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterEntityStmtNode

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

func (*AlterEntityStmtNode) FormatSQL

func (n *AlterEntityStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterMaterializedViewStmtNode

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

func (*AlterMaterializedViewStmtNode) FormatSQL

type AlterPrivilegeRestrictionStmtNode

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

func (*AlterPrivilegeRestrictionStmtNode) FormatSQL

type AlterRowAccessPolicyStmtNode

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

func (*AlterRowAccessPolicyStmtNode) FormatSQL

type AlterSchemaStmtNode

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

func (*AlterSchemaStmtNode) FormatSQL

func (n *AlterSchemaStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterTableSetOptionsStmtNode

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

func (*AlterTableSetOptionsStmtNode) FormatSQL

type AlterTableStmtNode

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

func (*AlterTableStmtNode) FormatSQL

func (n *AlterTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterViewStmtNode

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

func (*AlterViewStmtNode) FormatSQL

func (n *AlterViewStmtNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticFunctionCallNode

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

func (*AnalyticFunctionCallNode) FormatSQL

func (n *AnalyticFunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticFunctionGroupNode

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

func (*AnalyticFunctionGroupNode) FormatSQL

func (n *AnalyticFunctionGroupNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticScanNode

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

func (*AnalyticScanNode) FormatSQL

func (n *AnalyticScanNode) FormatSQL(ctx context.Context) (string, error)

type AnalyzeStmtNode

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

func (*AnalyzeStmtNode) FormatSQL

func (n *AnalyzeStmtNode) FormatSQL(ctx context.Context) (string, error)

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(catalog *Catalog) *Analyzer

func (*Analyzer) AddNamePath

func (a *Analyzer) AddNamePath(path string) error

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, conn *Conn, query string, args []driver.NamedValue) ([]StmtActionFunc, error)

func (*Analyzer) MaxNamePath

func (a *Analyzer) MaxNamePath() int

func (*Analyzer) NamePath

func (a *Analyzer) NamePath() []string

func (*Analyzer) SetAutoIndexMode

func (a *Analyzer) SetAutoIndexMode(enabled bool)

func (*Analyzer) SetExplainMode

func (a *Analyzer) SetExplainMode(enabled bool)

func (*Analyzer) SetMaxNamePath

func (a *Analyzer) SetMaxNamePath(num int)

func (*Analyzer) SetNamePath

func (a *Analyzer) SetNamePath(path []string) error

func (*Analyzer) SubstituteDeclarationIfNeeded

func (a *Analyzer) SubstituteDeclarationIfNeeded(stmt parsed_ast.Node, query string, declarationMap map[string]string) (string, error)

type AnonymizedAggregateScanNode

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

func (*AnonymizedAggregateScanNode) FormatSQL

type ArgumentDefNode

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

func (*ArgumentDefNode) FormatSQL

func (n *ArgumentDefNode) FormatSQL(ctx context.Context) (string, error)

type ArgumentListNode

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

func (*ArgumentListNode) FormatSQL

func (n *ArgumentListNode) FormatSQL(ctx context.Context) (string, error)

type ArgumentRefNode

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

func (*ArgumentRefNode) FormatSQL

func (n *ArgumentRefNode) FormatSQL(ctx context.Context) (string, error)

type ArrayScanNode

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

func (*ArrayScanNode) FormatSQL

func (n *ArrayScanNode) FormatSQL(ctx context.Context) (string, error)

type ArrayValue

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

func (*ArrayValue) Add

func (av *ArrayValue) Add(v Value) (Value, error)

func (*ArrayValue) Div

func (av *ArrayValue) Div(v Value) (Value, error)

func (*ArrayValue) EQ

func (av *ArrayValue) EQ(v Value) (bool, error)

func (*ArrayValue) Format

func (av *ArrayValue) Format(verb rune) string

func (*ArrayValue) GT

func (av *ArrayValue) GT(v Value) (bool, error)

func (*ArrayValue) GTE

func (av *ArrayValue) GTE(v Value) (bool, error)

func (*ArrayValue) Has

func (av *ArrayValue) Has(v Value) (bool, error)

func (*ArrayValue) Interface

func (av *ArrayValue) Interface() interface{}

func (*ArrayValue) LT

func (av *ArrayValue) LT(v Value) (bool, error)

func (*ArrayValue) LTE

func (av *ArrayValue) LTE(v Value) (bool, error)

func (*ArrayValue) Mul

func (av *ArrayValue) Mul(v Value) (Value, error)

func (*ArrayValue) Sub

func (av *ArrayValue) Sub(v Value) (Value, error)

func (*ArrayValue) ToArray

func (av *ArrayValue) ToArray() (*ArrayValue, error)

func (*ArrayValue) ToBool

func (av *ArrayValue) ToBool() (bool, error)

func (*ArrayValue) ToBytes

func (av *ArrayValue) ToBytes() ([]byte, error)

func (*ArrayValue) ToFloat64

func (av *ArrayValue) ToFloat64() (float64, error)

func (*ArrayValue) ToInt64

func (av *ArrayValue) ToInt64() (int64, error)

func (*ArrayValue) ToJSON

func (av *ArrayValue) ToJSON() (string, error)

func (*ArrayValue) ToRat

func (av *ArrayValue) ToRat() (*big.Rat, error)

func (*ArrayValue) ToString

func (av *ArrayValue) ToString() (string, error)

func (*ArrayValue) ToStruct

func (av *ArrayValue) ToStruct() (*StructValue, error)

func (*ArrayValue) ToTime

func (av *ArrayValue) ToTime() (time.Time, error)

type AssertRowsModifiedNode

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

func (*AssertRowsModifiedNode) FormatSQL

func (n *AssertRowsModifiedNode) FormatSQL(ctx context.Context) (string, error)

type AssertStmtNode

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

func (*AssertStmtNode) FormatSQL

func (n *AssertStmtNode) FormatSQL(ctx context.Context) (string, error)

type AssignmentStmtNode

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

func (*AssignmentStmtNode) FormatSQL

func (n *AssignmentStmtNode) FormatSQL(ctx context.Context) (string, error)

type AuxLoadDataStmtNode

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

func (*AuxLoadDataStmtNode) FormatSQL

func (n *AuxLoadDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type BIT_AND_AGG

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

func (*BIT_AND_AGG) Done

func (f *BIT_AND_AGG) Done() (Value, error)

func (*BIT_AND_AGG) Step

func (f *BIT_AND_AGG) Step(v Value, opt *AggregatorOption) error

type BIT_OR_AGG

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

func (*BIT_OR_AGG) Done

func (f *BIT_OR_AGG) Done() (Value, error)

func (*BIT_OR_AGG) Step

func (f *BIT_OR_AGG) Step(v Value, opt *AggregatorOption) error

type BIT_XOR_AGG

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

func (*BIT_XOR_AGG) Done

func (f *BIT_XOR_AGG) Done() (Value, error)

func (*BIT_XOR_AGG) Step

func (f *BIT_XOR_AGG) Step(v Value, opt *AggregatorOption) error

type BeginStmtAction

type BeginStmtAction struct{}

func (*BeginStmtAction) Args

func (a *BeginStmtAction) Args() []interface{}

func (*BeginStmtAction) Cleanup

func (a *BeginStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*BeginStmtAction) ExecContext

func (a *BeginStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*BeginStmtAction) Prepare

func (a *BeginStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*BeginStmtAction) QueryContext

func (a *BeginStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type BeginStmtNode

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

func (*BeginStmtNode) FormatSQL

func (n *BeginStmtNode) FormatSQL(ctx context.Context) (string, error)

type BindFunction

type BindFunction func(...Value) (Value, error)

type BoolValue

type BoolValue bool

func (BoolValue) Add

func (bv BoolValue) Add(v Value) (Value, error)

func (BoolValue) Div

func (bv BoolValue) Div(v Value) (Value, error)

func (BoolValue) EQ

func (bv BoolValue) EQ(v Value) (bool, error)

func (BoolValue) Format

func (bv BoolValue) Format(verb rune) string

func (BoolValue) GT

func (bv BoolValue) GT(v Value) (bool, error)

func (BoolValue) GTE

func (bv BoolValue) GTE(v Value) (bool, error)

func (BoolValue) Interface

func (bv BoolValue) Interface() interface{}

func (BoolValue) LT

func (bv BoolValue) LT(v Value) (bool, error)

func (BoolValue) LTE

func (bv BoolValue) LTE(v Value) (bool, error)

func (BoolValue) Mul

func (bv BoolValue) Mul(v Value) (Value, error)

func (BoolValue) Sub

func (bv BoolValue) Sub(v Value) (Value, error)

func (BoolValue) ToArray

func (bv BoolValue) ToArray() (*ArrayValue, error)

func (BoolValue) ToBool

func (bv BoolValue) ToBool() (bool, error)

func (BoolValue) ToBytes

func (bv BoolValue) ToBytes() ([]byte, error)

func (BoolValue) ToFloat64

func (bv BoolValue) ToFloat64() (float64, error)

func (BoolValue) ToInt64

func (bv BoolValue) ToInt64() (int64, error)

func (BoolValue) ToJSON

func (bv BoolValue) ToJSON() (string, error)

func (BoolValue) ToRat

func (bv BoolValue) ToRat() (*big.Rat, error)

func (BoolValue) ToString

func (bv BoolValue) ToString() (string, error)

func (BoolValue) ToStruct

func (bv BoolValue) ToStruct() (*StructValue, error)

func (BoolValue) ToTime

func (bv BoolValue) ToTime() (time.Time, error)

type BytesValue

type BytesValue []byte

func (BytesValue) Add

func (bv BytesValue) Add(v Value) (Value, error)

func (BytesValue) Div

func (bv BytesValue) Div(v Value) (Value, error)

func (BytesValue) EQ

func (bv BytesValue) EQ(v Value) (bool, error)

func (BytesValue) Format

func (bv BytesValue) Format(verb rune) string

func (BytesValue) GT

func (bv BytesValue) GT(v Value) (bool, error)

func (BytesValue) GTE

func (bv BytesValue) GTE(v Value) (bool, error)

func (BytesValue) Interface

func (bv BytesValue) Interface() interface{}

func (BytesValue) LT

func (bv BytesValue) LT(v Value) (bool, error)

func (BytesValue) LTE

func (bv BytesValue) LTE(v Value) (bool, error)

func (BytesValue) Mul

func (bv BytesValue) Mul(v Value) (Value, error)

func (BytesValue) Sub

func (bv BytesValue) Sub(v Value) (Value, error)

func (BytesValue) ToArray

func (bv BytesValue) ToArray() (*ArrayValue, error)

func (BytesValue) ToBool

func (bv BytesValue) ToBool() (bool, error)

func (BytesValue) ToBytes

func (bv BytesValue) ToBytes() ([]byte, error)

func (BytesValue) ToFloat64

func (bv BytesValue) ToFloat64() (float64, error)

func (BytesValue) ToInt64

func (bv BytesValue) ToInt64() (int64, error)

func (BytesValue) ToJSON

func (bv BytesValue) ToJSON() (string, error)

func (BytesValue) ToRat

func (bv BytesValue) ToRat() (*big.Rat, error)

func (BytesValue) ToString

func (bv BytesValue) ToString() (string, error)

func (BytesValue) ToStruct

func (bv BytesValue) ToStruct() (*StructValue, error)

func (BytesValue) ToTime

func (bv BytesValue) ToTime() (time.Time, error)

type CORR

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

func (*CORR) Done

func (f *CORR) Done() (Value, error)

func (*CORR) Step

func (f *CORR) Step(x, y Value, opt *AggregatorOption) error

type COUNT

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

func (*COUNT) Done

func (f *COUNT) Done() (Value, error)

func (*COUNT) Step

func (f *COUNT) Step(v Value, opt *AggregatorOption) error

type COUNTIF

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

func (*COUNTIF) Done

func (f *COUNTIF) Done() (Value, error)

func (*COUNTIF) Step

func (f *COUNTIF) Step(cond Value, opt *AggregatorOption) error

type COUNT_STAR

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

func (*COUNT_STAR) Done

func (f *COUNT_STAR) Done() (Value, error)

func (*COUNT_STAR) Step

func (f *COUNT_STAR) Step(opt *AggregatorOption) error

type COVAR_POP

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

func (*COVAR_POP) Done

func (f *COVAR_POP) Done() (Value, error)

func (*COVAR_POP) Step

func (f *COVAR_POP) Step(x, y Value, opt *AggregatorOption) error

type COVAR_SAMP

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

func (*COVAR_SAMP) Done

func (f *COVAR_SAMP) Done() (Value, error)

func (*COVAR_SAMP) Step

func (f *COVAR_SAMP) Step(x, y Value, opt *AggregatorOption) error

type CallStmtNode

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

func (*CallStmtNode) FormatSQL

func (n *CallStmtNode) FormatSQL(ctx context.Context) (string, error)

type CastNode

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

func (*CastNode) FormatSQL

func (n *CastNode) FormatSQL(ctx context.Context) (string, error)

type Catalog

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

func NewCatalog

func NewCatalog(db *sql.DB) *Catalog

func (*Catalog) AddNewFunctionSpec

func (c *Catalog) AddNewFunctionSpec(ctx context.Context, conn *Conn, spec *FunctionSpec) error

func (*Catalog) AddNewTableSpec

func (c *Catalog) AddNewTableSpec(ctx context.Context, conn *Conn, spec *TableSpec) error

func (*Catalog) DeleteFunctionSpec

func (c *Catalog) DeleteFunctionSpec(ctx context.Context, conn *Conn, name string) error

func (*Catalog) DeleteTableSpec

func (c *Catalog) DeleteTableSpec(ctx context.Context, conn *Conn, name string) error

func (*Catalog) ExtendedTypeSuperTypes

func (c *Catalog) ExtendedTypeSuperTypes(typ types.Type) (*types.TypeListView, error)

func (*Catalog) FindConnection

func (c *Catalog) FindConnection(path []string) (types.Connection, error)

func (*Catalog) FindConstant

func (c *Catalog) FindConstant(path []string) (types.Constant, int, error)

func (*Catalog) FindConversion

func (c *Catalog) FindConversion(from, to types.Type) (types.Conversion, error)

func (*Catalog) FindFunction

func (c *Catalog) FindFunction(path []string) (*types.Function, error)

func (*Catalog) FindModel

func (c *Catalog) FindModel(path []string) (types.Model, error)

func (*Catalog) FindProcedure

func (c *Catalog) FindProcedure(path []string) (*types.Procedure, error)

func (*Catalog) FindTable

func (c *Catalog) FindTable(path []string) (types.Table, error)

func (*Catalog) FindTableValuedFunction

func (c *Catalog) FindTableValuedFunction(path []string) (types.TableValuedFunction, error)

func (*Catalog) FindType

func (c *Catalog) FindType(path []string) (types.Type, error)

func (*Catalog) FullName

func (c *Catalog) FullName() string

func (*Catalog) SuggestConstant

func (c *Catalog) SuggestConstant(mistypedPath []string) string

func (*Catalog) SuggestFunction

func (c *Catalog) SuggestFunction(mistypedPath []string) string

func (*Catalog) SuggestModel

func (c *Catalog) SuggestModel(mistypedPath []string) string

func (*Catalog) SuggestTable

func (c *Catalog) SuggestTable(mistypedPath []string) string

func (*Catalog) SuggestTableValuedFunction

func (c *Catalog) SuggestTableValuedFunction(mistypedPath []string) string

func (*Catalog) Sync

func (c *Catalog) Sync(ctx context.Context, conn *Conn) error

type CatalogSpecKind

type CatalogSpecKind string
const (
	TableSpecKind    CatalogSpecKind = "table"
	ViewSpecKind     CatalogSpecKind = "view"
	FunctionSpecKind CatalogSpecKind = "function"
)

type ChangedCatalog

type ChangedCatalog struct {
	Table    *ChangedTable
	Function *ChangedFunction
}

func (*ChangedCatalog) Changed

func (c *ChangedCatalog) Changed() bool

type ChangedFunction

type ChangedFunction struct {
	Added   []*FunctionSpec
	Deleted []*FunctionSpec
}

func (*ChangedFunction) Changed

func (f *ChangedFunction) Changed() bool

type ChangedTable

type ChangedTable struct {
	Added   []*TableSpec
	Updated []*TableSpec
	Deleted []*TableSpec
}

func (*ChangedTable) Changed

func (t *ChangedTable) Changed() bool

type CheckConstraintNode

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

func (*CheckConstraintNode) FormatSQL

func (n *CheckConstraintNode) FormatSQL(ctx context.Context) (string, error)

type CloneDataStmtNode

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

func (*CloneDataStmtNode) FormatSQL

func (n *CloneDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type ColumnAnnotationsNode

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

func (*ColumnAnnotationsNode) FormatSQL

func (n *ColumnAnnotationsNode) FormatSQL(ctx context.Context) (string, error)

type ColumnDefaultValueNode

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

func (*ColumnDefaultValueNode) FormatSQL

func (n *ColumnDefaultValueNode) FormatSQL(ctx context.Context) (string, error)

type ColumnDefinitionNode

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

func (*ColumnDefinitionNode) FormatSQL

func (n *ColumnDefinitionNode) FormatSQL(ctx context.Context) (string, error)

type ColumnHolderNode

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

func (*ColumnHolderNode) FormatSQL

func (n *ColumnHolderNode) FormatSQL(ctx context.Context) (string, error)

type ColumnRefNode

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

func (*ColumnRefNode) FormatSQL

func (n *ColumnRefNode) FormatSQL(ctx context.Context) (string, error)

type ColumnSpec

type ColumnSpec struct {
	Name      string `json:"name"`
	Type      *Type  `json:"type"`
	IsNotNull bool   `json:"isNotNull"`
}

func (*ColumnSpec) SQLiteSchema

func (s *ColumnSpec) SQLiteSchema() string

type CombinationFormatTimeInfo

type CombinationFormatTimeInfo struct {
	AvailableTypes []TimeFormatType
	Parse          func([]rune, *time.Time) (int, error)
	Format         func(*time.Time) ([]rune, error)
}

func (*CombinationFormatTimeInfo) Available

func (i *CombinationFormatTimeInfo) Available(typ TimeFormatType) bool

type CommitStmtAction

type CommitStmtAction struct{}

func (*CommitStmtAction) Args

func (a *CommitStmtAction) Args() []interface{}

func (*CommitStmtAction) Cleanup

func (a *CommitStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*CommitStmtAction) ExecContext

func (a *CommitStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*CommitStmtAction) Prepare

func (a *CommitStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*CommitStmtAction) QueryContext

func (a *CommitStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type CommitStmtNode

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

func (*CommitStmtNode) FormatSQL

func (n *CommitStmtNode) FormatSQL(ctx context.Context) (string, error)

type ComputedColumnNode

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

func (*ComputedColumnNode) FormatSQL

func (n *ComputedColumnNode) FormatSQL(ctx context.Context) (string, error)

type Conn

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

func NewConn

func NewConn(conn *sql.Conn, tx *sql.Tx) *Conn

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*Conn) PrepareContext

func (c *Conn) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (*Conn) QueryContext

func (c *Conn) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

type ConnectionNode

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

func (*ConnectionNode) FormatSQL

func (n *ConnectionNode) FormatSQL(ctx context.Context) (string, error)

type ConstantNode

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

func (*ConstantNode) FormatSQL

func (n *ConstantNode) FormatSQL(ctx context.Context) (string, error)

type CreateConstantStmtNode

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

func (*CreateConstantStmtNode) FormatSQL

func (n *CreateConstantStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateDatabaseStmtNode

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

func (*CreateDatabaseStmtNode) FormatSQL

func (n *CreateDatabaseStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateEntityStmtNode

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

func (*CreateEntityStmtNode) FormatSQL

func (n *CreateEntityStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateExternalTableStmtNode

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

func (*CreateExternalTableStmtNode) FormatSQL

type CreateFunctionStmt

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

func (*CreateFunctionStmt) Close

func (s *CreateFunctionStmt) Close() error

func (*CreateFunctionStmt) Exec

func (s *CreateFunctionStmt) Exec(args []driver.Value) (driver.Result, error)

func (*CreateFunctionStmt) NumInput

func (s *CreateFunctionStmt) NumInput() int

func (*CreateFunctionStmt) Query

func (s *CreateFunctionStmt) Query(args []driver.Value) (driver.Rows, error)

type CreateFunctionStmtAction

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

func (*CreateFunctionStmtAction) Args

func (a *CreateFunctionStmtAction) Args() []interface{}

func (*CreateFunctionStmtAction) Cleanup

func (a *CreateFunctionStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*CreateFunctionStmtAction) ExecContext

func (a *CreateFunctionStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*CreateFunctionStmtAction) Prepare

func (a *CreateFunctionStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*CreateFunctionStmtAction) QueryContext

func (a *CreateFunctionStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type CreateFunctionStmtNode

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

func (*CreateFunctionStmtNode) FormatSQL

func (n *CreateFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateIndexStmtNode

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

func (*CreateIndexStmtNode) FormatSQL

func (n *CreateIndexStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateMaterializedViewStmtNode

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

func (*CreateMaterializedViewStmtNode) FormatSQL

type CreateModelStmtNode

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

func (*CreateModelStmtNode) FormatSQL

func (n *CreateModelStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreatePrivilegeRestrictionStmtNode

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

func (*CreatePrivilegeRestrictionStmtNode) FormatSQL

type CreateProcedureStmtNode

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

func (*CreateProcedureStmtNode) FormatSQL

func (n *CreateProcedureStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateRowAccessPolicyStmtNode

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

func (*CreateRowAccessPolicyStmtNode) FormatSQL

type CreateSchemaStmtNode

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

func (*CreateSchemaStmtNode) FormatSQL

func (n *CreateSchemaStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateSnapshotTableStmtNode

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

func (*CreateSnapshotTableStmtNode) FormatSQL

type CreateTableAsSelectStmtNode

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

func (*CreateTableAsSelectStmtNode) FormatSQL

type CreateTableFunctionStmtNode

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

func (*CreateTableFunctionStmtNode) FormatSQL

type CreateTableStmt

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

func (*CreateTableStmt) Close

func (s *CreateTableStmt) Close() error

func (*CreateTableStmt) Exec

func (s *CreateTableStmt) Exec(args []driver.Value) (driver.Result, error)

func (*CreateTableStmt) NumInput

func (s *CreateTableStmt) NumInput() int

func (*CreateTableStmt) Query

func (s *CreateTableStmt) Query(args []driver.Value) (driver.Rows, error)

type CreateTableStmtAction

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

func (*CreateTableStmtAction) Args

func (a *CreateTableStmtAction) Args() []interface{}

func (*CreateTableStmtAction) Cleanup

func (a *CreateTableStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*CreateTableStmtAction) ExecContext

func (a *CreateTableStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*CreateTableStmtAction) Prepare

func (a *CreateTableStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*CreateTableStmtAction) QueryContext

func (a *CreateTableStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type CreateTableStmtNode

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

func (*CreateTableStmtNode) FormatSQL

func (n *CreateTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateViewStmt

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

func (*CreateViewStmt) Close

func (s *CreateViewStmt) Close() error

func (*CreateViewStmt) Exec

func (s *CreateViewStmt) Exec(args []driver.Value) (driver.Result, error)

func (*CreateViewStmt) NumInput

func (s *CreateViewStmt) NumInput() int

func (*CreateViewStmt) Query

func (s *CreateViewStmt) Query(args []driver.Value) (driver.Rows, error)

type CreateViewStmtAction

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

func (*CreateViewStmtAction) Args

func (a *CreateViewStmtAction) Args() []interface{}

func (*CreateViewStmtAction) Cleanup

func (a *CreateViewStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*CreateViewStmtAction) ExecContext

func (a *CreateViewStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*CreateViewStmtAction) Prepare

func (a *CreateViewStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*CreateViewStmtAction) QueryContext

func (a *CreateViewStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type CreateViewStmtNode

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

func (*CreateViewStmtNode) FormatSQL

func (n *CreateViewStmtNode) FormatSQL(ctx context.Context) (string, error)

type DMLDefaultNode

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

func (*DMLDefaultNode) FormatSQL

func (n *DMLDefaultNode) FormatSQL(ctx context.Context) (string, error)

type DMLStmt

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

func (*DMLStmt) CheckNamedValue

func (s *DMLStmt) CheckNamedValue(value *driver.NamedValue) error

func (*DMLStmt) Close

func (s *DMLStmt) Close() error

func (*DMLStmt) Exec

func (s *DMLStmt) Exec(args []driver.Value) (driver.Result, error)

func (*DMLStmt) ExecContext

func (s *DMLStmt) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*DMLStmt) NumInput

func (s *DMLStmt) NumInput() int

func (*DMLStmt) Query

func (s *DMLStmt) Query(args []driver.Value) (driver.Rows, error)

func (*DMLStmt) QueryContext

func (s *DMLStmt) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type DMLStmtAction

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

func (*DMLStmtAction) Args

func (a *DMLStmtAction) Args() []interface{}

func (*DMLStmtAction) Cleanup

func (a *DMLStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*DMLStmtAction) ExecContext

func (a *DMLStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*DMLStmtAction) Prepare

func (a *DMLStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*DMLStmtAction) QueryContext

func (a *DMLStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type DMLValueNode

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

func (*DMLValueNode) FormatSQL

func (n *DMLValueNode) FormatSQL(ctx context.Context) (string, error)

type DateValue

type DateValue time.Time

func (DateValue) Add

func (d DateValue) Add(v Value) (Value, error)

func (DateValue) AddDateWithInterval

func (d DateValue) AddDateWithInterval(v int, interval string) (Value, error)

func (DateValue) Div

func (d DateValue) Div(v Value) (Value, error)

func (DateValue) EQ

func (d DateValue) EQ(v Value) (bool, error)

func (DateValue) Format

func (d DateValue) Format(verb rune) string

func (DateValue) GT

func (d DateValue) GT(v Value) (bool, error)

func (DateValue) GTE

func (d DateValue) GTE(v Value) (bool, error)

func (DateValue) Interface

func (d DateValue) Interface() interface{}

func (DateValue) LT

func (d DateValue) LT(v Value) (bool, error)

func (DateValue) LTE

func (d DateValue) LTE(v Value) (bool, error)

func (DateValue) Mul

func (d DateValue) Mul(v Value) (Value, error)

func (DateValue) Sub

func (d DateValue) Sub(v Value) (Value, error)

func (DateValue) ToArray

func (d DateValue) ToArray() (*ArrayValue, error)

func (DateValue) ToBool

func (d DateValue) ToBool() (bool, error)

func (DateValue) ToBytes

func (d DateValue) ToBytes() ([]byte, error)

func (DateValue) ToFloat64

func (d DateValue) ToFloat64() (float64, error)

func (DateValue) ToInt64

func (d DateValue) ToInt64() (int64, error)

func (DateValue) ToJSON

func (d DateValue) ToJSON() (string, error)

func (DateValue) ToRat

func (d DateValue) ToRat() (*big.Rat, error)

func (DateValue) ToString

func (d DateValue) ToString() (string, error)

func (DateValue) ToStruct

func (d DateValue) ToStruct() (*StructValue, error)

func (DateValue) ToTime

func (d DateValue) ToTime() (time.Time, error)

type DatetimeValue

type DatetimeValue time.Time

func (DatetimeValue) Add

func (d DatetimeValue) Add(v Value) (Value, error)

func (DatetimeValue) Div

func (d DatetimeValue) Div(v Value) (Value, error)

func (DatetimeValue) EQ

func (d DatetimeValue) EQ(v Value) (bool, error)

func (DatetimeValue) Format

func (d DatetimeValue) Format(verb rune) string

func (DatetimeValue) GT

func (d DatetimeValue) GT(v Value) (bool, error)

func (DatetimeValue) GTE

func (d DatetimeValue) GTE(v Value) (bool, error)

func (DatetimeValue) Interface

func (d DatetimeValue) Interface() interface{}

func (DatetimeValue) LT

func (d DatetimeValue) LT(v Value) (bool, error)

func (DatetimeValue) LTE

func (d DatetimeValue) LTE(v Value) (bool, error)

func (DatetimeValue) Mul

func (d DatetimeValue) Mul(v Value) (Value, error)

func (DatetimeValue) Sub

func (d DatetimeValue) Sub(v Value) (Value, error)

func (DatetimeValue) ToArray

func (d DatetimeValue) ToArray() (*ArrayValue, error)

func (DatetimeValue) ToBool

func (d DatetimeValue) ToBool() (bool, error)

func (DatetimeValue) ToBytes

func (d DatetimeValue) ToBytes() ([]byte, error)

func (DatetimeValue) ToFloat64

func (d DatetimeValue) ToFloat64() (float64, error)

func (DatetimeValue) ToInt64

func (d DatetimeValue) ToInt64() (int64, error)

func (DatetimeValue) ToJSON

func (d DatetimeValue) ToJSON() (string, error)

func (DatetimeValue) ToRat

func (d DatetimeValue) ToRat() (*big.Rat, error)

func (DatetimeValue) ToString

func (d DatetimeValue) ToString() (string, error)

func (DatetimeValue) ToStruct

func (d DatetimeValue) ToStruct() (*StructValue, error)

func (DatetimeValue) ToTime

func (d DatetimeValue) ToTime() (time.Time, error)

type DayOfWeek

type DayOfWeek string
const (
	Sunday    DayOfWeek = "Sunday"
	Monday    DayOfWeek = "Monday"
	Tuesday   DayOfWeek = "Tuesday"
	Wednesday DayOfWeek = "Wednesday"
	Thursday  DayOfWeek = "Thursday"
	Friday    DayOfWeek = "Friday"
	Saturday  DayOfWeek = "Saturday"
)

type DefineTableStmtNode

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

func (*DefineTableStmtNode) FormatSQL

func (n *DefineTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type DeleteStmtNode

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

func (*DeleteStmtNode) FormatSQL

func (n *DeleteStmtNode) FormatSQL(ctx context.Context) (string, error)

type DescribeStmtNode

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

func (*DescribeStmtNode) FormatSQL

func (n *DescribeStmtNode) FormatSQL(ctx context.Context) (string, error)

type DescriptorNode

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

func (*DescriptorNode) FormatSQL

func (n *DescriptorNode) FormatSQL(ctx context.Context) (string, error)

type DropColumnActionNode

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

func (*DropColumnActionNode) FormatSQL

func (n *DropColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type DropConstraintActionNode

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

func (*DropConstraintActionNode) FormatSQL

func (n *DropConstraintActionNode) FormatSQL(ctx context.Context) (string, error)

type DropFunctionStmtNode

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

func (*DropFunctionStmtNode) FormatSQL

func (n *DropFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropMaterializedViewStmtNode

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

func (*DropMaterializedViewStmtNode) FormatSQL

type DropPrimaryKeyActionNode

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

func (*DropPrimaryKeyActionNode) FormatSQL

func (n *DropPrimaryKeyActionNode) FormatSQL(ctx context.Context) (string, error)

type DropPrivilegeRestrictionStmtNode

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

func (*DropPrivilegeRestrictionStmtNode) FormatSQL

type DropRowAccessPolicyStmtNode

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

func (*DropRowAccessPolicyStmtNode) FormatSQL

type DropSearchIndexStmtNode

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

func (*DropSearchIndexStmtNode) FormatSQL

func (n *DropSearchIndexStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropSnapshotTableStmtNode

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

func (*DropSnapshotTableStmtNode) FormatSQL

func (n *DropSnapshotTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropStmtAction

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

func (*DropStmtAction) Args

func (a *DropStmtAction) Args() []interface{}

func (*DropStmtAction) Cleanup

func (a *DropStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*DropStmtAction) ExecContext

func (a *DropStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*DropStmtAction) Prepare

func (a *DropStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*DropStmtAction) QueryContext

func (a *DropStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type DropStmtNode

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

func (*DropStmtNode) FormatSQL

func (n *DropStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropTableFunctionStmtNode

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

func (*DropTableFunctionStmtNode) FormatSQL

func (n *DropTableFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type Error

type Error struct {
	Msg                  string
	Line                 int
	Column               int
	TermLength           int
	IncompleteColumnName string
}

func (Error) Error

func (e Error) Error() string

type ErrorGroup

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

func (*ErrorGroup) Add

func (eg *ErrorGroup) Add(e error)

func (*ErrorGroup) Error

func (eg *ErrorGroup) Error() string

func (*ErrorGroup) HasError

func (eg *ErrorGroup) HasError() bool

type ExecuteImmediateArgumentNode

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

func (*ExecuteImmediateArgumentNode) FormatSQL

type ExecuteImmediateStmtNode

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

func (*ExecuteImmediateStmtNode) FormatSQL

func (n *ExecuteImmediateStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExplainStmtNode

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

func (*ExplainStmtNode) FormatSQL

func (n *ExplainStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExportDataStmtNode

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

func (*ExportDataStmtNode) FormatSQL

func (n *ExportDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExportModelStmtNode

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

func (*ExportModelStmtNode) FormatSQL

func (n *ExportModelStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExpressionColumnNode

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

func (*ExpressionColumnNode) FormatSQL

func (n *ExpressionColumnNode) FormatSQL(ctx context.Context) (string, error)

type ExtendedCastElementNode

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

func (*ExtendedCastElementNode) FormatSQL

func (n *ExtendedCastElementNode) FormatSQL(ctx context.Context) (string, error)

type ExtendedCastNode

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

func (*ExtendedCastNode) FormatSQL

func (n *ExtendedCastNode) FormatSQL(ctx context.Context) (string, error)

type FilterFieldArgNode

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

func (*FilterFieldArgNode) FormatSQL

func (n *FilterFieldArgNode) FormatSQL(ctx context.Context) (string, error)

type FilterFieldNode

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

func (*FilterFieldNode) FormatSQL

func (n *FilterFieldNode) FormatSQL(ctx context.Context) (string, error)

type FilterScanNode

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

func (*FilterScanNode) FormatSQL

func (n *FilterScanNode) FormatSQL(ctx context.Context) (string, error)

type FilterUsingActionNode

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

func (*FilterUsingActionNode) FormatSQL

func (n *FilterUsingActionNode) FormatSQL(ctx context.Context) (string, error)

type FlattenNode

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

func (*FlattenNode) FormatSQL

func (n *FlattenNode) FormatSQL(ctx context.Context) (string, error)

type FlattenedArgNode

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

func (*FlattenedArgNode) FormatSQL

func (n *FlattenedArgNode) FormatSQL(ctx context.Context) (string, error)

type FloatValue

type FloatValue float64

func (FloatValue) Add

func (fv FloatValue) Add(v Value) (Value, error)

func (FloatValue) Div

func (fv FloatValue) Div(v Value) (Value, error)

func (FloatValue) EQ

func (fv FloatValue) EQ(v Value) (bool, error)

func (FloatValue) Format

func (fv FloatValue) Format(verb rune) string

func (FloatValue) GT

func (fv FloatValue) GT(v Value) (bool, error)

func (FloatValue) GTE

func (fv FloatValue) GTE(v Value) (bool, error)

func (FloatValue) Interface

func (fv FloatValue) Interface() interface{}

func (FloatValue) LT

func (fv FloatValue) LT(v Value) (bool, error)

func (FloatValue) LTE

func (fv FloatValue) LTE(v Value) (bool, error)

func (FloatValue) Mul

func (fv FloatValue) Mul(v Value) (Value, error)

func (FloatValue) Sub

func (fv FloatValue) Sub(v Value) (Value, error)

func (FloatValue) ToArray

func (fv FloatValue) ToArray() (*ArrayValue, error)

func (FloatValue) ToBool

func (fv FloatValue) ToBool() (bool, error)

func (FloatValue) ToBytes

func (fv FloatValue) ToBytes() ([]byte, error)

func (FloatValue) ToFloat64

func (fv FloatValue) ToFloat64() (float64, error)

func (FloatValue) ToInt64

func (fv FloatValue) ToInt64() (int64, error)

func (FloatValue) ToJSON

func (fv FloatValue) ToJSON() (string, error)

func (FloatValue) ToRat

func (fv FloatValue) ToRat() (*big.Rat, error)

func (FloatValue) ToString

func (fv FloatValue) ToString() (string, error)

func (FloatValue) ToStruct

func (fv FloatValue) ToStruct() (*StructValue, error)

func (FloatValue) ToTime

func (fv FloatValue) ToTime() (time.Time, error)

type ForeignKeyNode

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

func (*ForeignKeyNode) FormatSQL

func (n *ForeignKeyNode) FormatSQL(ctx context.Context) (string, error)

type FormatContext

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

type FormatFlag

type FormatFlag int
const (
	FormatFlagNone  FormatFlag = 0
	FormatFlagMinus FormatFlag = 1
	FormatFlagPlus  FormatFlag = 2
	FormatFlagSpace FormatFlag = 3
	FormatFlagSharp FormatFlag = 4
	FormatFlagZero  FormatFlag = 5
	FormatFlagQuote FormatFlag = 6
)

type FormatInfo

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

type FormatParam

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

type FormatPrecision

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

type FormatTimeInfo

type FormatTimeInfo struct {
	AvailableTypes []TimeFormatType
	Parse          func([]rune, *time.Time) (int, error)
	Format         func(*time.Time) ([]rune, error)
}

func (*FormatTimeInfo) Available

func (i *FormatTimeInfo) Available(typ TimeFormatType) bool

type FormatWidth

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

type Formatter

type Formatter interface {
	FormatSQL(context.Context) (string, error)
}

func New

func New(node ast.Node) Formatter

type FuncInfo

type FuncInfo struct {
	Name     string
	BindFunc BindFunction
}

type FunctionArgumentNode

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

func (*FunctionArgumentNode) FormatSQL

func (n *FunctionArgumentNode) FormatSQL(ctx context.Context) (string, error)

type FunctionCallNode

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

func (*FunctionCallNode) FormatSQL

func (n *FunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type FunctionSignatureHolderNode

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

func (*FunctionSignatureHolderNode) FormatSQL

type FunctionSpec

type FunctionSpec struct {
	IsTemp    bool            `json:"isTemp"`
	NamePath  []string        `json:"name"`
	Language  string          `json:"language"`
	Args      []*NameWithType `json:"args"`
	Return    *Type           `json:"return"`
	Body      string          `json:"body"`
	Code      string          `json:"code"`
	UpdatedAt time.Time       `json:"updatedAt"`
	CreatedAt time.Time       `json:"createdAt"`
}

func (*FunctionSpec) CallSQL

func (s *FunctionSpec) CallSQL(ctx context.Context, callNode *ast.BaseFunctionCallNode, argValues []string) (string, error)

func (*FunctionSpec) FuncName

func (s *FunctionSpec) FuncName() string

func (*FunctionSpec) SQL

func (s *FunctionSpec) SQL() string

type GeneratedColumnInfoNode

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

func (*GeneratedColumnInfoNode) FormatSQL

func (n *GeneratedColumnInfoNode) FormatSQL(ctx context.Context) (string, error)

type GetJsonFieldNode

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

func (*GetJsonFieldNode) FormatSQL

func (n *GetJsonFieldNode) FormatSQL(ctx context.Context) (string, error)

type GetProtoFieldNode

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

func (*GetProtoFieldNode) FormatSQL

func (n *GetProtoFieldNode) FormatSQL(ctx context.Context) (string, error)

type GetStructFieldNode

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

func (*GetStructFieldNode) FormatSQL

func (n *GetStructFieldNode) FormatSQL(ctx context.Context) (string, error)

type GrantStmtNode

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

func (*GrantStmtNode) FormatSQL

func (n *GrantStmtNode) FormatSQL(ctx context.Context) (string, error)

type GrantToActionNode

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

func (*GrantToActionNode) FormatSQL

func (n *GrantToActionNode) FormatSQL(ctx context.Context) (string, error)

type GroupRowsScanNode

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

func (*GroupRowsScanNode) FormatSQL

func (n *GroupRowsScanNode) FormatSQL(ctx context.Context) (string, error)

type GroupingSetNode

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

func (*GroupingSetNode) FormatSQL

func (n *GroupingSetNode) FormatSQL(ctx context.Context) (string, error)

type HLL_COUNT_INIT

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

func (*HLL_COUNT_INIT) Done

func (f *HLL_COUNT_INIT) Done() (Value, error)

func (*HLL_COUNT_INIT) Step

func (f *HLL_COUNT_INIT) Step(input Value, precision int64, opt *AggregatorOption) (e error)

type HLL_COUNT_MERGE

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

func (*HLL_COUNT_MERGE) Done

func (f *HLL_COUNT_MERGE) Done() (Value, error)

func (*HLL_COUNT_MERGE) Step

func (f *HLL_COUNT_MERGE) Step(sketch []byte, opt *AggregatorOption) error

type HLL_COUNT_MERGE_PARTIAL

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

func (*HLL_COUNT_MERGE_PARTIAL) Done

func (f *HLL_COUNT_MERGE_PARTIAL) Done() (Value, error)

func (*HLL_COUNT_MERGE_PARTIAL) Step

func (f *HLL_COUNT_MERGE_PARTIAL) Step(sketch []byte, opt *AggregatorOption) error

type ImportStmtNode

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

func (*ImportStmtNode) FormatSQL

func (n *ImportStmtNode) FormatSQL(ctx context.Context) (string, error)

type IndexItemNode

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

func (*IndexItemNode) FormatSQL

func (n *IndexItemNode) FormatSQL(ctx context.Context) (string, error)

type InlineLambdaNode

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

func (*InlineLambdaNode) FormatSQL

func (n *InlineLambdaNode) FormatSQL(ctx context.Context) (string, error)

type InputPattern

type InputPattern int
const (
	InputKeep      InputPattern = 0
	InputNeedsWrap InputPattern = 1
	InputNeedsFrom InputPattern = 2
)

type InsertRowNode

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

func (*InsertRowNode) FormatSQL

func (n *InsertRowNode) FormatSQL(ctx context.Context) (string, error)

type InsertStmtNode

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

func (*InsertStmtNode) FormatSQL

func (n *InsertStmtNode) FormatSQL(ctx context.Context) (string, error)

type IntValue

type IntValue int64

func (IntValue) Add

func (iv IntValue) Add(v Value) (Value, error)

func (IntValue) Div

func (iv IntValue) Div(v Value) (Value, error)

func (IntValue) EQ

func (iv IntValue) EQ(v Value) (bool, error)

func (IntValue) Format

func (iv IntValue) Format(verb rune) string

func (IntValue) GT

func (iv IntValue) GT(v Value) (bool, error)

func (IntValue) GTE

func (iv IntValue) GTE(v Value) (bool, error)

func (IntValue) Interface

func (iv IntValue) Interface() interface{}

func (IntValue) LT

func (iv IntValue) LT(v Value) (bool, error)

func (IntValue) LTE

func (iv IntValue) LTE(v Value) (bool, error)

func (IntValue) Mul

func (iv IntValue) Mul(v Value) (Value, error)

func (IntValue) Sub

func (iv IntValue) Sub(v Value) (Value, error)

func (IntValue) ToArray

func (iv IntValue) ToArray() (*ArrayValue, error)

func (IntValue) ToBool

func (iv IntValue) ToBool() (bool, error)

func (IntValue) ToBytes

func (iv IntValue) ToBytes() ([]byte, error)

func (IntValue) ToFloat64

func (iv IntValue) ToFloat64() (float64, error)

func (IntValue) ToInt64

func (iv IntValue) ToInt64() (int64, error)

func (IntValue) ToJSON

func (iv IntValue) ToJSON() (string, error)

func (IntValue) ToRat

func (iv IntValue) ToRat() (*big.Rat, error)

func (IntValue) ToString

func (iv IntValue) ToString() (string, error)

func (IntValue) ToStruct

func (iv IntValue) ToStruct() (*StructValue, error)

func (IntValue) ToTime

func (iv IntValue) ToTime() (time.Time, error)

type IntervalValue

type IntervalValue struct {
	*bigquery.IntervalValue
}

func (*IntervalValue) Add

func (iv *IntervalValue) Add(v Value) (Value, error)

func (*IntervalValue) Div

func (iv *IntervalValue) Div(v Value) (Value, error)

func (*IntervalValue) EQ

func (iv *IntervalValue) EQ(v Value) (bool, error)

func (*IntervalValue) Format

func (iv *IntervalValue) Format(verb rune) string

func (*IntervalValue) GT

func (iv *IntervalValue) GT(v Value) (bool, error)

func (*IntervalValue) GTE

func (iv *IntervalValue) GTE(v Value) (bool, error)

func (*IntervalValue) Interface

func (iv *IntervalValue) Interface() interface{}

func (*IntervalValue) LT

func (iv *IntervalValue) LT(v Value) (bool, error)

func (*IntervalValue) LTE

func (iv *IntervalValue) LTE(v Value) (bool, error)

func (*IntervalValue) Mul

func (iv *IntervalValue) Mul(v Value) (Value, error)

func (*IntervalValue) Sub

func (iv *IntervalValue) Sub(v Value) (Value, error)

func (*IntervalValue) ToArray

func (iv *IntervalValue) ToArray() (*ArrayValue, error)

func (*IntervalValue) ToBool

func (iv *IntervalValue) ToBool() (bool, error)

func (*IntervalValue) ToBytes

func (iv *IntervalValue) ToBytes() ([]byte, error)

func (*IntervalValue) ToFloat64

func (iv *IntervalValue) ToFloat64() (float64, error)

func (*IntervalValue) ToInt64

func (iv *IntervalValue) ToInt64() (int64, error)

func (*IntervalValue) ToJSON

func (iv *IntervalValue) ToJSON() (string, error)

func (*IntervalValue) ToRat

func (iv *IntervalValue) ToRat() (*big.Rat, error)

func (*IntervalValue) ToString

func (iv *IntervalValue) ToString() (string, error)

func (*IntervalValue) ToStruct

func (iv *IntervalValue) ToStruct() (*StructValue, error)

func (*IntervalValue) ToTime

func (iv *IntervalValue) ToTime() (time.Time, error)

type JoinScanNode

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

func (*JoinScanNode) FormatSQL

func (n *JoinScanNode) FormatSQL(ctx context.Context) (string, error)

type JsonValue

type JsonValue string

func (JsonValue) Add

func (jv JsonValue) Add(v Value) (Value, error)

func (JsonValue) Div

func (jv JsonValue) Div(v Value) (Value, error)

func (JsonValue) EQ

func (jv JsonValue) EQ(v Value) (bool, error)

func (JsonValue) Format

func (jv JsonValue) Format(verb rune) string

func (JsonValue) GT

func (jv JsonValue) GT(v Value) (bool, error)

func (JsonValue) GTE

func (jv JsonValue) GTE(v Value) (bool, error)

func (JsonValue) Interface

func (jv JsonValue) Interface() interface{}

func (JsonValue) LT

func (jv JsonValue) LT(v Value) (bool, error)

func (JsonValue) LTE

func (jv JsonValue) LTE(v Value) (bool, error)

func (JsonValue) Mul

func (jv JsonValue) Mul(v Value) (Value, error)

func (JsonValue) Sub

func (jv JsonValue) Sub(v Value) (Value, error)

func (JsonValue) ToArray

func (jv JsonValue) ToArray() (*ArrayValue, error)

func (JsonValue) ToBool

func (jv JsonValue) ToBool() (bool, error)

func (JsonValue) ToBytes

func (jv JsonValue) ToBytes() ([]byte, error)

func (JsonValue) ToFloat64

func (jv JsonValue) ToFloat64() (float64, error)

func (JsonValue) ToInt64

func (jv JsonValue) ToInt64() (int64, error)

func (JsonValue) ToJSON

func (jv JsonValue) ToJSON() (string, error)

func (JsonValue) ToRat

func (jv JsonValue) ToRat() (*big.Rat, error)

func (JsonValue) ToString

func (jv JsonValue) ToString() (string, error)

func (JsonValue) ToStruct

func (jv JsonValue) ToStruct() (*StructValue, error)

func (JsonValue) ToTime

func (jv JsonValue) ToTime() (time.Time, error)

func (JsonValue) Type

func (jv JsonValue) Type() string

type LOGICAL_AND

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

func (*LOGICAL_AND) Done

func (f *LOGICAL_AND) Done() (Value, error)

func (*LOGICAL_AND) Step

func (f *LOGICAL_AND) Step(cond Value, opt *AggregatorOption) error

type LOGICAL_OR

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

func (*LOGICAL_OR) Done

func (f *LOGICAL_OR) Done() (Value, error)

func (*LOGICAL_OR) Step

func (f *LOGICAL_OR) Step(cond Value, opt *AggregatorOption) error

type LetExprNode

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

func (*LetExprNode) FormatSQL

func (n *LetExprNode) FormatSQL(ctx context.Context) (string, error)

type LimitOffsetScanNode

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

func (*LimitOffsetScanNode) FormatSQL

func (n *LimitOffsetScanNode) FormatSQL(ctx context.Context) (string, error)

type LiteralNode

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

func (*LiteralNode) FormatSQL

func (n *LiteralNode) FormatSQL(ctx context.Context) (string, error)

type MAX

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

func (*MAX) Done

func (f *MAX) Done() (Value, error)

func (*MAX) Step

func (f *MAX) Step(v Value, opt *AggregatorOption) error

type MIN

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

func (*MIN) Done

func (f *MIN) Done() (Value, error)

func (*MIN) Step

func (f *MIN) Step(v Value, opt *AggregatorOption) error

type MakeProtoFieldNode

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

func (*MakeProtoFieldNode) FormatSQL

func (n *MakeProtoFieldNode) FormatSQL(ctx context.Context) (string, error)

type MakeProtoNode

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

func (*MakeProtoNode) FormatSQL

func (n *MakeProtoNode) FormatSQL(ctx context.Context) (string, error)

type MakeStructNode

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

func (*MakeStructNode) FormatSQL

func (n *MakeStructNode) FormatSQL(ctx context.Context) (string, error)

type MergeStmtAction

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

func (*MergeStmtAction) Args

func (a *MergeStmtAction) Args() []interface{}

func (*MergeStmtAction) Cleanup

func (a *MergeStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*MergeStmtAction) ExecContext

func (a *MergeStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*MergeStmtAction) Prepare

func (a *MergeStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*MergeStmtAction) QueryContext

func (a *MergeStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type MergeStmtNode

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

func (*MergeStmtNode) FormatSQL

func (n *MergeStmtNode) FormatSQL(ctx context.Context) (string, error)

type MergeWhenNode

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

func (*MergeWhenNode) FormatSQL

func (n *MergeWhenNode) FormatSQL(ctx context.Context) (string, error)

type ModelNode

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

func (*ModelNode) FormatSQL

func (n *ModelNode) FormatSQL(ctx context.Context) (string, error)

type ModuleStmtNode

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

func (*ModuleStmtNode) FormatSQL

func (n *ModuleStmtNode) FormatSQL(ctx context.Context) (string, error)

type Month

type Month string
const (
	January   Month = "January"
	February  Month = "February"
	March     Month = "March"
	April     Month = "April"
	May       Month = "May"
	June      Month = "June"
	July      Month = "July"
	August    Month = "August"
	September Month = "September"
	October   Month = "October"
	November  Month = "November"
	December  Month = "December"
)

type NameAndFunc

type NameAndFunc struct {
	Name string
	Func interface{}
}

type NamePath

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

type NameWithType

type NameWithType struct {
	Name string `json:"name"`
	Type *Type  `json:"type"`
}

func (*NameWithType) FunctionArgumentType

func (t *NameWithType) FunctionArgumentType() (*types.FunctionArgumentType, error)

type NumericValue

type NumericValue struct {
	*big.Rat
	// contains filtered or unexported fields
}

func (*NumericValue) Add

func (nv *NumericValue) Add(v Value) (Value, error)

func (*NumericValue) Div

func (nv *NumericValue) Div(v Value) (ret Value, e error)

func (*NumericValue) EQ

func (nv *NumericValue) EQ(v Value) (bool, error)

func (*NumericValue) Format

func (nv *NumericValue) Format(verb rune) string

func (*NumericValue) GT

func (nv *NumericValue) GT(v Value) (bool, error)

func (*NumericValue) GTE

func (nv *NumericValue) GTE(v Value) (bool, error)

func (*NumericValue) Interface

func (nv *NumericValue) Interface() interface{}

func (*NumericValue) LT

func (nv *NumericValue) LT(v Value) (bool, error)

func (*NumericValue) LTE

func (nv *NumericValue) LTE(v Value) (bool, error)

func (*NumericValue) Mul

func (nv *NumericValue) Mul(v Value) (Value, error)

func (*NumericValue) Sub

func (nv *NumericValue) Sub(v Value) (Value, error)

func (*NumericValue) ToArray

func (nv *NumericValue) ToArray() (*ArrayValue, error)

func (*NumericValue) ToBool

func (nv *NumericValue) ToBool() (bool, error)

func (*NumericValue) ToBytes

func (nv *NumericValue) ToBytes() ([]byte, error)

func (*NumericValue) ToFloat64

func (nv *NumericValue) ToFloat64() (float64, error)

func (*NumericValue) ToInt64

func (nv *NumericValue) ToInt64() (int64, error)

func (*NumericValue) ToJSON

func (nv *NumericValue) ToJSON() (string, error)

func (*NumericValue) ToRat

func (nv *NumericValue) ToRat() (*big.Rat, error)

func (*NumericValue) ToString

func (nv *NumericValue) ToString() (string, error)

func (*NumericValue) ToStruct

func (nv *NumericValue) ToStruct() (*StructValue, error)

func (*NumericValue) ToTime

func (nv *NumericValue) ToTime() (time.Time, error)

type ObjectUnitNode

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

func (*ObjectUnitNode) FormatSQL

func (n *ObjectUnitNode) FormatSQL(ctx context.Context) (string, error)

type OptionNode

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

func (*OptionNode) FormatSQL

func (n *OptionNode) FormatSQL(ctx context.Context) (string, error)

type OrderByItemNode

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

func (*OrderByItemNode) FormatSQL

func (n *OrderByItemNode) FormatSQL(ctx context.Context) (string, error)

type OrderByScanNode

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

func (*OrderByScanNode) FormatSQL

func (n *OrderByScanNode) FormatSQL(ctx context.Context) (string, error)

type OrderedValue

type OrderedValue struct {
	OrderBy []*AggregateOrderBy
	Value   Value
}

type OutputColumnNode

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

func (*OutputColumnNode) FormatSQL

func (n *OutputColumnNode) FormatSQL(ctx context.Context) (string, error)

type ParameterNode

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

func (*ParameterNode) FormatSQL

func (n *ParameterNode) FormatSQL(ctx context.Context) (string, error)

type PartitionedValue

type PartitionedValue struct {
	Partition string
	Value     *WindowOrderedValue
}

type PivotColumnNode

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

func (*PivotColumnNode) FormatSQL

func (n *PivotColumnNode) FormatSQL(ctx context.Context) (string, error)

type PivotScanNode

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

func (*PivotScanNode) FormatSQL

func (n *PivotScanNode) FormatSQL(ctx context.Context) (string, error)

type PrimaryKeyNode

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

func (*PrimaryKeyNode) FormatSQL

func (n *PrimaryKeyNode) FormatSQL(ctx context.Context) (string, error)

type PrivilegeNode

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

func (*PrivilegeNode) FormatSQL

func (n *PrivilegeNode) FormatSQL(ctx context.Context) (string, error)

type ProjectScanNode

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

func (*ProjectScanNode) FormatSQL

func (n *ProjectScanNode) FormatSQL(ctx context.Context) (string, error)

type QueryStmt

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

func (*QueryStmt) CheckNamedValue

func (s *QueryStmt) CheckNamedValue(value *driver.NamedValue) error

func (*QueryStmt) Close

func (s *QueryStmt) Close() error

func (*QueryStmt) Exec

func (s *QueryStmt) Exec(args []driver.Value) (driver.Result, error)

func (*QueryStmt) ExecContext

func (s *QueryStmt) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*QueryStmt) NumInput

func (s *QueryStmt) NumInput() int

func (*QueryStmt) OutputColumns

func (s *QueryStmt) OutputColumns() []*ColumnSpec

func (*QueryStmt) Query

func (s *QueryStmt) Query(args []driver.Value) (driver.Rows, error)

func (*QueryStmt) QueryContext

func (s *QueryStmt) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type QueryStmtAction

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

func (*QueryStmtAction) Args

func (a *QueryStmtAction) Args() []interface{}

func (*QueryStmtAction) Cleanup

func (a *QueryStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*QueryStmtAction) ExecContext

func (a *QueryStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*QueryStmtAction) ExplainQueryPlan

func (a *QueryStmtAction) ExplainQueryPlan(ctx context.Context, conn *Conn) error

func (*QueryStmtAction) Prepare

func (a *QueryStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*QueryStmtAction) QueryContext

func (a *QueryStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type QueryStmtNode

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

func (*QueryStmtNode) FormatSQL

func (n *QueryStmtNode) FormatSQL(ctx context.Context) (string, error)

type RecursiveRefScanNode

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

func (*RecursiveRefScanNode) FormatSQL

func (n *RecursiveRefScanNode) FormatSQL(ctx context.Context) (string, error)

type RecursiveScanNode

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

func (*RecursiveScanNode) FormatSQL

func (n *RecursiveScanNode) FormatSQL(ctx context.Context) (string, error)

type RelationArgumentScanNode

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

func (*RelationArgumentScanNode) FormatSQL

func (n *RelationArgumentScanNode) FormatSQL(ctx context.Context) (string, error)

type RemoveFromRestricteeListActionNode

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

func (*RemoveFromRestricteeListActionNode) FormatSQL

type RenameColumnActionNode

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

func (*RenameColumnActionNode) FormatSQL

func (n *RenameColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type RenameStmtNode

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

func (*RenameStmtNode) FormatSQL

func (n *RenameStmtNode) FormatSQL(ctx context.Context) (string, error)

type RenameToActionNode

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

func (*RenameToActionNode) FormatSQL

func (n *RenameToActionNode) FormatSQL(ctx context.Context) (string, error)

type ReplaceFieldItemNode

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

func (*ReplaceFieldItemNode) FormatSQL

func (n *ReplaceFieldItemNode) FormatSQL(ctx context.Context) (string, error)

type ReplaceFieldNode

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

func (*ReplaceFieldNode) FormatSQL

func (n *ReplaceFieldNode) FormatSQL(ctx context.Context) (string, error)

type RestrictToActionNode

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

func (*RestrictToActionNode) FormatSQL

func (n *RestrictToActionNode) FormatSQL(ctx context.Context) (string, error)

type Result

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

func (*Result) ChangedCatalog

func (r *Result) ChangedCatalog() *ChangedCatalog

func (*Result) LastInsertId

func (r *Result) LastInsertId() (int64, error)

func (*Result) RowsAffected

func (r *Result) RowsAffected() (int64, error)

type ReturningClauseNode

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

func (*ReturningClauseNode) FormatSQL

func (n *ReturningClauseNode) FormatSQL(ctx context.Context) (string, error)

type RevokeFromActionNode

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

func (*RevokeFromActionNode) FormatSQL

func (n *RevokeFromActionNode) FormatSQL(ctx context.Context) (string, error)

type RevokeStmtNode

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

func (*RevokeStmtNode) FormatSQL

func (n *RevokeStmtNode) FormatSQL(ctx context.Context) (string, error)

type RollbackStmtNode

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

func (*RollbackStmtNode) FormatSQL

func (n *RollbackStmtNode) FormatSQL(ctx context.Context) (string, error)

type Rows

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

func (*Rows) ChangedCatalog

func (r *Rows) ChangedCatalog() *ChangedCatalog

func (*Rows) Close

func (r *Rows) Close() (e error)

func (*Rows) ColumnTypeDatabaseTypeName

func (r *Rows) ColumnTypeDatabaseTypeName(i int) string

func (*Rows) Columns

func (r *Rows) Columns() []string

func (*Rows) Next

func (r *Rows) Next(dest []driver.Value) error

func (*Rows) SetActions

func (r *Rows) SetActions(actions []StmtAction)

type RunBatchStmtNode

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

func (*RunBatchStmtNode) FormatSQL

func (n *RunBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type SQLiteFunction

type SQLiteFunction func(...interface{}) (interface{}, error)

type STDDEV

type STDDEV = STDDEV_SAMP

type STDDEV_POP

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

func (*STDDEV_POP) Done

func (f *STDDEV_POP) Done() (Value, error)

func (*STDDEV_POP) Step

func (f *STDDEV_POP) Step(v Value, opt *AggregatorOption) error

type STDDEV_SAMP

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

func (*STDDEV_SAMP) Done

func (f *STDDEV_SAMP) Done() (Value, error)

func (*STDDEV_SAMP) Step

func (f *STDDEV_SAMP) Step(v Value, opt *AggregatorOption) error

type STRING_AGG

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

func (*STRING_AGG) Done

func (f *STRING_AGG) Done() (Value, error)

func (*STRING_AGG) Step

func (f *STRING_AGG) Step(v Value, delim string, opt *AggregatorOption) error

type SUM

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

func (*SUM) Done

func (f *SUM) Done() (Value, error)

func (*SUM) Step

func (f *SUM) Step(v Value, opt *AggregatorOption) error

type SafeValue

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

func (*SafeValue) Add

func (v *SafeValue) Add(arg Value) (Value, error)

func (*SafeValue) Div

func (v *SafeValue) Div(arg Value) (Value, error)

func (*SafeValue) EQ

func (v *SafeValue) EQ(arg Value) (bool, error)

func (*SafeValue) Format

func (v *SafeValue) Format(verb rune) string

func (*SafeValue) GT

func (v *SafeValue) GT(arg Value) (bool, error)

func (*SafeValue) GTE

func (v *SafeValue) GTE(arg Value) (bool, error)

func (*SafeValue) Interface

func (v *SafeValue) Interface() interface{}

func (*SafeValue) LT

func (v *SafeValue) LT(arg Value) (bool, error)

func (*SafeValue) LTE

func (v *SafeValue) LTE(arg Value) (bool, error)

func (*SafeValue) Mul

func (v *SafeValue) Mul(arg Value) (Value, error)

func (*SafeValue) Sub

func (v *SafeValue) Sub(arg Value) (Value, error)

func (*SafeValue) ToArray

func (v *SafeValue) ToArray() (*ArrayValue, error)

func (*SafeValue) ToBool

func (v *SafeValue) ToBool() (bool, error)

func (*SafeValue) ToBytes

func (v *SafeValue) ToBytes() ([]byte, error)

func (*SafeValue) ToFloat64

func (v *SafeValue) ToFloat64() (float64, error)

func (*SafeValue) ToInt64

func (v *SafeValue) ToInt64() (int64, error)

func (*SafeValue) ToJSON

func (v *SafeValue) ToJSON() (string, error)

func (*SafeValue) ToRat

func (v *SafeValue) ToRat() (*big.Rat, error)

func (*SafeValue) ToString

func (v *SafeValue) ToString() (string, error)

func (*SafeValue) ToStruct

func (v *SafeValue) ToStruct() (*StructValue, error)

func (*SafeValue) ToTime

func (v *SafeValue) ToTime() (time.Time, error)

type SampleScanNode

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

func (*SampleScanNode) FormatSQL

func (n *SampleScanNode) FormatSQL(ctx context.Context) (string, error)

type SetAsActionNode

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

func (*SetAsActionNode) FormatSQL

func (n *SetAsActionNode) FormatSQL(ctx context.Context) (string, error)

type SetCollateClauseNode

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

func (*SetCollateClauseNode) FormatSQL

func (n *SetCollateClauseNode) FormatSQL(ctx context.Context) (string, error)

type SetOperationItemNode

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

func (*SetOperationItemNode) FormatSQL

func (n *SetOperationItemNode) FormatSQL(ctx context.Context) (string, error)

type SetOperationScanNode

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

func (*SetOperationScanNode) FormatSQL

func (n *SetOperationScanNode) FormatSQL(ctx context.Context) (string, error)

type SetOptionsActionNode

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

func (*SetOptionsActionNode) FormatSQL

func (n *SetOptionsActionNode) FormatSQL(ctx context.Context) (string, error)

type SetTransactionStmtNode

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

func (*SetTransactionStmtNode) FormatSQL

func (n *SetTransactionStmtNode) FormatSQL(ctx context.Context) (string, error)

type ShowStmtNode

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

func (*ShowStmtNode) FormatSQL

func (n *ShowStmtNode) FormatSQL(ctx context.Context) (string, error)

type SingleRowScanNode

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

func (*SingleRowScanNode) FormatSQL

func (n *SingleRowScanNode) FormatSQL(ctx context.Context) (string, error)

type StartBatchStmtNode

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

func (*StartBatchStmtNode) FormatSQL

func (n *StartBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type StmtAction

type StmtAction interface {
	Prepare(context.Context, *Conn) (driver.Stmt, error)
	ExecContext(context.Context, *Conn) (driver.Result, error)
	QueryContext(context.Context, *Conn) (*Rows, error)
	Cleanup(context.Context, *Conn) error
	Args() []interface{}
}

type StmtActionFunc

type StmtActionFunc func() (StmtAction, error)

type StringValue

type StringValue string

func (StringValue) Add

func (sv StringValue) Add(v Value) (Value, error)

func (StringValue) Div

func (sv StringValue) Div(v Value) (Value, error)

func (StringValue) EQ

func (sv StringValue) EQ(v Value) (bool, error)

func (StringValue) Format

func (sv StringValue) Format(verb rune) string

func (StringValue) GT

func (sv StringValue) GT(v Value) (bool, error)

func (StringValue) GTE

func (sv StringValue) GTE(v Value) (bool, error)

func (StringValue) Interface

func (sv StringValue) Interface() interface{}

func (StringValue) LT

func (sv StringValue) LT(v Value) (bool, error)

func (StringValue) LTE

func (sv StringValue) LTE(v Value) (bool, error)

func (StringValue) Mul

func (sv StringValue) Mul(v Value) (Value, error)

func (StringValue) Sub

func (sv StringValue) Sub(v Value) (Value, error)

func (StringValue) ToArray

func (sv StringValue) ToArray() (*ArrayValue, error)

func (StringValue) ToBool

func (sv StringValue) ToBool() (bool, error)

func (StringValue) ToBytes

func (sv StringValue) ToBytes() ([]byte, error)

func (StringValue) ToFloat64

func (sv StringValue) ToFloat64() (float64, error)

func (StringValue) ToInt64

func (sv StringValue) ToInt64() (int64, error)

func (StringValue) ToJSON

func (sv StringValue) ToJSON() (string, error)

func (StringValue) ToRat

func (sv StringValue) ToRat() (*big.Rat, error)

func (StringValue) ToString

func (sv StringValue) ToString() (string, error)

func (StringValue) ToStruct

func (sv StringValue) ToStruct() (*StructValue, error)

func (StringValue) ToTime

func (sv StringValue) ToTime() (time.Time, error)

type StructValue

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

func (*StructValue) Add

func (sv *StructValue) Add(v Value) (Value, error)

func (*StructValue) Div

func (sv *StructValue) Div(v Value) (Value, error)

func (*StructValue) EQ

func (sv *StructValue) EQ(v Value) (bool, error)

func (*StructValue) Format

func (sv *StructValue) Format(verb rune) string

func (*StructValue) GT

func (sv *StructValue) GT(v Value) (bool, error)

func (*StructValue) GTE

func (sv *StructValue) GTE(v Value) (bool, error)

func (*StructValue) Interface

func (sv *StructValue) Interface() interface{}

func (*StructValue) LT

func (sv *StructValue) LT(v Value) (bool, error)

func (*StructValue) LTE

func (sv *StructValue) LTE(v Value) (bool, error)

func (*StructValue) Mul

func (sv *StructValue) Mul(v Value) (Value, error)

func (*StructValue) Sub

func (sv *StructValue) Sub(v Value) (Value, error)

func (*StructValue) ToArray

func (sv *StructValue) ToArray() (*ArrayValue, error)

func (*StructValue) ToBool

func (sv *StructValue) ToBool() (bool, error)

func (*StructValue) ToBytes

func (sv *StructValue) ToBytes() ([]byte, error)

func (*StructValue) ToFloat64

func (sv *StructValue) ToFloat64() (float64, error)

func (*StructValue) ToInt64

func (sv *StructValue) ToInt64() (int64, error)

func (*StructValue) ToJSON

func (sv *StructValue) ToJSON() (string, error)

func (*StructValue) ToRat

func (sv *StructValue) ToRat() (*big.Rat, error)

func (*StructValue) ToString

func (sv *StructValue) ToString() (string, error)

func (*StructValue) ToStruct

func (sv *StructValue) ToStruct() (*StructValue, error)

func (*StructValue) ToTime

func (sv *StructValue) ToTime() (time.Time, error)

type StructValueLayout

type StructValueLayout struct {
	Keys   []string      `json:"keys"`
	Values []interface{} `json:"values"`
}

type SubqueryExprNode

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

func (*SubqueryExprNode) FormatSQL

func (n *SubqueryExprNode) FormatSQL(ctx context.Context) (string, error)

type SystemVariableNode

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

func (*SystemVariableNode) FormatSQL

func (n *SystemVariableNode) FormatSQL(ctx context.Context) (string, error)

type TVFScanNode

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

func (*TVFScanNode) FormatSQL

func (n *TVFScanNode) FormatSQL(ctx context.Context) (string, error)

type TableAndColumnInfoNode

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

func (*TableAndColumnInfoNode) FormatSQL

func (n *TableAndColumnInfoNode) FormatSQL(ctx context.Context) (string, error)

type TableScanNode

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

func (*TableScanNode) FormatSQL

func (n *TableScanNode) FormatSQL(ctx context.Context) (string, error)

type TableSpec

type TableSpec struct {
	IsTemp     bool           `json:"isTemp"`
	IsView     bool           `json:"isView"`
	NamePath   []string       `json:"namePath"`
	Columns    []*ColumnSpec  `json:"columns"`
	PrimaryKey []string       `json:"primaryKey"`
	CreateMode ast.CreateMode `json:"createMode"`
	Query      string         `json:"query"`
	UpdatedAt  time.Time      `json:"updatedAt"`
	CreatedAt  time.Time      `json:"createdAt"`
}

func (*TableSpec) Column

func (s *TableSpec) Column(name string) *ColumnSpec

func (*TableSpec) SQLiteSchema

func (s *TableSpec) SQLiteSchema() string

func (*TableSpec) TableName

func (s *TableSpec) TableName() string

type TimeFormatType

type TimeFormatType int
const (
	FormatTypeDate      TimeFormatType = 0
	FormatTypeDatetime  TimeFormatType = 1
	FormatTypeTime      TimeFormatType = 2
	FormatTypeTimestamp TimeFormatType = 3
)

func (TimeFormatType) String

func (t TimeFormatType) String() string

type TimeValue

type TimeValue time.Time

func (TimeValue) Add

func (t TimeValue) Add(v Value) (Value, error)

func (TimeValue) Div

func (t TimeValue) Div(v Value) (Value, error)

func (TimeValue) EQ

func (t TimeValue) EQ(v Value) (bool, error)

func (TimeValue) Format

func (t TimeValue) Format(verb rune) string

func (TimeValue) GT

func (t TimeValue) GT(v Value) (bool, error)

func (TimeValue) GTE

func (t TimeValue) GTE(v Value) (bool, error)

func (TimeValue) Interface

func (t TimeValue) Interface() interface{}

func (TimeValue) LT

func (t TimeValue) LT(v Value) (bool, error)

func (TimeValue) LTE

func (t TimeValue) LTE(v Value) (bool, error)

func (TimeValue) Mul

func (t TimeValue) Mul(v Value) (Value, error)

func (TimeValue) Sub

func (t TimeValue) Sub(v Value) (Value, error)

func (TimeValue) ToArray

func (t TimeValue) ToArray() (*ArrayValue, error)

func (TimeValue) ToBool

func (t TimeValue) ToBool() (bool, error)

func (TimeValue) ToBytes

func (t TimeValue) ToBytes() ([]byte, error)

func (TimeValue) ToFloat64

func (t TimeValue) ToFloat64() (float64, error)

func (TimeValue) ToInt64

func (t TimeValue) ToInt64() (int64, error)

func (TimeValue) ToJSON

func (t TimeValue) ToJSON() (string, error)

func (TimeValue) ToRat

func (t TimeValue) ToRat() (*big.Rat, error)

func (TimeValue) ToString

func (t TimeValue) ToString() (string, error)

func (TimeValue) ToStruct

func (t TimeValue) ToStruct() (*StructValue, error)

func (TimeValue) ToTime

func (t TimeValue) ToTime() (time.Time, error)

type TimestampValue

type TimestampValue time.Time

func (TimestampValue) Add

func (t TimestampValue) Add(v Value) (Value, error)

func (TimestampValue) AddValueWithPart

func (t TimestampValue) AddValueWithPart(v time.Duration, part string) (Value, error)

func (TimestampValue) Div

func (t TimestampValue) Div(v Value) (Value, error)

func (TimestampValue) EQ

func (t TimestampValue) EQ(v Value) (bool, error)

func (TimestampValue) Format

func (d TimestampValue) Format(verb rune) string

func (TimestampValue) GT

func (t TimestampValue) GT(v Value) (bool, error)

func (TimestampValue) GTE

func (t TimestampValue) GTE(v Value) (bool, error)

func (TimestampValue) Interface

func (d TimestampValue) Interface() interface{}

func (TimestampValue) LT

func (t TimestampValue) LT(v Value) (bool, error)

func (TimestampValue) LTE

func (t TimestampValue) LTE(v Value) (bool, error)

func (TimestampValue) Mul

func (t TimestampValue) Mul(v Value) (Value, error)

func (TimestampValue) Sub

func (t TimestampValue) Sub(v Value) (Value, error)

func (TimestampValue) ToArray

func (t TimestampValue) ToArray() (*ArrayValue, error)

func (TimestampValue) ToBool

func (t TimestampValue) ToBool() (bool, error)

func (TimestampValue) ToBytes

func (t TimestampValue) ToBytes() ([]byte, error)

func (TimestampValue) ToFloat64

func (t TimestampValue) ToFloat64() (float64, error)

func (TimestampValue) ToInt64

func (t TimestampValue) ToInt64() (int64, error)

func (TimestampValue) ToJSON

func (t TimestampValue) ToJSON() (string, error)

func (TimestampValue) ToRat

func (t TimestampValue) ToRat() (*big.Rat, error)

func (TimestampValue) ToString

func (t TimestampValue) ToString() (string, error)

func (TimestampValue) ToStruct

func (t TimestampValue) ToStruct() (*StructValue, error)

func (TimestampValue) ToTime

func (t TimestampValue) ToTime() (time.Time, error)

type TruncateStmtAction

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

func (*TruncateStmtAction) Args

func (a *TruncateStmtAction) Args() []interface{}

func (*TruncateStmtAction) Cleanup

func (a *TruncateStmtAction) Cleanup(ctx context.Context, conn *Conn) error

func (*TruncateStmtAction) ExecContext

func (a *TruncateStmtAction) ExecContext(ctx context.Context, conn *Conn) (driver.Result, error)

func (*TruncateStmtAction) Prepare

func (a *TruncateStmtAction) Prepare(ctx context.Context, conn *Conn) (driver.Stmt, error)

func (*TruncateStmtAction) QueryContext

func (a *TruncateStmtAction) QueryContext(ctx context.Context, conn *Conn) (*Rows, error)

type TruncateStmtNode

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

func (*TruncateStmtNode) FormatSQL

func (n *TruncateStmtNode) FormatSQL(ctx context.Context) (string, error)

type Type

type Type struct {
	Name          string                      `json:"name"`
	Kind          int                         `json:"kind"`
	SignatureKind types.SignatureArgumentKind `json:"signatureKind"`
	ElementType   *Type                       `json:"elementType"`
	FieldTypes    []*NameWithType             `json:"fieldTypes"`
}

func (*Type) AvailableAutoIndex

func (t *Type) AvailableAutoIndex() bool

func (*Type) FormatType

func (t *Type) FormatType() string

func (*Type) FunctionArgumentType

func (t *Type) FunctionArgumentType() (*types.FunctionArgumentType, error)

func (*Type) GoReflectType

func (t *Type) GoReflectType() (reflect.Type, error)

func (*Type) IsArray

func (t *Type) IsArray() bool

func (*Type) IsStruct

func (t *Type) IsStruct() bool

func (*Type) ToZetaSQLType

func (t *Type) ToZetaSQLType() (types.Type, error)

type UnnestItemNode

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

func (*UnnestItemNode) FormatSQL

func (n *UnnestItemNode) FormatSQL(ctx context.Context) (string, error)

type UnpivotArgNode

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

func (*UnpivotArgNode) FormatSQL

func (n *UnpivotArgNode) FormatSQL(ctx context.Context) (string, error)

type UnpivotScanNode

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

func (*UnpivotScanNode) FormatSQL

func (n *UnpivotScanNode) FormatSQL(ctx context.Context) (string, error)

type UpdateArrayItemNode

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

func (*UpdateArrayItemNode) FormatSQL

func (n *UpdateArrayItemNode) FormatSQL(ctx context.Context) (string, error)

type UpdateItemNode

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

func (*UpdateItemNode) FormatSQL

func (n *UpdateItemNode) FormatSQL(ctx context.Context) (string, error)

type UpdateStmtNode

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

func (*UpdateStmtNode) FormatSQL

func (n *UpdateStmtNode) FormatSQL(ctx context.Context) (string, error)

type VARIANCE

type VARIANCE = VAR_SAMP

type VAR_POP

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

func (*VAR_POP) Done

func (f *VAR_POP) Done() (Value, error)

func (*VAR_POP) Step

func (f *VAR_POP) Step(v Value, opt *AggregatorOption) error

type VAR_SAMP

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

func (*VAR_SAMP) Done

func (f *VAR_SAMP) Done() (Value, error)

func (*VAR_SAMP) Step

func (f *VAR_SAMP) Step(v Value, opt *AggregatorOption) error

type Value

type Value interface {
	Add(Value) (Value, error)
	Sub(Value) (Value, error)
	Mul(Value) (Value, error)
	Div(Value) (Value, error)
	EQ(Value) (bool, error)
	GT(Value) (bool, error)
	GTE(Value) (bool, error)
	LT(Value) (bool, error)
	LTE(Value) (bool, error)
	ToInt64() (int64, error)
	ToString() (string, error)
	ToBytes() ([]byte, error)
	ToFloat64() (float64, error)
	ToBool() (bool, error)
	ToArray() (*ArrayValue, error)
	ToStruct() (*StructValue, error)
	ToJSON() (string, error)
	ToTime() (time.Time, error)
	ToRat() (*big.Rat, error)
	Format(verb rune) string
	Interface() interface{}
}

func ABS

func ABS(a Value) (Value, error)

func ACOS

func ACOS(x Value) (Value, error)

func ACOSH

func ACOSH(x Value) (Value, error)

func ADD

func ADD(a, b Value) (Value, error)

func AND

func AND(args ...Value) (Value, error)

func ARRAY_CONCAT

func ARRAY_CONCAT(args ...Value) (Value, error)

func ARRAY_IN

func ARRAY_IN(a, b Value) (Value, error)

func ARRAY_LENGTH

func ARRAY_LENGTH(v *ArrayValue) (Value, error)

func ARRAY_OFFSET

func ARRAY_OFFSET(v Value, idx int) (Value, error)

func ARRAY_ORDINAL

func ARRAY_ORDINAL(v Value, idx int) (Value, error)

func ARRAY_REVERSE

func ARRAY_REVERSE(v *ArrayValue) (Value, error)

func ARRAY_SAFE_OFFSET

func ARRAY_SAFE_OFFSET(v Value, idx int) (Value, error)

func ARRAY_SAFE_ORDINAL

func ARRAY_SAFE_ORDINAL(v Value, idx int) (Value, error)

func ARRAY_TO_STRING

func ARRAY_TO_STRING(arr *ArrayValue, delim string, nullText ...string) (Value, error)

func ASCII

func ASCII(v string) (Value, error)

func ASIN

func ASIN(x Value) (Value, error)

func ASINH

func ASINH(x Value) (Value, error)

func ATAN

func ATAN(x Value) (Value, error)

func ATAN2

func ATAN2(x, y Value) (Value, error)

func ATANH

func ATANH(x Value) (Value, error)

func BETWEEN

func BETWEEN(target, start, end Value) (Value, error)

func BIT_AND

func BIT_AND(a, b Value) (Value, error)

func BIT_COUNT

func BIT_COUNT(v Value) (Value, error)

func BIT_LEFT_SHIFT

func BIT_LEFT_SHIFT(a, b Value) (Value, error)

func BIT_NOT

func BIT_NOT(a Value) (Value, error)

func BIT_OR

func BIT_OR(a, b Value) (Value, error)

func BIT_RIGHT_SHIFT

func BIT_RIGHT_SHIFT(a, b Value) (Value, error)

func BIT_XOR

func BIT_XOR(a, b Value) (Value, error)

func BYTE_LENGTH

func BYTE_LENGTH(v []byte) (Value, error)

func CAST

func CAST(expr Value, fromType, toType *Type, isSafeCast bool) (Value, error)

func CEIL

func CEIL(x Value) (Value, error)

func CHAR_LENGTH

func CHAR_LENGTH(v []byte) (Value, error)

func CHR

func CHR(v int64) (Value, error)

func COALESCE

func COALESCE(args ...Value) (Value, error)

func CODE_POINTS_TO_BYTES

func CODE_POINTS_TO_BYTES(v *ArrayValue) (Value, error)

func CODE_POINTS_TO_STRING

func CODE_POINTS_TO_STRING(v *ArrayValue) (Value, error)

func COLLATE

func COLLATE(v, spec string) (Value, error)

func CONCAT

func CONCAT(args ...Value) (Value, error)

func CONTAINS_SUBSTR

func CONTAINS_SUBSTR(exprValue Value, search string) (Value, error)

func COS

func COS(x Value) (Value, error)

func COSH

func COSH(x Value) (Value, error)

func CURRENT_DATE

func CURRENT_DATE(zone string) (Value, error)

func CURRENT_DATETIME

func CURRENT_DATETIME(zone string) (Value, error)

func CURRENT_DATETIME_WITH_TIME

func CURRENT_DATETIME_WITH_TIME(v time.Time) (Value, error)

func CURRENT_DATE_WITH_TIME

func CURRENT_DATE_WITH_TIME(v time.Time) (Value, error)

func CURRENT_TIME

func CURRENT_TIME(zone string) (Value, error)

func CURRENT_TIMESTAMP

func CURRENT_TIMESTAMP(zone string) (Value, error)

func CURRENT_TIMESTAMP_WITH_TIME

func CURRENT_TIMESTAMP_WITH_TIME(v time.Time) (Value, error)

func CURRENT_TIME_WITH_TIME

func CURRENT_TIME_WITH_TIME(v time.Time) (Value, error)

func CastValue

func CastValue(t types.Type, v Value) (Value, error)

func DATE

func DATE(args ...Value) (Value, error)

func DATETIME

func DATETIME(args ...Value) (Value, error)

func DATETIME_ADD

func DATETIME_ADD(t time.Time, v int64, part string) (Value, error)

func DATETIME_DIFF

func DATETIME_DIFF(a, b time.Time, part string) (Value, error)

func DATETIME_SUB

func DATETIME_SUB(t time.Time, v int64, part string) (Value, error)

func DATETIME_TRUNC

func DATETIME_TRUNC(t time.Time, part string) (Value, error)

func DATE_ADD

func DATE_ADD(t time.Time, v int64, part string) (Value, error)

func DATE_DIFF

func DATE_DIFF(a, b time.Time, part string) (Value, error)

func DATE_FROM_UNIX_DATE

func DATE_FROM_UNIX_DATE(unixdate int64) (Value, error)

func DATE_SUB

func DATE_SUB(t time.Time, v int64, part string) (Value, error)

func DATE_TRUNC

func DATE_TRUNC(t time.Time, part string) (Value, error)

func DISTINCT

func DISTINCT() (Value, error)

func DIV

func DIV(x, y Value) (Value, error)

func DecodeValue

func DecodeValue(v interface{}) (Value, error)

func ENDS_WITH

func ENDS_WITH(value, ends Value) (Value, error)

func EQ

func EQ(a, b Value) (Value, error)

func EVAL_JAVASCRIPT

func EVAL_JAVASCRIPT(code string, retType *Type, argNames []string, args []Value) (Value, error)

func EXP

func EXP(x Value) (Value, error)

func EXTRACT

func EXTRACT(v Value, part, zone string) (Value, error)

func FARM_FINGERPRINT

func FARM_FINGERPRINT(v []byte) (Value, error)

func FLOOR

func FLOOR(x Value) (Value, error)

func FORMAT

func FORMAT(format string, args ...Value) (Value, error)

func FORMAT_DATE

func FORMAT_DATE(format string, t time.Time) (Value, error)

func FORMAT_DATETIME

func FORMAT_DATETIME(format string, t time.Time) (Value, error)

func FORMAT_TIME

func FORMAT_TIME(format string, t time.Time) (Value, error)

func FORMAT_TIMESTAMP

func FORMAT_TIMESTAMP(format string, t time.Time, zone string) (Value, error)

func FROM_BASE32

func FROM_BASE32(v string) (Value, error)

func FROM_BASE64

func FROM_BASE64(v string) (Value, error)

func FROM_HEX

func FROM_HEX(v string) (Value, error)

func GENERATE_ARRAY

func GENERATE_ARRAY(start, end Value, step ...Value) (Value, error)

func GENERATE_DATE_ARRAY

func GENERATE_DATE_ARRAY(start, end Value, step ...Value) (Value, error)

func GENERATE_TIMESTAMP_ARRAY

func GENERATE_TIMESTAMP_ARRAY(start, end Value, step int64, part string) (Value, error)

func GENERATE_UUID

func GENERATE_UUID() (Value, error)

func GREATEST

func GREATEST(args ...Value) (Value, error)

func GT

func GT(a, b Value) (Value, error)

func GTE

func GTE(a, b Value) (Value, error)

func HLL_COUNT_EXTRACT

func HLL_COUNT_EXTRACT(sketch []byte) (Value, error)

func IEEE_DIVIDE

func IEEE_DIVIDE(x, y Value) (Value, error)

func IF

func IF(cond, trueV, falseV Value) (Value, error)

func IFNULL

func IFNULL(expr, nullResult Value) (Value, error)

func IGNORE_NULLS

func IGNORE_NULLS() (Value, error)

func IN

func IN(a Value, values ...Value) (Value, error)

func INITCAP

func INITCAP(value string, delimiters []rune) (Value, error)

func INSTR

func INSTR(source, search Value, position, occurrence int64) (Value, error)

func INTERVAL

func INTERVAL(value int64, part string) (Value, error)

func IS_DISTINCT_FROM

func IS_DISTINCT_FROM(a, b Value) (Value, error)

func IS_FALSE

func IS_FALSE(a Value) (Value, error)

func IS_INF

func IS_INF(a Value) (Value, error)

func IS_NAN

func IS_NAN(a Value) (Value, error)

func IS_NOT_DISTINCT_FROM

func IS_NOT_DISTINCT_FROM(a, b Value) (Value, error)

func IS_NULL

func IS_NULL(a Value) (Value, error)

func IS_TRUE

func IS_TRUE(a Value) (Value, error)

func JSON_EXTRACT

func JSON_EXTRACT(v, path string) (Value, error)

func JSON_EXTRACT_ARRAY

func JSON_EXTRACT_ARRAY(v, path string) (Value, error)

func JSON_EXTRACT_SCALAR

func JSON_EXTRACT_SCALAR(v, path string) (Value, error)

func JSON_EXTRACT_STRING_ARRAY

func JSON_EXTRACT_STRING_ARRAY(v, path string) (Value, error)

func JSON_FIELD

func JSON_FIELD(v, fieldName string) (Value, error)

func JSON_QUERY

func JSON_QUERY(v, path string) (Value, error)

func JSON_QUERY_ARRAY

func JSON_QUERY_ARRAY(v, path string) (Value, error)

func JSON_SUBSCRIPT

func JSON_SUBSCRIPT(v string, field Value) (Value, error)

func JSON_TYPE

func JSON_TYPE(v JsonValue) (Value, error)

func JSON_VALUE

func JSON_VALUE(v, path string) (Value, error)

func JSON_VALUE_ARRAY

func JSON_VALUE_ARRAY(v, path string) (Value, error)

func JUSTIFY_DAYS

func JUSTIFY_DAYS(v *IntervalValue) (Value, error)

func JUSTIFY_HOURS

func JUSTIFY_HOURS(v *IntervalValue) (Value, error)

func JUSTIFY_INTERVAL

func JUSTIFY_INTERVAL(v *IntervalValue) (Value, error)

func LAST_DAY

func LAST_DAY(t time.Time, part string) (Value, error)

func LEAST

func LEAST(args ...Value) (Value, error)

func LEFT

func LEFT(v Value, length int64) (Value, error)

func LENGTH

func LENGTH(v Value) (Value, error)

func LIKE

func LIKE(a, b Value) (Value, error)

func LIMIT

func LIMIT(limit int64) (Value, error)

func LN

func LN(x Value) (Value, error)

func LOG

func LOG(x, y Value) (Value, error)

func LOG10

func LOG10(x Value) (Value, error)

func LOWER

func LOWER(v Value) (Value, error)

func LPAD

func LPAD(originalValue Value, returnLength int64, pattern Value) (Value, error)

func LT

func LT(a, b Value) (Value, error)

func LTE

func LTE(a, b Value) (Value, error)

func LTRIM

func LTRIM(v Value, cutset string) (Value, error)

func MAKE_ARRAY

func MAKE_ARRAY(args ...Value) (Value, error)

func MAKE_INTERVAL

func MAKE_INTERVAL(year, month, day, hour, minute, second int64) (Value, error)

func MAKE_STRUCT

func MAKE_STRUCT(args ...Value) (Value, error)

func MD5

func MD5(v []byte) (Value, error)

func MOD

func MOD(x, y Value) (Value, error)

func MUL

func MUL(a, b Value) (Value, error)

func NET_HOST

func NET_HOST(v string) (Value, error)

func NET_IPV4_FROM_INT64

func NET_IPV4_FROM_INT64(v int64) (Value, error)

func NET_IPV4_TO_INT64

func NET_IPV4_TO_INT64(v []byte) (Value, error)

func NET_IP_FROM_STRING

func NET_IP_FROM_STRING(v string) (Value, error)

func NET_IP_NET_MASK

func NET_IP_NET_MASK(output, prefix int64) (Value, error)

func NET_IP_TO_STRING

func NET_IP_TO_STRING(v []byte) (Value, error)

func NET_IP_TRUNC

func NET_IP_TRUNC(v []byte, length int64) (Value, error)

func NET_PUBLIC_SUFFIX

func NET_PUBLIC_SUFFIX(v string) (Value, error)

func NET_REG_DOMAIN

func NET_REG_DOMAIN(v string) (Value, error)

func NET_SAFE_IP_FROM_STRING

func NET_SAFE_IP_FROM_STRING(v string) (Value, error)

func NORMALIZE

func NORMALIZE(v, mode string) (Value, error)

func NORMALIZE_AND_CASEFOLD

func NORMALIZE_AND_CASEFOLD(v, mode string) (Value, error)

func NOT

func NOT(a Value) (Value, error)

func NOT_EQ

func NOT_EQ(a, b Value) (Value, error)

func NULLIF

func NULLIF(expr, exprToMatch Value) (Value, error)

func OP_DIV

func OP_DIV(a, b Value) (Value, error)

func OR

func OR(args ...Value) (Value, error)

func ORDER_BY

func ORDER_BY(value Value, isAsc bool) (Value, error)

func PARSE_BIGNUMERIC

func PARSE_BIGNUMERIC(numeric string) (Value, error)

func PARSE_DATE

func PARSE_DATE(format, date string) (Value, error)

func PARSE_DATETIME

func PARSE_DATETIME(format, date string) (Value, error)

func PARSE_JSON

func PARSE_JSON(expr, mode string) (Value, error)

func PARSE_NUMERIC

func PARSE_NUMERIC(numeric string) (Value, error)

func PARSE_TIME

func PARSE_TIME(format, date string) (Value, error)

func PARSE_TIMESTAMP

func PARSE_TIMESTAMP(format, date string) (Value, error)

func PARSE_TIMESTAMP_WITH_TIMEZONE

func PARSE_TIMESTAMP_WITH_TIMEZONE(format, date, zone string) (Value, error)

func POW

func POW(x, y Value) (Value, error)

func RAND

func RAND() (Value, error)

func RANGE_BUCKET

func RANGE_BUCKET(point Value, array *ArrayValue) (Value, error)

func REGEXP_CONTAINS

func REGEXP_CONTAINS(value, expr string) (Value, error)

func REGEXP_EXTRACT

func REGEXP_EXTRACT(value Value, expr string, position, occurrence int64) (Value, error)

func REGEXP_EXTRACT_ALL

func REGEXP_EXTRACT_ALL(value Value, expr string) (Value, error)

func REGEXP_INSTR

func REGEXP_INSTR(sourceValue, exprValue Value, position, occurrence, occurrencePos int64) (Value, error)

func REGEXP_REPLACE

func REGEXP_REPLACE(value, exprValue, replacementValue Value) (Value, error)

func REPEAT

func REPEAT(originalValue Value, repetitions int64) (Value, error)

func REPLACE

func REPLACE(originalValue, fromValue, toValue Value) (Value, error)

func REVERSE

func REVERSE(value Value) (Value, error)
func RIGHT(value Value, length int64) (Value, error)

func ROUND

func ROUND(x Value, precision int) (Value, error)

func RPAD

func RPAD(originalValue Value, returnLength int64, pattern Value) (Value, error)

func RTRIM

func RTRIM(value Value, cutset string) (Value, error)

func SAFE_ADD

func SAFE_ADD(x, y Value) (Value, error)

func SAFE_CONVERT_BYTES_TO_STRING

func SAFE_CONVERT_BYTES_TO_STRING(value []byte) (Value, error)

func SAFE_DIVIDE

func SAFE_DIVIDE(x, y Value) (Value, error)

func SAFE_MULTIPLY

func SAFE_MULTIPLY(x, y Value) (Value, error)

func SAFE_NEGATE

func SAFE_NEGATE(x Value) (Value, error)

func SAFE_SUBTRACT

func SAFE_SUBTRACT(x, y Value) (Value, error)

func SESSION_USER

func SESSION_USER() (Value, error)

func SHA1

func SHA1(v []byte) (Value, error)

func SHA256

func SHA256(v []byte) (Value, error)

func SHA512

func SHA512(v []byte) (Value, error)

func SIGN

func SIGN(a Value) (Value, error)

func SIN

func SIN(x Value) (Value, error)

func SINH

func SINH(x Value) (Value, error)

func SOUNDEX

func SOUNDEX(value string) (Value, error)

func SPLIT

func SPLIT(value, delimValue Value) (Value, error)

func SQRT

func SQRT(x Value) (Value, error)

func STARTS_WITH

func STARTS_WITH(value, starts Value) (Value, error)

func STRING

func STRING(t time.Time, zone string) (Value, error)

func STRPOS

func STRPOS(value, search Value) (Value, error)

func STRUCT_FIELD

func STRUCT_FIELD(v Value, idx int) (Value, error)

func SUB

func SUB(a, b Value) (Value, error)

func SUBSTR

func SUBSTR(value Value, pos int64, length *int64) (Value, error)

func TAN

func TAN(x Value) (Value, error)

func TANH

func TANH(x Value) (Value, error)

func TIME

func TIME(args ...Value) (Value, error)

func TIMESTAMP

func TIMESTAMP(v Value, zone string) (Value, error)

func TIMESTAMP_ADD

func TIMESTAMP_ADD(t time.Time, v int64, part string) (Value, error)

func TIMESTAMP_DIFF

func TIMESTAMP_DIFF(a, b time.Time, part string) (Value, error)

func TIMESTAMP_MICROS

func TIMESTAMP_MICROS(sec int64) (Value, error)

func TIMESTAMP_MILLIS

func TIMESTAMP_MILLIS(sec int64) (Value, error)

func TIMESTAMP_SECONDS

func TIMESTAMP_SECONDS(sec int64) (Value, error)

func TIMESTAMP_SUB

func TIMESTAMP_SUB(t time.Time, v int64, part string) (Value, error)

func TIMESTAMP_TRUNC

func TIMESTAMP_TRUNC(t time.Time, part, zone string) (Value, error)

func TIME_ADD

func TIME_ADD(t time.Time, v int64, part string) (Value, error)

func TIME_DIFF

func TIME_DIFF(a, b time.Time, part string) (Value, error)

func TIME_SUB

func TIME_SUB(t time.Time, v int64, part string) (Value, error)

func TIME_TRUNC

func TIME_TRUNC(t time.Time, part string) (Value, error)

func TO_BASE32

func TO_BASE32(v []byte) (Value, error)

func TO_BASE64

func TO_BASE64(v []byte) (Value, error)

func TO_CODE_POINTS

func TO_CODE_POINTS(v Value) (Value, error)

func TO_HEX

func TO_HEX(v []byte) (Value, error)

func TO_JSON

func TO_JSON(v Value, stringifyWideNumbers bool) (Value, error)

func TO_JSON_STRING

func TO_JSON_STRING(v Value, prettyPrint bool) (Value, error)

func TRANSLATE

func TRANSLATE(expr, source, target Value) (Value, error)

func TRIM

func TRIM(v, cutsetV Value) (Value, error)

func TRUNC

func TRUNC(x Value) (Value, error)

func UNICODE

func UNICODE(v string) (Value, error)

func UNIX_DATE

func UNIX_DATE(t time.Time) (Value, error)

func UNIX_MICROS

func UNIX_MICROS(t time.Time) (Value, error)

func UNIX_MILLIS

func UNIX_MILLIS(t time.Time) (Value, error)

func UNIX_SECONDS

func UNIX_SECONDS(t time.Time) (Value, error)

func UPPER

func UPPER(v Value) (Value, error)

func ValueFromGoValue

func ValueFromGoValue(v interface{}) (Value, error)

func ValueFromZetaSQLValue

func ValueFromZetaSQLValue(v types.Value) (Value, error)

func WINDOW_BOUNDARY_END

func WINDOW_BOUNDARY_END(boundaryType, offset int64) (Value, error)

func WINDOW_BOUNDARY_START

func WINDOW_BOUNDARY_START(boundaryType, offset int64) (Value, error)

func WINDOW_FRAME_UNIT

func WINDOW_FRAME_UNIT(frameUnit int64) (Value, error)

func WINDOW_ORDER_BY

func WINDOW_ORDER_BY(value Value, isAsc bool) (Value, error)

func WINDOW_PARTITION

func WINDOW_PARTITION(partition Value) (Value, error)

func WINDOW_ROWID

func WINDOW_ROWID(id int64) (Value, error)

type ValueLayout

type ValueLayout struct {
	Header ValueType `json:"header"`
	Body   string    `json:"body"`
}

type ValueType

type ValueType string
const (
	IntValueType        ValueType = "int64"
	StringValueType     ValueType = "string"
	BytesValueType      ValueType = "bytes"
	FloatValueType      ValueType = "float"
	NumericValueType    ValueType = "numeric"
	BigNumericValueType ValueType = "bignumeric"
	BoolValueType       ValueType = "bool"
	JsonValueType       ValueType = "json"
	ArrayValueType      ValueType = "array"
	StructValueType     ValueType = "struct"
	DateValueType       ValueType = "date"
	DatetimeValueType   ValueType = "datetime"
	TimeValueType       ValueType = "time"
	TimestampValueType  ValueType = "timestamp"
	IntervalValueType   ValueType = "interval"
)

type WINDOW_ANY_VALUE

type WINDOW_ANY_VALUE struct {
}

func (*WINDOW_ANY_VALUE) Done

func (*WINDOW_ANY_VALUE) Step

type WINDOW_ARRAY_AGG

type WINDOW_ARRAY_AGG struct {
}

func (*WINDOW_ARRAY_AGG) Done

func (*WINDOW_ARRAY_AGG) Step

type WINDOW_AVG

type WINDOW_AVG struct {
}

func (*WINDOW_AVG) Done

func (*WINDOW_AVG) Step

type WINDOW_CORR

type WINDOW_CORR struct {
}

func (*WINDOW_CORR) Done

func (*WINDOW_CORR) Step

type WINDOW_COUNT

type WINDOW_COUNT struct {
}

func (*WINDOW_COUNT) Done

func (*WINDOW_COUNT) Step

type WINDOW_COUNTIF

type WINDOW_COUNTIF struct {
}

func (*WINDOW_COUNTIF) Done

func (*WINDOW_COUNTIF) Step

type WINDOW_COUNT_STAR

type WINDOW_COUNT_STAR struct {
}

func (*WINDOW_COUNT_STAR) Done

func (*WINDOW_COUNT_STAR) Step

type WINDOW_COVAR_POP

type WINDOW_COVAR_POP struct {
}

func (*WINDOW_COVAR_POP) Done

func (*WINDOW_COVAR_POP) Step

type WINDOW_COVAR_SAMP

type WINDOW_COVAR_SAMP struct {
}

func (*WINDOW_COVAR_SAMP) Done

func (*WINDOW_COVAR_SAMP) Step

type WINDOW_CUME_DIST

type WINDOW_CUME_DIST struct {
}

func (*WINDOW_CUME_DIST) Done

func (*WINDOW_CUME_DIST) Step

type WINDOW_DENSE_RANK

type WINDOW_DENSE_RANK struct {
}

func (*WINDOW_DENSE_RANK) Done

func (*WINDOW_DENSE_RANK) Step

type WINDOW_FIRST_VALUE

type WINDOW_FIRST_VALUE struct {
}

func (*WINDOW_FIRST_VALUE) Done

func (*WINDOW_FIRST_VALUE) Step

type WINDOW_LAG

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

func (*WINDOW_LAG) Done

func (*WINDOW_LAG) Step

func (f *WINDOW_LAG) Step(v Value, offset int64, defaultValue Value, opt *WindowFuncStatus, agg *WindowFuncAggregatedStatus) error

type WINDOW_LAST_VALUE

type WINDOW_LAST_VALUE struct {
}

func (*WINDOW_LAST_VALUE) Done

func (*WINDOW_LAST_VALUE) Step

type WINDOW_LEAD

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

func (*WINDOW_LEAD) Done

func (*WINDOW_LEAD) Step

func (f *WINDOW_LEAD) Step(v Value, offset int64, defaultValue Value, opt *WindowFuncStatus, agg *WindowFuncAggregatedStatus) error

type WINDOW_MAX

type WINDOW_MAX struct {
}

func (*WINDOW_MAX) Done

func (*WINDOW_MAX) Step

type WINDOW_MIN

type WINDOW_MIN struct {
}

func (*WINDOW_MIN) Done

func (*WINDOW_MIN) Step

type WINDOW_NTH_VALUE

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

func (*WINDOW_NTH_VALUE) Done

func (*WINDOW_NTH_VALUE) Step

type WINDOW_NTILE

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

func (*WINDOW_NTILE) Done

func (*WINDOW_NTILE) Step

type WINDOW_PERCENTILE_CONT

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

func (*WINDOW_PERCENTILE_CONT) Done

func (*WINDOW_PERCENTILE_CONT) Step

type WINDOW_PERCENTILE_DISC

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

func (*WINDOW_PERCENTILE_DISC) Done

func (*WINDOW_PERCENTILE_DISC) Step

type WINDOW_PERCENT_RANK

type WINDOW_PERCENT_RANK struct {
}

func (*WINDOW_PERCENT_RANK) Done

func (*WINDOW_PERCENT_RANK) Step

type WINDOW_RANK

type WINDOW_RANK struct {
}

func (*WINDOW_RANK) Done

func (*WINDOW_RANK) Step

type WINDOW_ROW_NUMBER

type WINDOW_ROW_NUMBER struct {
}

func (*WINDOW_ROW_NUMBER) Done

func (*WINDOW_ROW_NUMBER) Step

type WINDOW_STDDEV

type WINDOW_STDDEV = WINDOW_STDDEV_SAMP

type WINDOW_STDDEV_POP

type WINDOW_STDDEV_POP struct {
}

func (*WINDOW_STDDEV_POP) Done

func (*WINDOW_STDDEV_POP) Step

type WINDOW_STDDEV_SAMP

type WINDOW_STDDEV_SAMP struct {
}

func (*WINDOW_STDDEV_SAMP) Done

func (*WINDOW_STDDEV_SAMP) Step

type WINDOW_STRING_AGG

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

func (*WINDOW_STRING_AGG) Done

func (*WINDOW_STRING_AGG) Step

type WINDOW_SUM

type WINDOW_SUM struct {
}

func (*WINDOW_SUM) Done

func (*WINDOW_SUM) Step

type WINDOW_VARIANCE

type WINDOW_VARIANCE = WINDOW_VAR_SAMP

type WINDOW_VAR_POP

type WINDOW_VAR_POP struct {
}

func (*WINDOW_VAR_POP) Done

func (*WINDOW_VAR_POP) Step

type WINDOW_VAR_SAMP

type WINDOW_VAR_SAMP struct {
}

func (*WINDOW_VAR_SAMP) Done

func (*WINDOW_VAR_SAMP) Step

type WildcardTable

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

func (*WildcardTable) AnonymizationInfo

func (t *WildcardTable) AnonymizationInfo() *types.AnonymizationInfo

func (*WildcardTable) Column

func (t *WildcardTable) Column(idx int) types.Column

func (*WildcardTable) CreateEvaluatorTableIterator

func (t *WildcardTable) CreateEvaluatorTableIterator(columnIdxs []int) (*types.EvaluatorTableIterator, error)

func (*WildcardTable) FindColumnByName

func (t *WildcardTable) FindColumnByName(name string) types.Column

func (*WildcardTable) FormatSQL

func (t *WildcardTable) FormatSQL(ctx context.Context) (string, error)

func (*WildcardTable) FullName

func (t *WildcardTable) FullName() string

func (*WildcardTable) IsValueTable

func (t *WildcardTable) IsValueTable() bool

func (*WildcardTable) Name

func (t *WildcardTable) Name() string

func (*WildcardTable) NumColumns

func (t *WildcardTable) NumColumns() int

func (*WildcardTable) PrimaryKey

func (t *WildcardTable) PrimaryKey() []int

func (*WildcardTable) SerializationID

func (t *WildcardTable) SerializationID() int64

func (*WildcardTable) SupportsAnonymization

func (t *WildcardTable) SupportsAnonymization() bool

func (*WildcardTable) TableTypeName

func (t *WildcardTable) TableTypeName(mode types.ProductMode) string

type WindowAggregator

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

func (*WindowAggregator) Done

func (a *WindowAggregator) Done() (interface{}, error)

func (*WindowAggregator) Step

func (a *WindowAggregator) Step(stepArgs ...interface{}) error

type WindowBindFunction

type WindowBindFunction func() func() *WindowAggregator

type WindowBoundary

type WindowBoundary struct {
	Type   WindowBoundaryType `json:"type"`
	Offset int64              `json:"offset"`
}

type WindowBoundaryType

type WindowBoundaryType int
const (
	WindowBoundaryTypeUnknown    WindowBoundaryType = 0
	WindowUnboundedPrecedingType WindowBoundaryType = 1
	WindowOffsetPrecedingType    WindowBoundaryType = 2
	WindowCurrentRowType         WindowBoundaryType = 3
	WindowOffsetFollowingType    WindowBoundaryType = 4
	WindowUnboundedFollowingType WindowBoundaryType = 5
)

type WindowFrameExprNode

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

func (*WindowFrameExprNode) FormatSQL

func (n *WindowFrameExprNode) FormatSQL(ctx context.Context) (string, error)

type WindowFrameNode

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

func (*WindowFrameNode) FormatSQL

func (n *WindowFrameNode) FormatSQL(ctx context.Context) (string, error)

type WindowFrameUnitType

type WindowFrameUnitType int
const (
	WindowFrameUnitUnknown WindowFrameUnitType = 0
	WindowFrameUnitRows    WindowFrameUnitType = 1
	WindowFrameUnitRange   WindowFrameUnitType = 2
)

type WindowFuncAggregatedStatus

type WindowFuncAggregatedStatus struct {
	FrameUnit WindowFrameUnitType
	Start     *WindowBoundary
	End       *WindowBoundary
	RowID     int64

	PartitionToValuesMap map[string][]*WindowOrderedValue
	PartitionedValues    []*PartitionedValue
	Values               []*WindowOrderedValue
	SortedValues         []*WindowOrderedValue
	// contains filtered or unexported fields
}

func (*WindowFuncAggregatedStatus) Distinct

func (s *WindowFuncAggregatedStatus) Distinct() bool

func (*WindowFuncAggregatedStatus) Done

func (s *WindowFuncAggregatedStatus) Done(cb func([]Value, int, int) error) error

func (*WindowFuncAggregatedStatus) FilteredValues

func (s *WindowFuncAggregatedStatus) FilteredValues() []*WindowOrderedValue

func (*WindowFuncAggregatedStatus) IgnoreNulls

func (s *WindowFuncAggregatedStatus) IgnoreNulls() bool

func (*WindowFuncAggregatedStatus) Partition

func (s *WindowFuncAggregatedStatus) Partition() string

func (*WindowFuncAggregatedStatus) Step

func (s *WindowFuncAggregatedStatus) Step(value Value, status *WindowFuncStatus) error

type WindowFuncInfo

type WindowFuncInfo struct {
	Name     string
	BindFunc WindowBindFunction
}

type WindowFuncOption

type WindowFuncOption struct {
	Type  WindowFuncOptionType `json:"type"`
	Value interface{}          `json:"value"`
}

func (*WindowFuncOption) UnmarshalJSON

func (o *WindowFuncOption) UnmarshalJSON(b []byte) error

type WindowFuncOptionType

type WindowFuncOptionType string
const (
	WindowFuncOptionUnknown   WindowFuncOptionType = "window_unknown"
	WindowFuncOptionFrameUnit WindowFuncOptionType = "window_frame_unit"
	WindowFuncOptionStart     WindowFuncOptionType = "window_boundary_start"
	WindowFuncOptionEnd       WindowFuncOptionType = "window_boundary_end"
	WindowFuncOptionPartition WindowFuncOptionType = "window_partition"
	WindowFuncOptionRowID     WindowFuncOptionType = "window_rowid"
	WindowFuncOptionOrderBy   WindowFuncOptionType = "window_order_by"
)

type WindowFuncStatus

type WindowFuncStatus struct {
	FrameUnit  WindowFrameUnitType
	Start      *WindowBoundary
	End        *WindowBoundary
	Partitions []Value
	RowID      int64
	OrderBy    []*WindowOrderBy
}

func (*WindowFuncStatus) Partition

func (s *WindowFuncStatus) Partition() (string, error)

type WindowOrderBy

type WindowOrderBy struct {
	Value Value `json:"value"`
	IsAsc bool  `json:"isAsc"`
}

func (*WindowOrderBy) UnmarshalJSON

func (w *WindowOrderBy) UnmarshalJSON(b []byte) error

type WindowOrderedValue

type WindowOrderedValue struct {
	OrderBy []*WindowOrderBy
	Value   Value
}

type WindowOrderingNode

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

func (*WindowOrderingNode) FormatSQL

func (n *WindowOrderingNode) FormatSQL(ctx context.Context) (string, error)

type WindowPartitioningNode

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

func (*WindowPartitioningNode) FormatSQL

func (n *WindowPartitioningNode) FormatSQL(ctx context.Context) (string, error)

type WithEntryNode

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

func (*WithEntryNode) FormatSQL

func (n *WithEntryNode) FormatSQL(ctx context.Context) (string, error)

type WithPartitionColumnsNode

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

func (*WithPartitionColumnsNode) FormatSQL

func (n *WithPartitionColumnsNode) FormatSQL(ctx context.Context) (string, error)

type WithRefScanNode

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

func (*WithRefScanNode) FormatSQL

func (n *WithRefScanNode) FormatSQL(ctx context.Context) (string, error)

type WithScanNode

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

func (*WithScanNode) FormatSQL

func (n *WithScanNode) FormatSQL(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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