MCPcopy
hub / github.com/cube2222/octosql / MakeTrusted

Function MakeTrusted

parser/sqlparser/dependency/sqltypes/value.go:57–62  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

55// called, a comment is needed that explains why it's justified.
56// Functions within this package are exempt.
57func 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.
65func MakeString(val []byte) Value {

Callers 6

FormatMethod · 0.92
MakeStringFunction · 0.85
BuildValueFunction · 0.85
ValueFromBytesFunction · 0.85
BuildIntegralFunction · 0.85
TestMakeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMakeFunction · 0.68