fix: initial failures (#4291)

* fix(cmd): read configuration correctly

* fix(database): read weakly typed config

* fix(database): correct handling of update columns

Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
Silvan
2022-09-01 07:24:26 +00:00
committed by GitHub
co-authored by Livio Spring
parent 32b751a3a0
commit 2f647ce9a2
13 changed files with 164 additions and 48 deletions
@@ -112,7 +112,7 @@ func (h *StatementHandler) SearchQuery(ctx context.Context, instanceIDs []string
return queryBuilder, h.bulkLimit, nil
}
//Update implements handler.Update
// Update implements handler.Update
func (h *StatementHandler) Update(ctx context.Context, stmts []*handler.Statement, reduce handler.Reduce) (index int, err error) {
if len(stmts) == 0 {
return -1, nil
@@ -248,8 +248,8 @@ stmts:
return lastSuccessfulIdx
}
//executeStmt handles sql statements
//an error is returned if the statement could not be inserted properly
// executeStmt handles sql statements
// an error is returned if the statement could not be inserted properly
func (h *StatementHandler) executeStmt(tx *sql.Tx, stmt *handler.Statement) error {
if stmt.IsNoop() {
return nil