mysqlxexpr

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Expr_Type_name = map[int32]string{
		1: "IDENT",
		2: "LITERAL",
		3: "VARIABLE",
		4: "FUNC_CALL",
		5: "OPERATOR",
		6: "PLACEHOLDER",
		7: "OBJECT",
		8: "ARRAY",
	}
	Expr_Type_value = map[string]int32{
		"IDENT":       1,
		"LITERAL":     2,
		"VARIABLE":    3,
		"FUNC_CALL":   4,
		"OPERATOR":    5,
		"PLACEHOLDER": 6,
		"OBJECT":      7,
		"ARRAY":       8,
	}
)

Enum value maps for Expr_Type.

View Source
var (
	DocumentPathItem_Type_name = map[int32]string{
		1: "MEMBER",
		2: "MEMBER_ASTERISK",
		3: "ARRAY_INDEX",
		4: "ARRAY_INDEX_ASTERISK",
		5: "DOUBLE_ASTERISK",
	}
	DocumentPathItem_Type_value = map[string]int32{
		"MEMBER":               1,
		"MEMBER_ASTERISK":      2,
		"ARRAY_INDEX":          3,
		"ARRAY_INDEX_ASTERISK": 4,
		"DOUBLE_ASTERISK":      5,
	}
)

Enum value maps for DocumentPathItem_Type.

View Source
var File_mysqlx_expr_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Array

type Array struct {

	// * list of values
	Value []*Expr `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

* An array of expressions

func (*Array) Descriptor deprecated

func (*Array) Descriptor() ([]byte, []int)

Deprecated: Use Array.ProtoReflect.Descriptor instead.

func (*Array) GetValue

func (x *Array) GetValue() []*Expr

func (*Array) ProtoMessage

func (*Array) ProtoMessage()

func (*Array) ProtoReflect

func (x *Array) ProtoReflect() protoreflect.Message

func (*Array) Reset

func (x *Array) Reset()

func (*Array) String

func (x *Array) String() string

type ColumnIdentifier

type ColumnIdentifier struct {

	// * document path
	DocumentPath []*DocumentPathItem `protobuf:"bytes,1,rep,name=document_path,json=documentPath" json:"document_path,omitempty"`
	// * name of column
	Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// * name of table
	TableName *string `protobuf:"bytes,3,opt,name=table_name,json=tableName" json:"table_name,omitempty"`
	// * name of schema
	SchemaName *string `protobuf:"bytes,4,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"`
	// contains filtered or unexported fields
}

* Column identifier

for table: col\@doc_path, tbl.col\@doc_path col, tbl.col, schema.tbl.col for document collection: doc_path // @par production list @code{unparsed} col_identifier: string "." string "." string | : string "." string | : string | : string "." string "." string "@" document_path | : string "." string "@" document_path | : string "@" document_path | : document_path document_path: member | arrayLocation | doubleAsterisk member = "." string | "." "*" arrayLocation = "[" index "]" | "[" "*" "]" doubleAsterisk = "**" @endcode

func (*ColumnIdentifier) Descriptor deprecated

func (*ColumnIdentifier) Descriptor() ([]byte, []int)

Deprecated: Use ColumnIdentifier.ProtoReflect.Descriptor instead.

func (*ColumnIdentifier) GetDocumentPath

func (x *ColumnIdentifier) GetDocumentPath() []*DocumentPathItem

func (*ColumnIdentifier) GetName

func (x *ColumnIdentifier) GetName() string

func (*ColumnIdentifier) GetSchemaName

func (x *ColumnIdentifier) GetSchemaName() string

func (*ColumnIdentifier) GetTableName

func (x *ColumnIdentifier) GetTableName() string

func (*ColumnIdentifier) ProtoMessage

func (*ColumnIdentifier) ProtoMessage()

func (*ColumnIdentifier) ProtoReflect

func (x *ColumnIdentifier) ProtoReflect() protoreflect.Message

func (*ColumnIdentifier) Reset

func (x *ColumnIdentifier) Reset()

func (*ColumnIdentifier) String

func (x *ColumnIdentifier) String() string

type DocumentPathItem

type DocumentPathItem struct {
	Type  *DocumentPathItem_Type `protobuf:"varint,1,req,name=type,enum=Mysqlx.Expr.DocumentPathItem_Type" json:"type,omitempty"`
	Value *string                `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	// * used in case of ARRY_INDEX
	Index *uint32 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"`
	// contains filtered or unexported fields
}

* Document path item

@par production list @code{unparsed} document_path: path_item | path_item document_path path_item : member | array_index | "**" member : "." string | "." "*" array_index : "[" number "]" | "[" "*" "]" @endcode

func (*DocumentPathItem) Descriptor deprecated

func (*DocumentPathItem) Descriptor() ([]byte, []int)

Deprecated: Use DocumentPathItem.ProtoReflect.Descriptor instead.

