type
Value
An immutable scalar or list comparison operand.
Properties
| Property | Type | Description |
|---|---|---|
Kind() | ValueKind | String, number, boolean, null, or list. |
StringValue() | (string, | String payload and whether the kind matched. |
NumberValue() | (float64, | Number payload and whether the kind matched. |
BooleanValue() | (bool, | Boolean payload and whether the kind matched. |
Values() | []Value | Deep copy of list items. |
How it works
Explicit constructors prevent arbitrary application values from leaking into the query contract. Value implements JSON encoding.
Full signature
type Value struct {
// contains filtered or unexported fields
}Methods
Value.BooleanValue()BooleanValue returns the boolean and true when this is a boolean operand.
Value.Kind()Kind returns the operand's discriminant.
Value.MarshalJSON()Public method Value.MarshalJSON from github.com/riducms/ridu/query.
Value.NumberValue()NumberValue returns the number and true when this is a number operand.
Value.StringValue()StringValue returns the string and true when this is a string operand.
Value.Values()Values returns a deep copy for a list operand.
Value.ReferenceValue()ReferenceValue returns the collection slug, document ID, and true when this is a reference operand.