Documentation
¶
Index ¶
- func ConvBinaryOpExpReafToExpIFOne(sc *schema.Schema, convSrc interface{}) expression.Expression
- func ConvColumnStrsToExpIfOnes(c *catalog.Catalog, childPlan plans.Plan, convSrc []*string, isLeftOnJoin bool) []expression.Expression
- func ConvParsedBinaryOpExprToExpIFOne(sc *schema.Schema, convSrc *BinaryOpExpression) expression.Expression
- func ConvParsedSelectionExprToSchema(c *catalog.Catalog, convSrc []*SelectFieldExpression) *schema.Schema
- func GetPredicateExprFromStr(schema_ *schema.Schema, pred *string) expression.Expression
- func GetTypesForBOperationExpr(opcode_ opcode.Op) (expression.LogicalOpType, expression.ComparisonType)
- func PrintParsedNodes(sqlStr *string)
- func ValueExprToValue(expr *driver.ValueExpr) *types.Value
- type AggFuncVisitor
- type AssignVisitor
- type BinaryOpExpType
- type BinaryOpExpression
- type BinaryOpVisitor
- type ChildDataVisitor
- type ColDefExpression
- type IndexDefExpression
- type JoinVisitor
- type OrderByExpression
- type PrintNodesVisitor
- type QueryInfo
- type QueryType
- type RootSQLVisitor
- type SelectFieldExpression
- type SelectFieldsVisitor
- type SetExpression
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvBinaryOpExpReafToExpIFOne ¶
func ConvBinaryOpExpReafToExpIFOne(sc *schema.Schema, convSrc interface{}) expression.Expression
attiontion: this func can be used only for predicate of SelectionPlanNode
func ConvColumnStrsToExpIfOnes ¶
func ConvColumnStrsToExpIfOnes(c *catalog.Catalog, childPlan plans.Plan, convSrc []*string, isLeftOnJoin bool) []expression.Expression
childPlan can be nil
func ConvParsedBinaryOpExprToExpIFOne ¶
func ConvParsedBinaryOpExprToExpIFOne(sc *schema.Schema, convSrc *BinaryOpExpression) expression.Expression
attiontion: this func can be used only for predicate of SelectionPlanNode
func ConvParsedSelectionExprToSchema ¶
func ConvParsedSelectionExprToSchema(c *catalog.Catalog, convSrc []*SelectFieldExpression) *schema.Schema
TODO: (SDB) need to support aggregation function on select field
func GetPredicateExprFromStr ¶
func GetPredicateExprFromStr(schema_ *schema.Schema, pred *string) expression.Expression
func GetTypesForBOperationExpr ¶
func GetTypesForBOperationExpr(opcode_ opcode.Op) (expression.LogicalOpType, expression.ComparisonType)
Types ¶
type AggFuncVisitor ¶
type AssignVisitor ¶
type BinaryOpExpType ¶
type BinaryOpExpType int
const ( Compare BinaryOpExpType = iota Logical IsNull ColumnName Constant )
type BinaryOpExpression ¶
type BinaryOpExpression struct {
LogicalOperationType_ expression.LogicalOpType
ComparisonOperationType_ expression.ComparisonType
Left_ interface{}
Right_ interface{}
}
func (*BinaryOpExpression) AppendBinaryOpExpWithAnd ¶
func (expr *BinaryOpExpression) AppendBinaryOpExpWithAnd(expr2 *BinaryOpExpression) *BinaryOpExpression
func (*BinaryOpExpression) GetDeepCopy ¶
func (expr *BinaryOpExpression) GetDeepCopy() *BinaryOpExpression
func (*BinaryOpExpression) GetType ¶
func (expr *BinaryOpExpression) GetType() BinaryOpExpType
func (*BinaryOpExpression) TouchedColumns ¶
func (expr *BinaryOpExpression) TouchedColumns() mapset.Set[string]
type BinaryOpVisitor ¶
type BinaryOpVisitor struct {
QueryInfo_ *QueryInfo
BinaryOpExpression_ *BinaryOpExpression
}
type ChildDataVisitor ¶
type ChildDataVisitor struct {
ChildDatas_ []interface{}
}
type ColDefExpression ¶
type IndexDefExpression ¶
type JoinVisitor ¶
type JoinVisitor struct {
QueryInfo_ *QueryInfo
}
type OrderByExpression ¶
type PrintNodesVisitor ¶
type PrintNodesVisitor struct {
}
func NewPrintNodesVisitor ¶
func NewPrintNodesVisitor() *PrintNodesVisitor
type QueryInfo ¶
type QueryInfo struct {
QueryType_ *QueryType
SelectFields_ []*SelectFieldExpression // SELECT
SetExpressions_ []*SetExpression // UPDATE
NewTable_ *string // CREATE TABLE
ColDefExpressions_ []*ColDefExpression // CREATE TABLE
IndexDefExpressions_ []*IndexDefExpression // CREATE TABLE
TargetCols_ []*string // INSERT
Values_ []*types.Value // INSERT
OnExpressions_ *BinaryOpExpression // SELECT (with JOIN)
JoinTables_ []*string // SELECT
WhereExpression_ *BinaryOpExpression // SELECT, UPDATE, DELETE
LimitNum_ int32 // SELECT
OffsetNum_ int32 // SELECT
OrderByExpressions_ []*OrderByExpression // SELECT
}
func ProcessSQLStr ¶
type RootSQLVisitor ¶
type RootSQLVisitor struct {
QueryInfo_ *QueryInfo
}
func NewRootSQLVisitor ¶
func NewRootSQLVisitor() *RootSQLVisitor
type SelectFieldExpression ¶
type SelectFieldExpression struct {
IsAgg_ bool
AggType_ plans.AggregationType
TableName_ *string // if specified
ColName_ *string
}
func (*SelectFieldExpression) TouchedColumns ¶
func (sf *SelectFieldExpression) TouchedColumns() mapset.Set[string]
type SelectFieldsVisitor ¶
type SelectFieldsVisitor struct {
QueryInfo_ *QueryInfo
}
type SetExpression ¶
Click to show internal directories.
Click to hide internal directories.