Beispiel #1
0
/*
Creates and returns a new array construct containing
the all the key value rxpression pair's in Pairs.
*/
func (this Pairs) Expression() expression.Expression {
	exprs := make(expression.Expressions, len(this))

	for i, pair := range this {
		exprs[i] = pair.Expression()
	}

	return expression.NewArrayConstruct(exprs...)
}
Beispiel #2
0
/*
Creates and returns a new array construct containing
the key value pair.
*/
func (this *Pair) Expression() expression.Expression {
	return expression.NewArrayConstruct(this.Key, this.Value)
}
Beispiel #3
0
func constantArray(constant []interface{}) expression.Expression {
	return expression.NewArrayConstruct(expression.NewConstant(value.NewValue(constant)))
}