This commit is contained in:
Joel Wetzell
2026-05-14 19:49:28 -05:00
parent 0912949f31
commit d4abe7ed2d
3 changed files with 4 additions and 0 deletions
+2
View File
@@ -36,6 +36,7 @@ func (dq *DbQuery) Process(ctx context.Context, wrappedPayload common.WrappedPay
wrappedPayload.End = true
return wrappedPayload, fmt.Errorf("db.query module with id %s is not a DatabaseModule", dq.ModuleId)
}
// TODO(jwetzell): cache the module reference after the first run
db := dbModule.Database()
if db == nil {
@@ -65,6 +66,7 @@ func (dq *DbQuery) Process(ctx context.Context, wrappedPayload common.WrappedPay
return wrappedPayload, fmt.Errorf("db.query error getting columns: %w", err)
}
// TODO(jwetzell): optimize this
results := make([]map[string]any, 0)
for rows.Next() {
+1
View File
@@ -35,6 +35,7 @@ func (kvg *KVGet) Process(ctx context.Context, wrappedPayload common.WrappedPayl
wrappedPayload.End = true
return wrappedPayload, fmt.Errorf("kv.get module with id %s is not a KeyValueModule", kvg.ModuleId)
}
// TODO(jwetzell): cache the module reference after the first run
value, err := kvModule.Get(kvg.Key)
if err != nil {
+1
View File
@@ -39,6 +39,7 @@ func (kvs *KVSet) Process(ctx context.Context, wrappedPayload common.WrappedPayl
wrappedPayload.End = true
return wrappedPayload, fmt.Errorf("kv.set module with id %s is not a KeyValueModule", kvs.ModuleId)
}
// TODO(jwetzell): cache the module reference after the first run
var valueBuffer bytes.Buffer
err := kvs.Value.Execute(&valueBuffer, wrappedPayload)