MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / SelectMappable

Function SelectMappable

pkg/util/dbutil/dbmappable.go:73–85  ·  view source on GitHub ↗
(tx *txwrap.TxWrap, query string, args ...interface{})

Source from the content-addressed store, hash-verified

71}
72
73func SelectMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT {
74 var rtn []PT
75 marr := tx.SelectMaps(query, args...)
76 for _, m := range marr {
77 if len(m) == 0 {
78 continue
79 }
80 val := PT(new(T))
81 FromDBMap(val, m)
82 rtn = append(rtn, val)
83 }
84 return rtn
85}
86
87func SelectMapsGen[PT MapConverterPtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT {
88 var rtn []PT

Callers

nothing calls this directly

Calls 1

FromDBMapFunction · 0.85

Tested by

no test coverage detected