MCPcopy Create free account
hub / github.com/brimdata/super / Bool

Method Bool

value.go:120–128  ·  view source on GitHub ↗

Bool returns v's underlying value. It panics if v's underlying type is not TypeBool.

()

Source from the content-addressed store, hash-verified

118// Bool returns v's underlying value. It panics if v's underlying type is not
119// TypeBool.
120func (v Value) Bool() bool {
121 if v.Type().ID() != IDBool {
122 panic(fmt.Sprintf("super.Value.Bool called on %T", v.Type()))
123 }
124 if x, ok := v.native(); ok {
125 return x != 0
126 }
127 return DecodeBool(v.bytes())
128}
129
130// Bytes returns v's BSUP representation.
131func (v Value) Bytes() scode.Bytes {

Callers 15

AsBoolMethod · 0.95
NewConstFromValueFunction · 0.80
NewCoreFunction · 0.80
NewClientFunction · 0.80
encodeAnyMethod · 0.80
decodeAnyMethod · 0.80
newBranchFunction · 0.80
ReadMethod · 0.80
EvalMethod · 0.80
compareValuesFunction · 0.80
CompareBoolFunction · 0.80
ComparisonFunction · 0.80

Calls 5

TypeMethod · 0.95
nativeMethod · 0.95
bytesMethod · 0.95
DecodeBoolFunction · 0.85
IDMethod · 0.65

Tested by 1

filterFunction · 0.64