Documentation ¶
Overview ¶
********************************************************************** MicroCore Copyright 2020 - 2022 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2022 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2021 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2022 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
Index ¶
- Constants
- Variables
- func AddListToGlobalFunctionPool(properties []*DvVariable)
- func AddToGlobalFunctionPool(properties map[string]interface{})
- func AnyCompareAnyWithTypes(kind1 int, value1 interface{}, kind2 int, value2 interface{}) int
- func AnyGetType(v interface{}) int
- func AnyToBoolean(v interface{}) bool
- func AnyToByteArray(v interface{}) []byte
- func AnyToDvGrammarExpressionValue(v interface{}) *dvgrammar.ExpressionValue
- func AnyToNumber(v interface{}) float64
- func AnyToNumberInt(v interface{}) (f int64, ok bool)
- func AnyToString(v interface{}) string
- func AnyToStringWithOptions(v interface{}, options int) string
- func AnyWithTypeToBoolean(kind int, v interface{}, defValue bool) bool
- func AnyWithTypeToNumber(kind int, v interface{}) float64
- func AnyWithTypeToNumberInt(kind int, v interface{}) (int64, bool)
- func AnyWithTypeToString(kind int, v interface{}) (string, bool)
- func ApplyDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
- func ArrowFunctionOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func AssignArrayStringToVariable(parent *DvVariable, variableDefinition string, data []string, force bool) error
- func AssignIntToVariable(parent *DvVariable, variableDefinition string, data int, force bool) error
- func AssignMapStringToVariable(parent *DvVariable, variableDefinition string, data map[string]string, ...) error
- func AssignVariable(parent *DvVariable, keys []string, value interface{}, force bool) error
- func AssignVariableByKey(parent *DvVariable, key string, value interface{}, force bool) error
- func AssignVariableDirect(parent *DvVariable, val interface{}) error
- func AssignVariableToVariable(parent *DvVariable, variableDefinition string, data interface{}, force bool) error
- func BindDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
- func BitwiseNotOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func BreakOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func CalculateAllNodeParams(args []*dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) ([]interface{}, error)
- func CalculateDefined(data []byte, scope dvgrammar.ScopeInterface, ...) (*dvgrammar.ExpressionValue, error)
- func CalculateTernaryOperator(condNode, node1, node2 *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func CalculatorDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
- func CalculatorEvaluator(data []byte, scope dvgrammar.ScopeInterface, ...) (*dvgrammar.ExpressionValue, error)
- func CallDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
- func CollectJsonVariables(data interface{}, params map[string]string, env *DvObject, anyway bool, ...)
- func CollectValueByKey(data interface{}, key string, env *DvObject) (interface{}, interface{}, error)
- func CollectValuesByMap(data interface{}, params map[string]string, env *DvObject) (res map[string]interface{})
- func CollectVariablesByAnyMap(src map[string]interface{}, params map[string]string, data *DvObject, ...)
- func CollectVariablesByStringMap(src map[string]string, params map[string]string, data *DvObject, anyway bool, ...)
- func CompareAsIntegers(value1 interface{}, value2 interface{}) int
- func CompareAsNumbers(value1 interface{}, value2 interface{}) int
- func CompareAsStrings(value1 interface{}, value2 interface{}) int
- func CompareByComparisonType(compareType int, value1 interface{}, value2 interface{}) int
- func ContainInProcess(contained interface{}, containing interface{}) bool
- func ContinueOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func ConvertAnyTypeToJson(buf []byte, v interface{}) []byte
- func ConvertAnyTypeToJsonString(data interface{}) string
- func ConvertByteArrayToIntOrDouble(data []byte) (interface{}, bool)
- func ConvertDvFieldInfoToProperties(item *DvVariable, index int) map[string]interface{}
- func ConvertInt64ToBuf(buf []byte, v int64) []byte
- func ConvertIntToBuf(buf []byte, v int) []byte
- func ConvertInterfaceListToStringList(list []interface{}, options int) []string
- func ConvertInterfaceListsMapToStringListsMap(listMap map[string][][]interface{}, options int) map[string][][]string
- func ConvertInterfaceListsToStringLists(list [][]interface{}, options int) [][]string
- func ConvertSimpleKindAndValueToInterface(kind int, data []byte) (interface{}, bool)
- func ConvertSimpleTypeToBuf(buf []byte, v interface{}) ([]byte, bool, int)
- func ConvertSimpleTypeToString(v interface{}) (string, bool)
- func ConvertStringArrayToInterfaceArray(data []string) (res []interface{})
- func ConvertStringMapToDvVariableMap(data map[string]string) (res map[string]*DvVariable)
- func ConvertUnsignedInt64ToBuf(buf []byte, v uint64) []byte
- func ConvertUnsignedIntToBuf(buf []byte, v uint) []byte
- func ConvertVariableNameToKeys(data string) (res []string, err error)
- func CreateFunctionContainer(params []string, body []*dvgrammar.BuildNode, options int, name string) (*dvgrammar.ExpressionValue, error)
- func CurlyBraceNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func CurlyBraceParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func DeleteOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func DeleteVariable(parent *DvVariable, keys []string, silent bool) error
- func DvObjectInternalToString(obj *DvObject) string
- func ExecFunction(context *dvgrammar.ExpressionContext, fn interface{}, self interface{}, ...) (interface{}, error)
- func ExecuteAnyFunction(context *dvgrammar.ExpressionContext, fn interface{}, thisArg interface{}, ...) (value interface{}, err error)
- func ExecuteCycleCommon(context *dvgrammar.ExpressionContext, initValues []*dvgrammar.BuildNode, ...) (int, *dvgrammar.ExpressionValue, error)
- func ExecuteCycleInOf(context *dvgrammar.ExpressionContext, inof *dvgrammar.BuildNode, ...) (int, *dvgrammar.ExpressionValue, error)
- func ExecuteIfClauseCommon(context *dvgrammar.ExpressionContext, ifClauseCondition []*dvgrammar.BuildNode, ...) (int, *dvgrammar.ExpressionValue, error)
- func ExpressionEvaluation(expr string, resolver ExpressionResolver) (string, error)
- func ExtractPureName(tree *dvgrammar.BuildNode) (string, error)
- func ForCycleOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func FunctionApply(context *dvgrammar.ExpressionContext, thisVariable interface{}, ...) (interface{}, error)
- func FunctionBind(context *dvgrammar.ExpressionContext, thisVariable interface{}, ...) (interface{}, error)
- func FunctionCall(context *dvgrammar.ExpressionContext, thisVariable interface{}, ...) (interface{}, error)
- func GetBooleanValue(isTrue bool) []byte
- func GetChildrenOfAnyByRange(src interface{}, startIndex int, endIndex int) interface{}
- func GetColumnSubNodes(node *dvgrammar.BuildNode) (*dvgrammar.BuildNode, *dvgrammar.BuildNode, bool)
- func GetDvFunctionArguments(funcObj *DvObject) []string
- func GetEscapedString(s string) string
- func GetExpressionValueChild(value *dvgrammar.ExpressionValue, index *dvgrammar.ExpressionValue, ...) (*dvgrammar.ExpressionValue, error)
- func GetExpressionValueRange(value *dvgrammar.ExpressionValue, indexFrom int, indexTo int) (*dvgrammar.ExpressionValue, error)
- func GetFunctionCodeList(tree *dvgrammar.BuildNode) ([]*dvgrammar.BuildNode, error)
- func GetFunctionObjectVariable(fn *DvFunction, selfVal *dvgrammar.ExpressionValue, ...) (*dvgrammar.ExpressionValue, error)
- func GetFunctionParameterList(tree *dvgrammar.BuildNode) ([]string, error)
- func GetIntFromVariable(parent *DvVariable, variableDefinition string, force bool) (res int, err error)
- func GetIntFromVariableAndIncrementAfter(parent *DvVariable, variableDefinition string, force bool) (res int, err error)
- func GetIntFromVariableAndModify(parent *DvVariable, variableDefinition string, modify int, after bool, ...) (res int, err error)
- func GetLatestKeyInJsonPath(path string) string
- func GetLeftestQuestionNode(tree *dvgrammar.BuildNode) (*dvgrammar.BuildNode, error)
- func GetLengthOfAny(v interface{}) int
- func GetNumberKindFromString(v []byte, n int) (int, int, int64, float64)
- func GetStringAtChar(s string, index int) *dvgrammar.ExpressionValue
- func GetStringFromVariable(parent *DvVariable, variableDefinition string, force bool) (res string, err error)
- func GetVariableByDefinition(parent *DvVariable, variableDefinition string) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error, ...)
- func GetVariableByKeys(parent *DvVariable, keys []string, silent bool) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error)
- func IfClauseOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func Init() bool
- func IsDefined(data []byte, scope dvgrammar.ScopeInterface, row int, col int, place string, ...) (int, error)
- func IsFunction(v interface{}) bool
- func IsNotNullish(v interface{}) bool
- func IsSimpleJsonPath(path string) bool
- func LogicalDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
- func LogicalNotOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func MatchDvFieldInfo(model *DvVariable, pattern *DvVariable) bool
- func MeetItemExpression(expr string, item *DvVariable, resolver ExpressionResolver, options int, ...) (bool, error)
- func ModifySimpleValueAfterGet(thisVal *DvVariable, child *DvVariable, prototyped bool, value string, tp int, ...) error
- func NumberToInt(v float64) (f int64, ok bool)
- func ParentheseNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func ParentheseParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func ParseForDvObjectShort(data string, params *DvObject) (interface{}, error)
- func ParseForDvObjectString(data string, params *DvObject) (string, error)
- func PostMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func PostPlusPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func PreMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func PrePlusPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolAndAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolOrAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolXor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBoolXorAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBooleanAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (res *dvgrammar.ExpressionValue, err error)
- func ProcessorBooleanAndAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBooleanOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (res *dvgrammar.ExpressionValue, err error)
- func ProcessorBooleanOrAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorBooleanOrNullable(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (res *dvgrammar.ExpressionValue, err error)
- func ProcessorBooleanOrNullableAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorColon(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorContainsIn(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorDivision(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorDivisionAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorElseInsideIf(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorGreaterEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorGreaterThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorInInsideFor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLeftShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLeftShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLessEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLessThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLogicalRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorLogicalRightShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorMinus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorMinusAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorMultiply(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorMultiplyAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorNotEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorNotEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorOfInsideFor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPercent(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPercentAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPlus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPlusAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPower(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorPowerAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorQuestion(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProcessorRightShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func ProvideRootValues(env *DvObject)
- func PutVariablesInScope(params []string, args []interface{}, context *dvgrammar.ExpressionContext) error
- func QuickVariableArrayEvaluation(parent *DvVariable, data []string) (res []interface{}, err error)
- func RefillDvGrammarTypePrototyper()
- func RefillDvVariableTypePrototyper()
- func RegisterContainInProcessor(fn ContainInProcessor)
- func RegisterJsonFullParser(fn ProcessByteArray) bool
- func RegisterToStringConverter(converter MethodToStringConverter)
- func RemoveAnyVariable(srcAny interface{}, path string, env *DvObject) interface{}
- func ReturnOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
- func SetNodeValue(tree *dvgrammar.BuildNode, v interface{}, dataType int, ...) error
- func SquareBracketNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func SquareBracketParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, ...)
- func StringToAny(v string) interface{}
- func StringToNumber(v string) float64
- func UnaryMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func UnaryPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, ...) (*dvgrammar.ExpressionValue, error)
- func UpdateAnyVariables(srcAny interface{}, valAny interface{}, path string, mode int, ids []string, ...) interface{}
- func ValidateNumber(data string) error
- type ContainInProcessor
- type CustomJsFunction
- type DvCall
- type DvContext
- func (context *DvContext) CurrentRoutineCallBreak() error
- func (context *DvContext) CurrentRoutineCallExecute(routine *DvRoutine) (bool, error)
- func (context *DvContext) CurrentRoutineCallShift(delta int) (int, error)
- func (context *DvContext) DumpContextMemory()
- func (context *DvContext) ExecuteCurrentRoutine() (bool, error)
- func (context *DvContext) ExecuteRoutine(routine *DvRoutine) error
- func (context *DvContext) ExecuteRoutines(routines []string, params []string) error
- func (context *DvContext) FunctionCallByKeys(variable *DvVariable, keys []string, params []interface{}, ...) (interface{}, error)
- func (context *DvContext) FunctionCallByVariableDefinition(variable *DvVariable, variableDefinition string, params []interface{}, ...) (interface{}, error)
- func (context *DvContext) FunctionCallByVariableDefinitionWithStringParams(variable *DvVariable, variableDefinition string, params []string, ...) (interface{}, error)
- func (context *DvContext) RoutineCallExecute(dvCall *DvCall) error
- func (context *DvContext) SetGeneralArguments(params map[string]string) error
- type DvFunc
- type DvFunction
- type DvFunctionObject
- type DvObject
- func GetFunctionPrototypeFromMasterVariable(name string) *DvObject
- func GetPrototypeForDvGrammarExpressionValue(value *dvgrammar.ExpressionValue) *DvObject
- func NewDvFunction(name string, args []string, fn DvFunc) *DvObject
- func NewDvObject(properties map[string]string, prototype *DvObject) *DvObject
- func NewDvObjectFrom2Maps(localMap map[string]string, globalMap map[string]string) *DvObject
- func NewDvObjectWithGlobalPrototype(properties map[string]string) *DvObject
- func NewDvObjectWithSpecialValues(value interface{}, kind int, proto *DvObject, ...) *DvObject
- func NewObject(properties map[string]interface{}) *DvObject
- func NewObjectWithPrototype(properties map[string]interface{}, prototype *DvObject) *DvObject
- func (obj *DvObject) AssignProperties(properties map[string]interface{})
- func (obj *DvObject) CalculateExpression(b []byte) ([]byte, error)
- func (obj *DvObject) CalculateString(str string) (string, error)
- func (obj *DvObject) CalculateStringWithBrackets(b []byte, level int) (string, error)
- func (obj *DvObject) Delete(key string)
- func (obj *DvObject) DeleteAtParent(key string, level int)
- func (obj *DvObject) EvaluateAnyTypeExpression(s string) (interface{}, error)
- func (obj *DvObject) EvaluateBooleanExpression(s string) (bool, error)
- func (obj *DvObject) EvaluateStringTypeExpression(s string) (string, error)
- func (obj *DvObject) FindFirstNotEmptyString(keys []string) string
- func (obj *DvObject) Get(key string) (interface{}, bool)
- func (obj *DvObject) GetFirstString(key string) string
- func (obj *DvObject) GetInt(key string) int
- func (obj *DvObject) GetObjectType() int
- func (obj *DvObject) GetString(key string) string
- func (obj *DvObject) ReadAtParent(key string, level int) (res interface{}, ok bool)
- func (obj *DvObject) Set(key string, value interface{})
- func (obj *DvObject) SetAtParent(key string, value interface{}, level int)
- func (obj *DvObject) SetPropertiesWithPrefixFromString(prefix string, values map[string]string, options int)
- func (obj *DvObject) SetProperty(name string, value interface{})
- func (obj *DvObject) ToBoolean() bool
- func (obj *DvObject) ToNumber() float64
- func (obj *DvObject) ToNumberInt() (int64, bool)
- func (obj *DvObject) ToString() string
- type DvRoutine
- type DvScript
- type DvSpecialFunc
- type DvVariable
- func AnyStructToDvVariable(source interface{}) (*DvVariable, error)
- func AnyToDvVariable(v interface{}) *DvVariable
- func ConvertAnyToDvVariable(data interface{}) *DvVariable
- func ConvertDvFunctionToDvVariable(fn *DvFunction) *DvVariable
- func ConvertMapDvVariableToList(varMap map[string]*DvVariable) []*DvVariable
- func ConvertStringArrayToDvVariableArray(data []string) (res []*DvVariable)
- func ConvertStringMapToDvVariable(m map[string]string) *DvVariable
- func ConvertToObjectKeyPair(node *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (*DvVariable, bool, error)
- func CreateDvVariableByPathAndData(path string, data interface{}, parent *DvVariable) *DvVariable
- func DvVariableFromArray(parent *DvVariable, data []*DvVariable) *DvVariable
- func DvVariableFromInt(parent *DvVariable, data int) *DvVariable
- func DvVariableFromMap(parent *DvVariable, data map[string]*DvVariable) *DvVariable
- func DvVariableFromString(parent *DvVariable, data string) *DvVariable
- func DvVariableFromStringArray(parent *DvVariable, data []string) *DvVariable
- func DvVariableFromStringMap(parent *DvVariable, data map[string]string) *DvVariable
- func DvVariableGetNewObject() *DvVariable
- func ExecuteProcessorFunction(name string, params string, parent *DvVariable) (*DvVariable, error)
- func FindInArray(parent *DvVariable, pattern *DvVariable, fromIndex int) (*DvVariable, error)
- func FindItemByExpression(expr string, resolver ExpressionResolver, item *DvVariable, strict bool) (*DvVariable, error)
- func ProcessorFind(parent *DvVariable, params string) (*DvVariable, error)
- func QuickNumberEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
- func QuickStringEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
- func QuickVariableEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
- func RegisterMasterObject(name string, values map[string]*DvVariable, functions map[string]*DvFunction) *DvVariable
- func RegisterMasterVariable(name string, variable *DvVariable) *DvVariable
- func (field *DvVariable) AddField(item *DvVariable) bool
- func (field *DvVariable) AddStringField(key string, value string) bool
- func (item *DvVariable) AssignToSubField(field string, value string, env *DvObject) error
- func (variable *DvVariable) CleanFields(keys []string)
- func (variable *DvVariable) CleanValue()
- func (item *DvVariable) Clone() *DvVariable
- func (item *DvVariable) CloneExceptKey(other *DvVariable, deep bool) *DvVariable
- func (item *DvVariable) CloneWithKey(other *DvVariable, deep bool) *DvVariable
- func (item *DvVariable) CompareDvFieldByFields(other *DvVariable, fields []string) int
- func (item *DvVariable) CompareWholeDvField(other *DvVariable) int
- func (item *DvVariable) ContainsItemIn(v interface{}) bool
- func (item *DvVariable) ConvertSimpleValueToInterface() (interface{}, bool)
- func (item *DvVariable) ConvertValueToInterface() (interface{}, bool)
- func (variable *DvVariable) CopyFieldsFromOther(keys []string, other *DvVariable)
- func (variable *DvVariable) CopyFieldsToMap(prefix string, data map[string]interface{})
- func (item *DvVariable) CreateQuickInfoByKeys(ids []string)
- func (item *DvVariable) CreateQuickInfoForObjectType()
- func (item *DvVariable) CreateQuickInfoForSingleItemByKeys(ids []string) string
- func (item *DvVariable) DeleteChildByIndex(ind int)
- func (item *DvVariable) DvVariableToAnyStruct(result interface{}) error
- func (item *DvVariable) EvaluateDvFieldItem(expression string, env *DvObject) (bool, error)
- func (item *DvVariable) FindChildByKey(key string) (*DvVariable, bool)
- func (item *DvVariable) FindChildIndexByKey(key string) int
- func (item *DvVariable) FindDifferenceByQuickMap(other *DvVariable, fillAdded bool, fillRemoved bool, fillUpdated bool, ...) (added *DvVariable, removed *DvVariable, updated *DvVariable, ...)
- func (item *DvVariable) FindIndex(key string) int
- func (item *DvVariable) GetChildrenByRange(startIndex int, count int) *DvVariable
- func (dv *DvVariable) GetDvObjectByPrototypes() *DvObject
- func (variable *DvVariable) GetIntValue(force bool) (int, error)
- func (item *DvVariable) GetLength() int
- func (item *DvVariable) GetPrototypeByKind() *DvObject
- func (variable *DvVariable) GetStringArrayMap() (res map[string][]string)
- func (variable *DvVariable) GetStringArrayValue() []string
- func (variable *DvVariable) GetStringInterfaceMap() (res map[string]interface{})
- func (variable *DvVariable) GetStringMap() (res map[string]string)
- func (item *DvVariable) GetStringValue() string
- func (variable *DvVariable) GetStringValueAsBytes() []byte
- func (variable *DvVariable) GetStringValueJS() string
- func (item *DvVariable) GetStringValueJson() string
- func (variable *DvVariable) GetVariableArray(force bool) ([]*DvVariable, error)
- func (item *DvVariable) IndexOf(child *DvVariable) int
- func (item *DvVariable) IndexOfByKey(field []byte) int
- func (item *DvVariable) InsertAtSimplePath(path string, child *DvVariable) bool
- func (variable *DvVariable) IsEmpty() bool
- func (variable *DvVariable) JsonStringify() []byte
- func (variable *DvVariable) JsonStringifyNonEmpty() []byte
- func (item *DvVariable) MakeCopyWithNewKey(key string) *DvVariable
- func (item *DvVariable) MergeArraysByIds(other *DvVariable, ids []string, mode int)
- func (item *DvVariable) MergeAtChild(index int, child *DvVariable, mode int) bool
- func (item *DvVariable) MergeItemIntoArraysByIds(other *DvVariable, ids []string, mode int, init bool)
- func (item *DvVariable) MergeObjectIntoObject(other *DvVariable, replace bool, deep bool)
- func (item *DvVariable) MergeOtherVariable(other *DvVariable, mode int, ids []string) *DvVariable
- func (variable *DvVariable) ObjectGet(key string) (*DvVariable, error)
- func (variable *DvVariable) ObjectGetByKeys(keys []string) (*DvVariable, error)
- func (variable *DvVariable) ObjectGetByVariableDefinition(variableDefinition string) (*DvVariable, error)
- func (variable *DvVariable) ObjectInPrototypedChain(key string) *DvVariable
- func (item *DvVariable) ReadChild(childName string, resolver ExpressionResolver) (res *DvVariable, parent *DvVariable, err error)
- func (item *DvVariable) ReadChildIntArrayValue(fieldName string) (res []int, err error)
- func (item *DvVariable) ReadChildMapValue(fieldName string) map[string]string
- func (item *DvVariable) ReadChildOfAnyLevel(name string, props *DvObject) (res *DvVariable, parent *DvVariable, err error)
- func (item *DvVariable) ReadChildStringArrayValue(fieldName string) []string
- func (item *DvVariable) ReadChildStringValue(fieldName string) string
- func (item *DvVariable) ReadPath(childName string, rejectChildOfUndefined bool, env *DvObject) (*DvVariable, *DvVariable, error)
- func (item *DvVariable) ReadSimpleChild(fieldName string) *DvVariable
- func (item *DvVariable) ReadSimpleChildValue(fieldName string) string
- func (item *DvVariable) ReadSimpleString() (string, error)
- func (item *DvVariable) ReadSimpleStringList(data []string) ([]string, error)
- func (item *DvVariable) ReadSimpleStringMap(data map[string]string) error
- func (item *DvVariable) RemoveChild(child *DvVariable)
- func (variable *DvVariable) SetField(key string, value *DvVariable) int
- func (variable *DvVariable) SetSimpleValue(value string, kind int) error
- func (item *DvVariable) ToDvGrammarExpressionValue() *dvgrammar.ExpressionValue
- type DvVariable_DumpInfo
- type EvaluateBoolean
- type EvaluateResult
- func FindEndAndParse(data []byte, pos int, limit int, sequenceLimit int, ...) *EvaluateResult
- func Parse(data []byte, globalMap map[string]string, localMap map[string]string, row int, ...) (r *EvaluateResult)
- func ParseForDvObject(data []byte, params *DvObject, row int, column int, place string) *EvaluateResult
- type ExpressionResolver
- type MethodToStringConverter
- type ObjectStack
- type ProcessByteArray
- type ProcessorFunction
- type QuickSearchInfo
Constants ¶
const ( UPDATE_MODE_REPLACE = iota UPDATE_MODE_APPEND UPDATE_MODE_ADD_BY_KEYS UPDATE_MODE_MERGE UPDATE_MODE_MERGE_MIN UPDATE_MODE_MERGE_MAX UPDATE_MODE_IGNORE )
const ( COMPARE_NOT = iota COMPARE_AS_NUMBERS COMPARE_AS_INTEGERS COMPARE_AS_STRINGS )
const ( BooleanFalse = "false" BooleanTrue = "true" )
const ( ConversionOptionJSLike = 0 ConversionOptionSimpleLike = 1 ConversionOptionJsonLike = 2 )
const ( FUNCTION_KIND_ARROW = iota FUNCTION_KIND_NORMAL )
const ( FIELD_UNDEFINED = iota FIELD_NULL FIELD_NUMBER FIELD_BOOLEAN FIELD_STRING FIELD_OBJECT FIELD_ARRAY FIELD_FUNCTION )
const (
EXPRESSION_RESOLVER_CACHE = 1 << iota
)
const LENGTH_PROPERTY = "length"
const MapKeySeparator = "~^~!~"
const MaxInt = int64(^uint(0) >> 1)
const (
TransformUpperCase = 1
)
Variables ¶
var BracketProcessors = map[string]dvgrammar.BracketOperatorVisitor{ "(": ParentheseNoParentProcessor, "*(": ParentheseParentProcessor, "[": SquareBracketNoParentProcessor, "*[": SquareBracketParentProcessor, "{": CurlyBraceNoParentProcessor, "*{": CurlyBraceParentProcessor, }
var CalculatorOperators = map[string]dvgrammar.InterOperatorVisitor{ "+": ProcessorPlus, "-": ProcessorMinus, "*": ProcessorMultiply, "/": ProcessorDivision, "%": ProcessorPercent, "&": ProcessorBoolAnd, "|": ProcessorBoolOr, "^": ProcessorBoolXor, "**": ProcessorPower, "||": ProcessorBooleanOr, "&&": ProcessorBooleanAnd, "??": ProcessorBooleanOrNullable, "<<": ProcessorLeftShift, ">>>": ProcessorLogicalRightShift, ">>": ProcessorRightShift, "===": ProcessorEqualExact, "!==": ProcessorNotEqualExact, "==": ProcessorEqual, "!=": ProcessorNotEqual, ">": ProcessorGreaterThan, ">=": ProcessorGreaterEqual, "<": ProcessorLessThan, "<=": ProcessorLessEqual, "IN": ProcessorContainsIn, ":": ProcessorColon, "?": ProcessorQuestion, "=": ProcessorAssign, "+=": ProcessorPlusAssign, "-=": ProcessorMinusAssign, "*=": ProcessorMultiplyAssign, "/=": ProcessorDivisionAssign, "%=": ProcessorPercentAssign, "&=": ProcessorBoolAndAssign, "|=": ProcessorBoolOrAssign, "^=": ProcessorBoolXorAssign, "**=": ProcessorPowerAssign, "||=": ProcessorBooleanOrAssign, "&&=": ProcessorBooleanAndAssign, "??=": ProcessorBooleanOrNullableAssign, "<<=": ProcessorLeftShiftAssign, ">>>=": ProcessorLogicalRightShiftAssign, ">>=": ProcessorRightShiftAssign, "in": ProcessorInInsideFor, "of": ProcessorOfInsideFor, "else": ProcessorElseInsideIf, }
var CalculatorPostUnaryMap = map[string]dvgrammar.UnaryVisitor{ "++": PostPlusPlusOperator, "--": PostMinusMinusOperator, }
var CalculatorRules = &dvgrammar.GrammarRuleDefinitions{ Visitors: CalculatorOperators, BracketVisitor: BracketProcessors, LanguageOperator: LanguageOperatorMap, DataGetter: CalculatorDataGetter, EvaluateOptions: 0, UnaryPreVisitors: CalculatorUnaryMap, UnaryPostVisitors: CalculatorPostUnaryMap, }
var CalculatorUnaryMap = map[string]dvgrammar.UnaryVisitor{ "!": LogicalNotOperator, "~": BitwiseNotOperator, "+": UnaryPlusOperator, "-": UnaryMinusOperator, "++": PrePlusPlusOperator, "--": PreMinusMinusOperator, }
var GlobalFunctionPool = make(map[string]interface{})
var GlobalFunctionPrototype = NewObject(GlobalFunctionPool)
var LanguageOperatorMap = map[string]dvgrammar.LanguageOperatorVisitor{ "return": ReturnOperator, "break": BreakOperator, "continue": ContinueOperator, "=>": ArrowFunctionOperator, "for": ForCycleOperator, "if": IfClauseOperator, "delete": DeleteOperator, }
var LogicalOperators = map[string]dvgrammar.InterOperatorVisitor{ "||": ProcessorBooleanOr, "&&": ProcessorBooleanAnd, }
var LogicalRules = &dvgrammar.GrammarRuleDefinitions{ BaseGrammar: dvgrammar.LogicalGrammarBaseDefinition, Visitors: LogicalOperators, DataGetter: LogicalDataGetter, EvaluateOptions: 0, UnaryPreVisitors: LogicalUnaryMap, }
var LogicalUnaryMap = map[string]dvgrammar.UnaryVisitor{ "!": LogicalNotOperator, }
var ProcessorFunctions = map[string]ProcessorFunction{ "find": ProcessorFind, }
Functions ¶
func AddListToGlobalFunctionPool ¶ added in v1.0.2
func AddListToGlobalFunctionPool(properties []*DvVariable)
func AddToGlobalFunctionPool ¶
func AddToGlobalFunctionPool(properties map[string]interface{})
func AnyCompareAnyWithTypes ¶
returns 1-greater, -1-lesser, 0-equal, -2 not applied
func AnyGetType ¶
func AnyGetType(v interface{}) int
func AnyToBoolean ¶
func AnyToBoolean(v interface{}) bool
func AnyToByteArray ¶ added in v1.0.2
func AnyToByteArray(v interface{}) []byte
func AnyToDvGrammarExpressionValue ¶ added in v1.0.2
func AnyToDvGrammarExpressionValue(v interface{}) *dvgrammar.ExpressionValue
func AnyToNumber ¶
func AnyToNumber(v interface{}) float64
func AnyToNumberInt ¶
func AnyToString ¶
func AnyToString(v interface{}) string
func AnyToStringWithOptions ¶ added in v1.0.2
func AnyWithTypeToBoolean ¶
func AnyWithTypeToNumber ¶
func AnyWithTypeToNumberInt ¶
func AnyWithTypeToString ¶
func ApplyDvFunction ¶
func ApplyDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
func ArrowFunctionOperator ¶ added in v1.0.2
func ArrowFunctionOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func AssignArrayStringToVariable ¶
func AssignArrayStringToVariable(parent *DvVariable, variableDefinition string, data []string, force bool) error
func AssignIntToVariable ¶
func AssignIntToVariable(parent *DvVariable, variableDefinition string, data int, force bool) error
func AssignVariable ¶
func AssignVariable(parent *DvVariable, keys []string, value interface{}, force bool) error
func AssignVariableByKey ¶ added in v1.0.2
func AssignVariableByKey(parent *DvVariable, key string, value interface{}, force bool) error
func AssignVariableDirect ¶
func AssignVariableDirect(parent *DvVariable, val interface{}) error
func AssignVariableToVariable ¶
func AssignVariableToVariable(parent *DvVariable, variableDefinition string, data interface{}, force bool) error
func BindDvFunction ¶
func BindDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
func BitwiseNotOperator ¶
func BitwiseNotOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func BreakOperator ¶ added in v1.0.2
func BreakOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func CalculateAllNodeParams ¶ added in v1.0.2
func CalculateAllNodeParams(args []*dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) ([]interface{}, error)
func CalculateDefined ¶
func CalculateDefined(data []byte, scope dvgrammar.ScopeInterface, reference *dvgrammar.SourceReference, visitorOptions int) (*dvgrammar.ExpressionValue, error)
func CalculateTernaryOperator ¶ added in v1.0.2
func CalculateTernaryOperator(condNode, node1, node2 *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
func CalculatorDataGetter ¶
func CalculatorDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
func CalculatorEvaluator ¶
func CalculatorEvaluator(data []byte, scope dvgrammar.ScopeInterface, reference *dvgrammar.SourceReference, visitorOptions int) (*dvgrammar.ExpressionValue, error)
func CallDvFunction ¶
func CallDvFunction(context *dvgrammar.ExpressionContext, self interface{}, args []interface{}) (interface{}, error)
func CollectJsonVariables ¶ added in v1.0.2
func CollectValueByKey ¶ added in v1.0.2
func CollectValuesByMap ¶ added in v1.0.2
func CollectVariablesByAnyMap ¶ added in v1.0.2
func CollectVariablesByStringMap ¶ added in v1.0.2
func CompareAsIntegers ¶
func CompareAsIntegers(value1 interface{}, value2 interface{}) int
func CompareAsNumbers ¶
func CompareAsNumbers(value1 interface{}, value2 interface{}) int
func CompareAsStrings ¶
func CompareAsStrings(value1 interface{}, value2 interface{}) int
func CompareByComparisonType ¶
func ContainInProcess ¶ added in v1.0.2
func ContainInProcess(contained interface{}, containing interface{}) bool
func ContinueOperator ¶ added in v1.0.2
func ContinueOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func ConvertAnyTypeToJson ¶ added in v1.0.2
func ConvertAnyTypeToJsonString ¶ added in v1.0.2
func ConvertAnyTypeToJsonString(data interface{}) string
func ConvertByteArrayToIntOrDouble ¶ added in v1.0.2
func ConvertDvFieldInfoToProperties ¶ added in v1.0.2
func ConvertDvFieldInfoToProperties(item *DvVariable, index int) map[string]interface{}
func ConvertInt64ToBuf ¶ added in v1.0.2
func ConvertIntToBuf ¶ added in v1.0.2
func ConvertInterfaceListToStringList ¶ added in v1.0.2
func ConvertInterfaceListsMapToStringListsMap ¶ added in v1.0.2
func ConvertInterfaceListsToStringLists ¶ added in v1.0.2
func ConvertSimpleKindAndValueToInterface ¶ added in v1.0.2
func ConvertSimpleTypeToBuf ¶ added in v1.0.2
func ConvertSimpleTypeToString ¶ added in v1.0.2
func ConvertStringArrayToInterfaceArray ¶ added in v1.0.2
func ConvertStringArrayToInterfaceArray(data []string) (res []interface{})
func ConvertStringMapToDvVariableMap ¶
func ConvertStringMapToDvVariableMap(data map[string]string) (res map[string]*DvVariable)
func ConvertUnsignedInt64ToBuf ¶ added in v1.0.2
func ConvertUnsignedIntToBuf ¶ added in v1.0.2
func CreateFunctionContainer ¶ added in v1.0.2
func CurlyBraceNoParentProcessor ¶ added in v1.0.2
func CurlyBraceNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func CurlyBraceParentProcessor ¶ added in v1.0.2
func CurlyBraceParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func DeleteOperator ¶ added in v1.0.2
func DeleteOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func DeleteVariable ¶
func DeleteVariable(parent *DvVariable, keys []string, silent bool) error
func ExecFunction ¶
func ExecFunction(context *dvgrammar.ExpressionContext, fn interface{}, self interface{}, arguments []interface{}) (interface{}, error)
func ExecuteAnyFunction ¶ added in v1.0.2
func ExecuteAnyFunction(context *dvgrammar.ExpressionContext, fn interface{}, thisArg interface{}, args []interface{}) (value interface{}, err error)
func ExecuteCycleCommon ¶ added in v1.0.2
func ExecuteCycleInOf ¶ added in v1.0.2
func ExecuteIfClauseCommon ¶ added in v1.0.2
func ExpressionEvaluation ¶ added in v1.0.2
func ExpressionEvaluation(expr string, resolver ExpressionResolver) (string, error)
func ExtractPureName ¶ added in v1.0.2
func ForCycleOperator ¶ added in v1.0.2
func ForCycleOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func FunctionApply ¶
func FunctionApply(context *dvgrammar.ExpressionContext, thisVariable interface{}, params []interface{}) (interface{}, error)
func FunctionBind ¶
func FunctionBind(context *dvgrammar.ExpressionContext, thisVariable interface{}, params []interface{}) (interface{}, error)
func FunctionCall ¶
func FunctionCall(context *dvgrammar.ExpressionContext, thisVariable interface{}, params []interface{}) (interface{}, error)
func GetBooleanValue ¶ added in v1.0.2
func GetChildrenOfAnyByRange ¶ added in v1.0.2
func GetColumnSubNodes ¶ added in v1.0.2
func GetDvFunctionArguments ¶
func GetEscapedString ¶
func GetExpressionValueChild ¶ added in v1.0.2
func GetExpressionValueChild(value *dvgrammar.ExpressionValue, index *dvgrammar.ExpressionValue, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
func GetExpressionValueRange ¶ added in v1.0.2
func GetExpressionValueRange(value *dvgrammar.ExpressionValue, indexFrom int, indexTo int) (*dvgrammar.ExpressionValue, error)
func GetFunctionCodeList ¶ added in v1.0.2
func GetFunctionObjectVariable ¶ added in v1.0.2
func GetFunctionObjectVariable(fn *DvFunction, selfVal *dvgrammar.ExpressionValue, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
func GetFunctionParameterList ¶ added in v1.0.2
func GetIntFromVariable ¶
func GetIntFromVariable(parent *DvVariable, variableDefinition string, force bool) (res int, err error)
func GetIntFromVariableAndIncrementAfter ¶
func GetIntFromVariableAndIncrementAfter(parent *DvVariable, variableDefinition string, force bool) (res int, err error)
func GetLatestKeyInJsonPath ¶ added in v1.0.2
func GetLeftestQuestionNode ¶ added in v1.0.2
func GetLengthOfAny ¶ added in v1.0.2
func GetLengthOfAny(v interface{}) int
func GetNumberKindFromString ¶
func GetStringAtChar ¶ added in v1.0.2
func GetStringAtChar(s string, index int) *dvgrammar.ExpressionValue
func GetStringFromVariable ¶
func GetStringFromVariable(parent *DvVariable, variableDefinition string, force bool) (res string, err error)
func GetVariableByDefinition ¶
func GetVariableByDefinition(parent *DvVariable, variableDefinition string) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error, keys []string)
func GetVariableByKeys ¶
func GetVariableByKeys(parent *DvVariable, keys []string, silent bool) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error)
func IfClauseOperator ¶ added in v1.0.2
func IfClauseOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func IsFunction ¶
func IsFunction(v interface{}) bool
func IsNotNullish ¶ added in v1.0.2
func IsNotNullish(v interface{}) bool
func IsSimpleJsonPath ¶ added in v1.0.2
func LogicalDataGetter ¶
func LogicalDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
func LogicalNotOperator ¶
func LogicalNotOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func MatchDvFieldInfo ¶ added in v1.0.2
func MatchDvFieldInfo(model *DvVariable, pattern *DvVariable) bool
func MeetItemExpression ¶ added in v1.0.2
func MeetItemExpression(expr string, item *DvVariable, resolver ExpressionResolver, options int, index int) (bool, error)
func ModifySimpleValueAfterGet ¶
func ModifySimpleValueAfterGet(thisVal *DvVariable, child *DvVariable, prototyped bool, value string, tp int, keys []string) error
func NumberToInt ¶
func ParentheseNoParentProcessor ¶ added in v1.0.2
func ParentheseNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func ParentheseParentProcessor ¶ added in v1.0.2
func ParentheseParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func ParseForDvObjectShort ¶ added in v1.0.2
func ParseForDvObjectString ¶ added in v1.0.2
func PostMinusMinusOperator ¶
func PostMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func PostPlusPlusOperator ¶
func PostPlusPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func PreMinusMinusOperator ¶
func PreMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func PrePlusPlusOperator ¶
func PrePlusPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func ProcessorAssign ¶ added in v1.0.2
func ProcessorAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolAnd ¶
func ProcessorBoolAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolAndAssign ¶ added in v1.0.2
func ProcessorBoolAndAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolOr ¶
func ProcessorBoolOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolOrAssign ¶ added in v1.0.2
func ProcessorBoolOrAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolXor ¶
func ProcessorBoolXor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBoolXorAssign ¶ added in v1.0.2
func ProcessorBoolXorAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBooleanAnd ¶
func ProcessorBooleanAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (res *dvgrammar.ExpressionValue, err error)
func ProcessorBooleanAndAssign ¶ added in v1.0.2
func ProcessorBooleanAndAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBooleanOr ¶
func ProcessorBooleanOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (res *dvgrammar.ExpressionValue, err error)
func ProcessorBooleanOrAssign ¶ added in v1.0.2
func ProcessorBooleanOrAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorBooleanOrNullable ¶ added in v1.0.2
func ProcessorBooleanOrNullable(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (res *dvgrammar.ExpressionValue, err error)
func ProcessorBooleanOrNullableAssign ¶ added in v1.0.2
func ProcessorBooleanOrNullableAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorColon ¶ added in v1.0.2
func ProcessorColon(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorContainsIn ¶ added in v1.0.2
func ProcessorContainsIn(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorDivision ¶
func ProcessorDivision(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorDivisionAssign ¶ added in v1.0.2
func ProcessorDivisionAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorElseInsideIf ¶ added in v1.0.2
func ProcessorElseInsideIf(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorEqual ¶
func ProcessorEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorEqualExact ¶
func ProcessorEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorGreaterEqual ¶
func ProcessorGreaterEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorGreaterThan ¶
func ProcessorGreaterThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorInInsideFor ¶ added in v1.0.2
func ProcessorInInsideFor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLeftShift ¶
func ProcessorLeftShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLeftShiftAssign ¶ added in v1.0.2
func ProcessorLeftShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLessEqual ¶
func ProcessorLessEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLessThan ¶
func ProcessorLessThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLogicalRightShift ¶
func ProcessorLogicalRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorLogicalRightShiftAssign ¶ added in v1.0.2
func ProcessorLogicalRightShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorMinus ¶
func ProcessorMinus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorMinusAssign ¶ added in v1.0.2
func ProcessorMinusAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorMultiply ¶
func ProcessorMultiply(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorMultiplyAssign ¶ added in v1.0.2
func ProcessorMultiplyAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorNotEqual ¶
func ProcessorNotEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorNotEqualExact ¶
func ProcessorNotEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorOfInsideFor ¶ added in v1.0.2
func ProcessorOfInsideFor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPercent ¶
func ProcessorPercent(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPercentAssign ¶ added in v1.0.2
func ProcessorPercentAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPlus ¶
func ProcessorPlus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPlusAssign ¶ added in v1.0.2
func ProcessorPlusAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPower ¶
func ProcessorPower(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorPowerAssign ¶ added in v1.0.2
func ProcessorPowerAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorQuestion ¶ added in v1.0.2
func ProcessorQuestion(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorRightShift ¶
func ProcessorRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProcessorRightShiftAssign ¶ added in v1.0.2
func ProcessorRightShiftAssign(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)
func ProvideRootValues ¶ added in v1.0.2
func ProvideRootValues(env *DvObject)
func PutVariablesInScope ¶ added in v1.0.2
func PutVariablesInScope(params []string, args []interface{}, context *dvgrammar.ExpressionContext) error
func QuickVariableArrayEvaluation ¶
func QuickVariableArrayEvaluation(parent *DvVariable, data []string) (res []interface{}, err error)
func RefillDvGrammarTypePrototyper ¶ added in v1.0.2
func RefillDvGrammarTypePrototyper()
func RefillDvVariableTypePrototyper ¶ added in v1.0.2
func RefillDvVariableTypePrototyper()
func RegisterContainInProcessor ¶ added in v1.0.2
func RegisterContainInProcessor(fn ContainInProcessor)
func RegisterJsonFullParser ¶ added in v1.0.2
func RegisterJsonFullParser(fn ProcessByteArray) bool
func RegisterToStringConverter ¶ added in v1.0.2
func RegisterToStringConverter(converter MethodToStringConverter)
func RemoveAnyVariable ¶ added in v1.0.2
func ReturnOperator ¶ added in v1.0.2
func ReturnOperator(tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (int, *dvgrammar.ExpressionValue, error)
func SetNodeValue ¶
func SetNodeValue(tree *dvgrammar.BuildNode, v interface{}, dataType int, context *dvgrammar.ExpressionContext, lastVarName string, lastParent *dvgrammar.ExpressionValue) error
func SquareBracketNoParentProcessor ¶ added in v1.0.2
func SquareBracketNoParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func SquareBracketParentProcessor ¶ added in v1.0.2
func SquareBracketParentProcessor(parent *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, rest []*dvgrammar.BuildNode) (value *dvgrammar.ExpressionValue, parentValue *dvgrammar.ExpressionValue, toStop bool, err error, noNextParent bool)
func StringToAny ¶
func StringToAny(v string) interface{}
func StringToNumber ¶
func UnaryMinusOperator ¶
func UnaryMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func UnaryPlusOperator ¶
func UnaryPlusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string, lastVarName string, lastParent *dvgrammar.ExpressionValue) (*dvgrammar.ExpressionValue, error)
func UpdateAnyVariables ¶ added in v1.0.2
func ValidateNumber ¶
Types ¶
type ContainInProcessor ¶ added in v1.0.2
type CustomJsFunction ¶ added in v1.0.2
type DvContext ¶
type DvContext struct {
// contains filtered or unexported fields
}
func (*DvContext) CurrentRoutineCallBreak ¶
func (*DvContext) CurrentRoutineCallExecute ¶
func (*DvContext) CurrentRoutineCallShift ¶
func (*DvContext) DumpContextMemory ¶
func (context *DvContext) DumpContextMemory()
func (*DvContext) ExecuteCurrentRoutine ¶
func (*DvContext) ExecuteRoutine ¶
func (*DvContext) ExecuteRoutines ¶
func (*DvContext) FunctionCallByKeys ¶
func (context *DvContext) FunctionCallByKeys(variable *DvVariable, keys []string, params []interface{}, thisVariable *DvVariable) (interface{}, error)
func (*DvContext) FunctionCallByVariableDefinition ¶
func (context *DvContext) FunctionCallByVariableDefinition(variable *DvVariable, variableDefinition string, params []interface{}, thisVariable *DvVariable) (interface{}, error)
func (*DvContext) FunctionCallByVariableDefinitionWithStringParams ¶
func (context *DvContext) FunctionCallByVariableDefinitionWithStringParams(variable *DvVariable, variableDefinition string, params []string, thisVariable *DvVariable) (interface{}, error)
func (*DvContext) RoutineCallExecute ¶
type DvFunc ¶
type DvFunc func(*dvgrammar.ExpressionContext, interface{}, []interface{}) (interface{}, error)
type DvFunction ¶
type DvFunction struct { Name string Args []string Fn DvFunc FnSpecial DvSpecialFunc Immediate bool Special bool }
func (*DvFunction) ToString ¶
func (fn *DvFunction) ToString() string
type DvFunctionObject ¶ added in v1.0.2
type DvFunctionObject struct { SelfRef interface{} Context *dvgrammar.ExpressionContext Executor *DvFunction }
func (*DvFunctionObject) ExecuteDvFunctionWithTreeArguments ¶ added in v1.0.2
func (fn *DvFunctionObject) ExecuteDvFunctionWithTreeArguments(args []interface{}, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)
type DvObject ¶
type DvObject struct { Value interface{} Options int Properties map[string]interface{} Prototype *DvObject }
var DvFunctionPrototype *DvObject
func GetFunctionPrototypeFromMasterVariable ¶ added in v1.0.2
func GetPrototypeForDvGrammarExpressionValue ¶ added in v1.0.2
func GetPrototypeForDvGrammarExpressionValue(value *dvgrammar.ExpressionValue) *DvObject
func NewDvObjectFrom2Maps ¶
func NewObjectWithPrototype ¶
func (*DvObject) AssignProperties ¶
func (*DvObject) CalculateExpression ¶
func (*DvObject) CalculateStringWithBrackets ¶
func (*DvObject) DeleteAtParent ¶ added in v1.0.2
func (*DvObject) EvaluateAnyTypeExpression ¶ added in v1.0.2
func (*DvObject) EvaluateBooleanExpression ¶ added in v1.0.2
func (*DvObject) EvaluateStringTypeExpression ¶ added in v1.0.2
func (*DvObject) FindFirstNotEmptyString ¶ added in v1.0.2
func (*DvObject) GetFirstString ¶ added in v1.0.2
func (*DvObject) GetObjectType ¶
func (*DvObject) ReadAtParent ¶ added in v1.0.2
func (*DvObject) SetAtParent ¶ added in v1.0.2
func (*DvObject) SetPropertiesWithPrefixFromString ¶ added in v1.0.2
func (*DvObject) SetProperty ¶
func (*DvObject) ToNumberInt ¶
type DvScript ¶
type DvScript struct {
// contains filtered or unexported fields
}
func ParseScripts ¶
func (*DvScript) AddRoutines ¶
func (*DvScript) GetNewContext ¶
func (*DvScript) VerifyRoutines ¶
type DvSpecialFunc ¶ added in v1.0.2
type DvSpecialFunc func([]*dvgrammar.BuildNode, *dvgrammar.ExpressionContext, []*dvgrammar.BuildNode) (*dvgrammar.ExpressionValue, bool, error)
type DvVariable ¶
type DvVariable struct { Name []byte Value []byte Kind int Fields []*DvVariable Extra interface{} Prototype *DvVariable QuickSearch *QuickSearchInfo }
var ArrayMaster *DvVariable = RegisterMasterVariable("Array", &DvVariable{Kind: FIELD_OBJECT})
var FunctionMaster *DvVariable = RegisterMasterVariable("Function", &DvVariable{ Fields: make([]*DvVariable, 0, 7), Kind: FIELD_OBJECT, Prototype: &DvVariable{ Fields: []*DvVariable{ { Name: []byte("call"), Kind: FIELD_FUNCTION, Extra: &DvFunction{ Fn: FunctionCall, }, }, { Name: []byte("apply"), Kind: FIELD_FUNCTION, Extra: &DvFunction{ Fn: FunctionApply, }, }, { Name: []byte("bind"), Kind: FIELD_FUNCTION, Extra: &DvFunction{ Fn: FunctionBind, }, }, }, Kind: FIELD_OBJECT, }, })
var ObjectMaster *DvVariable = RegisterMasterVariable("Object", &DvVariable{Kind: FIELD_OBJECT})
var RegExpMaster *DvVariable = RegisterMasterVariable("RegExp", &DvVariable{Kind: FIELD_OBJECT})
var StringMaster *DvVariable = RegisterMasterVariable("String", &DvVariable{Kind: FIELD_OBJECT})
var WindowMaster *DvVariable = RegisterMasterVariable("window", &DvVariable{Kind: FIELD_OBJECT})
func AnyStructToDvVariable ¶ added in v1.0.2
func AnyStructToDvVariable(source interface{}) (*DvVariable, error)
func AnyToDvVariable ¶ added in v1.0.2
func AnyToDvVariable(v interface{}) *DvVariable
func ConvertAnyToDvVariable ¶ added in v1.0.2
func ConvertAnyToDvVariable(data interface{}) *DvVariable
func ConvertDvFunctionToDvVariable ¶
func ConvertDvFunctionToDvVariable(fn *DvFunction) *DvVariable
func ConvertMapDvVariableToList ¶ added in v1.0.2
func ConvertMapDvVariableToList(varMap map[string]*DvVariable) []*DvVariable
func ConvertStringArrayToDvVariableArray ¶
func ConvertStringArrayToDvVariableArray(data []string) (res []*DvVariable)
func ConvertStringMapToDvVariable ¶ added in v1.0.2
func ConvertStringMapToDvVariable(m map[string]string) *DvVariable
func ConvertToObjectKeyPair ¶ added in v1.0.2
func ConvertToObjectKeyPair(node *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext) (*DvVariable, bool, error)
func CreateDvVariableByPathAndData ¶ added in v1.0.2
func CreateDvVariableByPathAndData(path string, data interface{}, parent *DvVariable) *DvVariable
func DvVariableFromArray ¶
func DvVariableFromArray(parent *DvVariable, data []*DvVariable) *DvVariable
func DvVariableFromInt ¶
func DvVariableFromInt(parent *DvVariable, data int) *DvVariable
func DvVariableFromMap ¶
func DvVariableFromMap(parent *DvVariable, data map[string]*DvVariable) *DvVariable
func DvVariableFromString ¶
func DvVariableFromString(parent *DvVariable, data string) *DvVariable
func DvVariableFromStringArray ¶
func DvVariableFromStringArray(parent *DvVariable, data []string) *DvVariable
func DvVariableFromStringMap ¶
func DvVariableFromStringMap(parent *DvVariable, data map[string]string) *DvVariable
func DvVariableGetNewObject ¶
func DvVariableGetNewObject() *DvVariable
func ExecuteProcessorFunction ¶ added in v1.0.2
func ExecuteProcessorFunction(name string, params string, parent *DvVariable) (*DvVariable, error)
func FindInArray ¶ added in v1.0.2
func FindInArray(parent *DvVariable, pattern *DvVariable, fromIndex int) (*DvVariable, error)
func FindItemByExpression ¶ added in v1.0.2
func FindItemByExpression(expr string, resolver ExpressionResolver, item *DvVariable, strict bool) (*DvVariable, error)
func ProcessorFind ¶ added in v1.0.2
func ProcessorFind(parent *DvVariable, params string) (*DvVariable, error)
func QuickNumberEvaluation ¶
func QuickNumberEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
func QuickStringEvaluation ¶
func QuickStringEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
func QuickVariableEvaluation ¶
func QuickVariableEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)
func RegisterMasterObject ¶
func RegisterMasterObject(name string, values map[string]*DvVariable, functions map[string]*DvFunction) *DvVariable
func RegisterMasterVariable ¶
func RegisterMasterVariable(name string, variable *DvVariable) *DvVariable
func (*DvVariable) AddField ¶ added in v1.0.2
func (field *DvVariable) AddField(item *DvVariable) bool
func (*DvVariable) AddStringField ¶ added in v1.0.2
func (field *DvVariable) AddStringField(key string, value string) bool
func (*DvVariable) AssignToSubField ¶ added in v1.0.2
func (item *DvVariable) AssignToSubField(field string, value string, env *DvObject) error
func (*DvVariable) CleanFields ¶ added in v1.0.2
func (variable *DvVariable) CleanFields(keys []string)
func (*DvVariable) CleanValue ¶ added in v1.0.2
func (variable *DvVariable) CleanValue()
func (*DvVariable) Clone ¶ added in v1.0.2
func (item *DvVariable) Clone() *DvVariable
func (*DvVariable) CloneExceptKey ¶ added in v1.0.2
func (item *DvVariable) CloneExceptKey(other *DvVariable, deep bool) *DvVariable
func (*DvVariable) CloneWithKey ¶ added in v1.0.2
func (item *DvVariable) CloneWithKey(other *DvVariable, deep bool) *DvVariable
func (*DvVariable) CompareDvFieldByFields ¶ added in v1.0.2
func (item *DvVariable) CompareDvFieldByFields(other *DvVariable, fields []string) int
func (*DvVariable) CompareWholeDvField ¶ added in v1.0.2
func (item *DvVariable) CompareWholeDvField(other *DvVariable) int
func (*DvVariable) ContainsItemIn ¶ added in v1.0.2
func (item *DvVariable) ContainsItemIn(v interface{}) bool
func (*DvVariable) ConvertSimpleValueToInterface ¶ added in v1.0.2
func (item *DvVariable) ConvertSimpleValueToInterface() (interface{}, bool)
func (*DvVariable) ConvertValueToInterface ¶ added in v1.0.2
func (item *DvVariable) ConvertValueToInterface() (interface{}, bool)
func (*DvVariable) CopyFieldsFromOther ¶ added in v1.0.2
func (variable *DvVariable) CopyFieldsFromOther(keys []string, other *DvVariable)
func (*DvVariable) CopyFieldsToMap ¶ added in v1.0.2
func (variable *DvVariable) CopyFieldsToMap(prefix string, data map[string]interface{})
func (*DvVariable) CreateQuickInfoByKeys ¶ added in v1.0.2
func (item *DvVariable) CreateQuickInfoByKeys(ids []string)
func (*DvVariable) CreateQuickInfoForObjectType ¶ added in v1.0.2
func (item *DvVariable) CreateQuickInfoForObjectType()
func (*DvVariable) CreateQuickInfoForSingleItemByKeys ¶ added in v1.0.2
func (item *DvVariable) CreateQuickInfoForSingleItemByKeys(ids []string) string
func (*DvVariable) DeleteChildByIndex ¶ added in v1.0.2
func (item *DvVariable) DeleteChildByIndex(ind int)
func (*DvVariable) DvVariableToAnyStruct ¶ added in v1.0.2
func (item *DvVariable) DvVariableToAnyStruct(result interface{}) error
func (*DvVariable) EvaluateDvFieldItem ¶ added in v1.0.2
func (item *DvVariable) EvaluateDvFieldItem(expression string, env *DvObject) (bool, error)
func (*DvVariable) FindChildByKey ¶ added in v1.0.2
func (item *DvVariable) FindChildByKey(key string) (*DvVariable, bool)
func (*DvVariable) FindChildIndexByKey ¶ added in v1.0.2
func (item *DvVariable) FindChildIndexByKey(key string) int
func (*DvVariable) FindDifferenceByQuickMap ¶ added in v1.0.2
func (item *DvVariable) FindDifferenceByQuickMap(other *DvVariable, fillAdded bool, fillRemoved bool, fillUpdated bool, fillUnchanged bool, fillUpdatedCounterpart bool, unchangedAsUpdated bool, useIndex bool) (added *DvVariable, removed *DvVariable, updated *DvVariable, unchanged *DvVariable, counterparts *DvVariable)
func (*DvVariable) FindIndex ¶ added in v1.0.2
func (item *DvVariable) FindIndex(key string) int
func (*DvVariable) GetChildrenByRange ¶ added in v1.0.2
func (item *DvVariable) GetChildrenByRange(startIndex int, count int) *DvVariable
func (*DvVariable) GetDvObjectByPrototypes ¶ added in v1.0.2
func (dv *DvVariable) GetDvObjectByPrototypes() *DvObject
func (*DvVariable) GetIntValue ¶
func (variable *DvVariable) GetIntValue(force bool) (int, error)
func (*DvVariable) GetLength ¶ added in v1.0.2
func (item *DvVariable) GetLength() int
func (*DvVariable) GetPrototypeByKind ¶ added in v1.0.2
func (item *DvVariable) GetPrototypeByKind() *DvObject
func (*DvVariable) GetStringArrayMap ¶
func (variable *DvVariable) GetStringArrayMap() (res map[string][]string)
func (*DvVariable) GetStringArrayValue ¶
func (variable *DvVariable) GetStringArrayValue() []string
func (*DvVariable) GetStringInterfaceMap ¶ added in v1.0.2
func (variable *DvVariable) GetStringInterfaceMap() (res map[string]interface{})
func (*DvVariable) GetStringMap ¶
func (variable *DvVariable) GetStringMap() (res map[string]string)
func (*DvVariable) GetStringValue ¶
func (item *DvVariable) GetStringValue() string
func (*DvVariable) GetStringValueAsBytes ¶
func (variable *DvVariable) GetStringValueAsBytes() []byte
func (*DvVariable) GetStringValueJS ¶ added in v1.0.2
func (variable *DvVariable) GetStringValueJS() string
func (*DvVariable) GetStringValueJson ¶ added in v1.0.2
func (item *DvVariable) GetStringValueJson() string
func (*DvVariable) GetVariableArray ¶
func (variable *DvVariable) GetVariableArray(force bool) ([]*DvVariable, error)
func (*DvVariable) IndexOf ¶ added in v1.0.2
func (item *DvVariable) IndexOf(child *DvVariable) int
func (*DvVariable) IndexOfByKey ¶ added in v1.0.2
func (item *DvVariable) IndexOfByKey(field []byte) int
func (*DvVariable) InsertAtSimplePath ¶ added in v1.0.2
func (item *DvVariable) InsertAtSimplePath(path string, child *DvVariable) bool
func (*DvVariable) IsEmpty ¶ added in v1.0.2
func (variable *DvVariable) IsEmpty() bool
func (*DvVariable) JsonStringify ¶
func (variable *DvVariable) JsonStringify() []byte
func (*DvVariable) JsonStringifyNonEmpty ¶
func (variable *DvVariable) JsonStringifyNonEmpty() []byte
func (*DvVariable) MakeCopyWithNewKey ¶ added in v1.0.2
func (item *DvVariable) MakeCopyWithNewKey(key string) *DvVariable
func (*DvVariable) MergeArraysByIds ¶ added in v1.0.2
func (item *DvVariable) MergeArraysByIds(other *DvVariable, ids []string, mode int)
func (*DvVariable) MergeAtChild ¶ added in v1.0.2
func (item *DvVariable) MergeAtChild(index int, child *DvVariable, mode int) bool
func (*DvVariable) MergeItemIntoArraysByIds ¶ added in v1.0.2
func (item *DvVariable) MergeItemIntoArraysByIds(other *DvVariable, ids []string, mode int, init bool)
func (*DvVariable) MergeObjectIntoObject ¶ added in v1.0.2
func (item *DvVariable) MergeObjectIntoObject(other *DvVariable, replace bool, deep bool)
func (*DvVariable) MergeOtherVariable ¶ added in v1.0.2
func (item *DvVariable) MergeOtherVariable(other *DvVariable, mode int, ids []string) *DvVariable
func (*DvVariable) ObjectGet ¶
func (variable *DvVariable) ObjectGet(key string) (*DvVariable, error)
func (*DvVariable) ObjectGetByKeys ¶
func (variable *DvVariable) ObjectGetByKeys(keys []string) (*DvVariable, error)
func (*DvVariable) ObjectGetByVariableDefinition ¶
func (variable *DvVariable) ObjectGetByVariableDefinition(variableDefinition string) (*DvVariable, error)
func (*DvVariable) ObjectInPrototypedChain ¶
func (variable *DvVariable) ObjectInPrototypedChain(key string) *DvVariable
func (*DvVariable) ReadChild ¶ added in v1.0.2
func (item *DvVariable) ReadChild(childName string, resolver ExpressionResolver) (res *DvVariable, parent *DvVariable, err error)
func (*DvVariable) ReadChildIntArrayValue ¶ added in v1.0.2
func (item *DvVariable) ReadChildIntArrayValue(fieldName string) (res []int, err error)
func (*DvVariable) ReadChildMapValue ¶ added in v1.0.2
func (item *DvVariable) ReadChildMapValue(fieldName string) map[string]string
func (*DvVariable) ReadChildOfAnyLevel ¶ added in v1.0.2
func (item *DvVariable) ReadChildOfAnyLevel(name string, props *DvObject) (res *DvVariable, parent *DvVariable, err error)
func (*DvVariable) ReadChildStringArrayValue ¶ added in v1.0.2
func (item *DvVariable) ReadChildStringArrayValue(fieldName string) []string
func (*DvVariable) ReadChildStringValue ¶ added in v1.0.2
func (item *DvVariable) ReadChildStringValue(fieldName string) string
func (*DvVariable) ReadPath ¶ added in v1.0.2
func (item *DvVariable) ReadPath(childName string, rejectChildOfUndefined bool, env *DvObject) (*DvVariable, *DvVariable, error)
func (*DvVariable) ReadSimpleChild ¶ added in v1.0.2
func (item *DvVariable) ReadSimpleChild(fieldName string) *DvVariable
func (*DvVariable) ReadSimpleChildValue ¶ added in v1.0.2
func (item *DvVariable) ReadSimpleChildValue(fieldName string) string
func (*DvVariable) ReadSimpleString ¶ added in v1.0.2
func (item *DvVariable) ReadSimpleString() (string, error)
func (*DvVariable) ReadSimpleStringList ¶ added in v1.0.2
func (item *DvVariable) ReadSimpleStringList(data []string) ([]string, error)
func (*DvVariable) ReadSimpleStringMap ¶ added in v1.0.2
func (item *DvVariable) ReadSimpleStringMap(data map[string]string) error
func (*DvVariable) RemoveChild ¶ added in v1.0.2
func (item *DvVariable) RemoveChild(child *DvVariable)
func (*DvVariable) SetField ¶ added in v1.0.2
func (variable *DvVariable) SetField(key string, value *DvVariable) int
func (*DvVariable) SetSimpleValue ¶
func (variable *DvVariable) SetSimpleValue(value string, kind int) error
func (*DvVariable) ToDvGrammarExpressionValue ¶ added in v1.0.2
func (item *DvVariable) ToDvGrammarExpressionValue() *dvgrammar.ExpressionValue
type DvVariable_DumpInfo ¶
type DvVariable_DumpInfo struct {
// contains filtered or unexported fields
}
type EvaluateBoolean ¶
func EvalAsBoolean ¶
type ExpressionResolver ¶ added in v1.0.2
type MethodToStringConverter ¶ added in v1.0.2
type ObjectStack ¶ added in v1.0.2
func NewObjectStack ¶ added in v1.0.2
func NewObjectStack(object *DvObject) *ObjectStack
func (*ObjectStack) Get ¶ added in v1.0.2
func (obj *ObjectStack) Get(key string) (interface{}, bool)
func (*ObjectStack) Set ¶ added in v1.0.2
func (obj *ObjectStack) Set(key string, value interface{})
func (*ObjectStack) SetDeep ¶ added in v1.0.2
func (obj *ObjectStack) SetDeep(key string, value interface{})
func (*ObjectStack) StackPop ¶ added in v1.0.2
func (obj *ObjectStack) StackPop()
func (*ObjectStack) StackPush ¶ added in v1.0.2
func (obj *ObjectStack) StackPush(option int)
type ProcessByteArray ¶ added in v1.0.2
type ProcessByteArray func([]byte) (*DvVariable, error)
var JsonFullParser ProcessByteArray
type ProcessorFunction ¶ added in v1.0.2
type ProcessorFunction func(parent *DvVariable, params string) (*DvVariable, error)
type QuickSearchInfo ¶ added in v1.0.2
type QuickSearchInfo struct { Looker map[string]*DvVariable Key string }
Source Files ¶
- anyprocessor.go
- assigner.go
- assignproc.go
- bracketprocessors.go
- calcprocessors.go
- calculator.go
- calcunary.go
- compare.go
- containin.go
- converters.go
- definitions.go
- dvfunction.go
- dvobject.go
- dvobjectprop.go
- dvobjectutils.go
- dvvariable.go
- evaluator.go
- functioncore.go
- functionfn.go
- functionobject.go
- init.go
- json.go
- langops.go
- logical.go
- objectfn.go
- objstack.go
- parsers.go
- processorFind.go
- processors.go
- quickconversion.go
- quicksearch.go
- routine.go
- scripter.go
- variable.go
Directories ¶
Path | Synopsis |
---|---|
********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
|
********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) *********************************************************************** |