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

Method encodeType

sio/jsupio/types.go:91–106  ·  view source on GitHub ↗
(typ super.Type)

Source from the content-addressed store, hash-verified

89type encoder map[super.Type]zType
90
91func (e encoder) encodeType(typ super.Type) zType {
92 t, ok := e[typ]
93 if !ok {
94 t = e.newType(typ)
95 id := super.TypeID(typ)
96 if id < super.IDTypeComplex {
97 e[typ] = t
98 } else {
99 e[typ] = &zRef{
100 Kind: "ref",
101 ID: id,
102 }
103 }
104 }
105 return t
106}
107
108func (e encoder) newType(typ super.Type) zType {
109 switch typ := typ.(type) {

Callers 4

newTypeMethod · 0.95
TransformMethod · 0.80
encodeValueMethod · 0.80
encodeFusionMethod · 0.80

Calls 2

newTypeMethod · 0.95
TypeIDFunction · 0.92

Tested by

no test coverage detected