func (*DocumentPathItem) GetIndex

func (x *DocumentPathItem) GetIndex() uint32

func (*DocumentPathItem) GetType

func (*DocumentPathItem) GetValue

func (x *DocumentPathItem) GetValue() string

func (*DocumentPathItem) ProtoMessage

func (*DocumentPathItem) ProtoMessage()

func (*DocumentPathItem) ProtoReflect

func (x *DocumentPathItem) ProtoReflect() protoreflect.Message

func (*DocumentPathItem) Reset

func (x *DocumentPathItem) Reset()

func (*DocumentPathItem) String

func (x *DocumentPathItem) String() string

type DocumentPathItem_Type

type DocumentPathItem_Type int32
const (
	// *  .member
	DocumentPathItem_MEMBER DocumentPathItem_Type = 1
	// * \.*
	DocumentPathItem_MEMBER_ASTERISK DocumentPathItem_Type = 2
	// * [index]
	DocumentPathItem_ARRAY_INDEX DocumentPathItem_Type = 3
	// * [*]
	DocumentPathItem_ARRAY_INDEX_ASTERISK DocumentPathItem_Type = 4
	// * **
	DocumentPathItem_DOUBLE_ASTERISK DocumentPathItem_Type = 5
)

func (DocumentPathItem_Type) Descriptor

func (DocumentPathItem_Type) Enum

func (DocumentPathItem_Type) EnumDescriptor deprecated

