Skip to content

Commit

Permalink
fixup: remove TODOs (pr feedback)
Browse files Browse the repository at this point in the history
  • Loading branch information
murfffi committed Apr 12, 2024
1 parent 9ad5cce commit 029e2ec
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func CopyWithInsert(ctx context.Context, db *sql.DB, rows *sql.Rows, table strin
}
table += "(" + strings.Join(columns, ", ") + ")"
}
// TODO if the db supports multiple rows per insert, create batches of 10 rows
query = "INSERT INTO " + table + " VALUES (" + strings.Repeat("?, ", clen-1) + "?)"
}
tx, err := db.BeginTx(ctx, nil)
Expand Down Expand Up @@ -109,8 +108,6 @@ func CopyWithInsert(ctx context.Context, db *sql.DB, rows *sql.Rows, table strin
}
n += rn
}
// TODO if using batches, flush the last batch,
// TODO prepare another statement and count remaining rows
err = tx.Commit()
if err != nil {
return n, fmt.Errorf("failed to commit transaction: %w", err)
Expand Down

0 comments on commit 029e2ec

Please sign in to comment.