mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-05-15 05:54:17 +00:00
todo's
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user