func (DocumentPathItem_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use DocumentPathItem_Type.Descriptor instead.

func (DocumentPathItem_Type) Number

func (DocumentPathItem_Type) String

func (x DocumentPathItem_Type) String() string

func (DocumentPathItem_Type) Type

func (*DocumentPathItem_Type) UnmarshalJSON deprecated

func (x *DocumentPathItem_Type) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Expr

type Expr struct {
	Type         *Expr_Type              `protobuf:"varint,1,req,name=type,enum=Mysqlx.Expr.Expr_Type" json:"type,omitempty"`
	Identifier   *ColumnIdentifier       `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"`
	Variable     *string                 `protobuf:"bytes,3,opt,name=variable" json:"variable,omitempty"`
	Literal      *mysqlxdatatypes.Scalar `protobuf:"bytes,4,opt,name=literal" json:"literal,omitempty"`
	FunctionCall *FunctionCall           `protobuf:"bytes,5,opt,name=function_call,json=functionCall" json:"function_call,omitempty"`
	Operator     *Operator               `protobuf:"bytes,6,opt,name=operator" json:"operator,omitempty"`
	Position     *uint32                 `protobuf:"varint,7,opt,name=position" json:"position,omitempty"`
	Object       *Object                 `protobuf:"bytes,8,opt,name=object" json:"object,omitempty"`
	Array        *Array                  `protobuf:"bytes,9,opt,name=array" json:"array,omitempty"`
	// contains filtered or unexported fields
}

* The "root" of the expression tree.

If expression type is PLACEHOLDER, then it refers to the value of a parameter specified when executing a statement (see args field of StmtExecute command). Field position (which must be present for such an expression) gives 0-based position of the parameter in the parameter list.

@par production list @code{unparsed} expr: operator | : identifier | : function_call | : variable | : literal | : object | : array | : placeholder @endcode

func (*Expr) Descriptor deprecated

func (*Expr) Descriptor() ([]byte, []int)

Deprecated: Use Expr.ProtoReflect.Descriptor instead.

func (*Expr) GetArray

func (x *Expr) GetArray() *Array

func (*Expr) GetFunctionCall

func (x *Expr) GetFunctionCall() *FunctionCall

func (*Expr) GetIdentifier

func (x *Expr) GetIdentifier() *ColumnIdentifier

func (*Expr) GetLiteral

func (x *Expr) GetLiteral() *mysqlxdatatypes.Scalar

func (*Expr) GetObject

func (x *Expr) GetObject() *Object

func (*Expr) GetOperator

func (x *Expr) GetOperator() *Operator

func (*Expr) GetPosition

func (x *Expr) GetPosition() uint32

func (*Expr) GetType

func (x *Expr) GetType() Expr_Type

func (*Expr) GetVariable

func (x *Expr) GetVariable() string

func (*Expr) ProtoMessage

func (*Expr) ProtoMessage()

func (*Expr) ProtoReflect

func (x *Expr) ProtoReflect() protoreflect.Message

func (*Expr) Reset

func (x *Expr) Reset()

func (*Expr) String

func (x *Expr) String() string

type Expr_Type

type Expr_Type int32
const (
	Expr_IDENT       Expr_Type = 1
	Expr_LITERAL     Expr_Type = 2
	Expr_VARIABLE    Expr_Type = 3
	Expr_FUNC_CALL   Expr_Type = 4
	Expr_OPERATOR    Expr_Type = 5
	Expr_PLACEHOLDER Expr_Type = 6
	Expr_OBJECT      Expr_Type = 7
	Expr_ARRAY       Expr_Type = 8
)

func (Expr_Type) Descriptor

func (Expr_Type) Descriptor() protoreflect.EnumDescriptor

func (Expr_Type) Enum

func (x Expr_Type) Enum() *Expr_Type

func (Expr_Type) EnumDescriptor deprecated

func (Expr_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Expr_Type.Descriptor instead.

func (Expr_Type) Number

func (x Expr_Type) Number() protoreflect.EnumNumber

func (Expr_Type) String

func (x Expr_Type) String() string

func (Expr_Type) Type

func (*Expr_Type) UnmarshalJSON deprecated

func (x *Expr_Type) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type FunctionCall

type FunctionCall struct {

	// * identifier of function; at least name of it
	Name *Identifier `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// * list of parameters
	Param []*Expr `protobuf:"bytes,2,rep,name=param" json:"param,omitempty"`
	// contains filtered or unexported fields
}

* Function call: “func(a, b, "1", 3)“

@par production list @code{unparsed} function_call: `identifier` "(" [ `expr` ["," `expr` ]* ] ")" @endcode

func (*FunctionCall) Descriptor deprecated

func (*FunctionCall) Descriptor() ([]byte, []int)

Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead.

func (*FunctionCall) GetName

func (x *FunctionCall) GetName() *Identifier

func (*FunctionCall) GetParam

func (x *FunctionCall) GetParam() []*Expr

func (*FunctionCall) ProtoMessage

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) ProtoReflect

func (x *FunctionCall) ProtoReflect() protoreflect.Message

func (*FunctionCall) Reset

func (x *FunctionCall) Reset()

func (*FunctionCall) String

func (x *FunctionCall) String() string

type Identifier

type Identifier struct {
	Name       *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	SchemaName *string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"`
	// contains filtered or unexported fields
}

* Identifier: name, schame.name

@par production list @code{unparsed} identifier: string "." string | : string @endcode

func (*Identifier) Descriptor deprecated

func (*Identifier) Descriptor() ([]byte, []int)

Deprecated: Use Identifier.ProtoReflect.Descriptor instead.

func (*Identifier) GetName

func (x *Identifier) GetName() string

func (*Identifier) GetSchemaName

func (x *Identifier) GetSchemaName() string

func (*Identifier) ProtoMessage

func (*Identifier) ProtoMessage()

func (*Identifier) ProtoReflect

func (x *Identifier) ProtoReflect() protoreflect.Message

func (*Identifier) Reset

func (x *Identifier) Reset()

func (*Identifier) String

func (x *Identifier) String() string

type Object

type Object struct {

	// * list of fields
	Fld []*Object_ObjectField `protobuf:"bytes,1,rep,name=fld" json:"fld,omitempty"`
	// contains filtered or unexported fields
}

* An object (with expression values)

func (*Object) Descriptor deprecated

func (*Object) Descriptor() ([]byte, []int)

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetFld

func (x *Object) GetFld() []*Object_ObjectField

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

func (x *Object) ProtoReflect() protoreflect.Message

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

type Object_ObjectField

type Object_ObjectField struct {

	// * identifier of field
	Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	// * value of field
	Value *Expr `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Object_ObjectField) Descriptor deprecated

func (*Object_ObjectField) Descriptor() ([]byte, []int)

Deprecated: Use Object_ObjectField.ProtoReflect.Descriptor instead.

func (*Object_ObjectField) GetKey

func (x *Object_ObjectField) GetKey() string

func (*Object_ObjectField) GetValue

func (x *Object_ObjectField) GetValue() *Expr

func (*Object_ObjectField) ProtoMessage

func (*Object_ObjectField) ProtoMessage()

func (*Object_ObjectField) ProtoReflect

func (x *Object_ObjectField) ProtoReflect() protoreflect.Message

func (*Object_ObjectField) Reset

func (x *Object_ObjectField) Reset()

func (*Object_ObjectField) String

func (x *Object_ObjectField) String() string

type Operator

type Operator struct {

	// * name of operator
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// * list of parameters
	Param []*Expr `protobuf:"bytes,2,rep,name=param" json:"param,omitempty"`
	// contains filtered or unexported fields
}

func (*Operator) Descriptor deprecated

func (*Operator) Descriptor() ([]byte, []int)

Deprecated: Use Operator.ProtoReflect.Descriptor instead.

func (*Operator) GetName

func (x *Operator) GetName() string

func (*Operator) GetParam

func (x *Operator) GetParam() []*Expr

func (*Operator) ProtoMessage

func (*Operator) ProtoMessage()

func (*Operator) ProtoReflect

func (x *Operator) ProtoReflect() protoreflect.Message

func (*Operator) Reset

func (x *Operator) Reset()

func (*Operator) String

func (x *Operator) String() string

Jump to

Keyboard shortcuts

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