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

Function NewNestedContextReadWriter

datasource/context.go:223–228  ·  view source on GitHub ↗

NewNestedContextReader provides a context reader which is a composite of ordered child readers the first reader with a key will be used

(readers []expr.ContextReader, writer expr.ContextWriter, ts time.Time)

Source from the content-addressed store, hash-verified

221// NewNestedContextReader provides a context reader which is a composite of ordered child readers
222// the first reader with a key will be used
223func NewNestedContextReadWriter(readers []expr.ContextReader, writer expr.ContextWriter, ts time.Time) expr.ContextReadWriter {
224 if rw, ok := writer.(expr.ContextReader); ok {
225 readers = append(readers, rw)
226 }
227 return &NestedContextReader{readers, writer, ts}
228}
229
230func (n *NestedContextReader) Get(key string) (value.Value, bool) {
231 for _, r := range n.readers {

Callers 2

TestNestedFunction · 0.92
NewMySqlSessionVarsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNestedFunction · 0.74