MakeTrusted makes a new Value based on the type. If the value is an integral, then val must be in its cannonical form. This function should only be used if you know the value and type conform to the rules. Every place this function is called, a comment is needed that explains why it's justified. Fu
(typ querypb.Type, val []byte)
| 55 | // called, a comment is needed that explains why it's justified. |
| 56 | // Functions within this package are exempt. |
| 57 | func MakeTrusted(typ querypb.Type, val []byte) Value { |
| 58 | if typ == Null { |
| 59 | return NULL |
| 60 | } |
| 61 | return Value{typ: typ, val: val} |
| 62 | } |
| 63 | |
| 64 | // MakeString makes a VarBinary Value. |
| 65 | func MakeString(val []byte) Value { |
no outgoing calls