mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
DB#Upsert(): workaround jmoiron/sqlx#694
This commit is contained in:
parent
4e87ca6de3
commit
3fbc9fa25f
1 changed files with 5 additions and 2 deletions
|
|
@ -366,8 +366,11 @@ func (db DB) Upsert(ctx context.Context, entities <-chan contracts.Entity, succe
|
|||
return err
|
||||
}
|
||||
|
||||
stmt, placeholders := db.BuildUpsertStmt(first)
|
||||
return db.NamedBulkExec(ctx, stmt, 1<<15/placeholders, 1<<3, forward, succeeded)
|
||||
// TODO(ak): wait for https://github.com/jmoiron/sqlx/issues/694
|
||||
//stmt, placeholders := db.BuildUpsertStmt(first)
|
||||
//return db.NamedBulkExec(ctx, stmt, 1<<15/placeholders, 1<<3, forward, succeeded)
|
||||
stmt, _ := db.BuildUpsertStmt(first)
|
||||
return db.NamedBulkExec(ctx, stmt, 1, 1<<3, forward, succeeded)
|
||||
}
|
||||
|
||||
func (db DB) Update(ctx context.Context, entities <-chan contracts.Entity) error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue