MCPcopy Create free account
hub / github.com/araddon/qlbridge / Get

Method Get

datasource/context.go:118–130  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

116func (m *SqlDriverMessageMap) SetRow(row []driver.Value) { m.Vals = row }
117func (m *SqlDriverMessageMap) Ts() time.Time { return time.Time{} }
118func (m *SqlDriverMessageMap) Get(key string) (value.Value, bool) {
119 if idx, ok := m.ColIndex[key]; ok {
120 return value.NewValue(m.Vals[idx]), true
121 }
122 _, right, hasLeft := expr.LeftRight(key)
123 //u.Debugf("could not find: %q right=%q hasLeftRight?%v", key, right, hasLeft)
124 if hasLeft {
125 if idx, ok := m.ColIndex[right]; ok {
126 return value.NewValue(m.Vals[idx]), true
127 }
128 }
129 return nil, false
130}
131func (m *SqlDriverMessageMap) Row() map[string]value.Value {
132 row := make(map[string]value.Value)
133 for k, idx := range m.ColIndex {

Callers

nothing calls this directly

Calls 2

NewValueFunction · 0.92
LeftRightFunction · 0.92

Tested by

no test coverage detected