refactor: rename Batch to Partition and update related types and channels for consistency
This commit is contained in:
@@ -38,7 +38,7 @@ func (postgresLd *PostgresLoader) ProcessChunk(
|
||||
ctx context.Context,
|
||||
tableInfo config.TargetTableInfo,
|
||||
colNames []string,
|
||||
chunk models.Chunk,
|
||||
chunk models.Batch,
|
||||
) (int, error) {
|
||||
tableId := pgx.Identifier{tableInfo.Schema, tableInfo.Table}
|
||||
_, err := postgresLd.db.CopyFrom(
|
||||
@@ -60,7 +60,7 @@ func (postgresLd *PostgresLoader) ProcessChunk(
|
||||
}
|
||||
}
|
||||
|
||||
return 0, &custom_errors.LoaderError{Chunk: chunk, Msg: err.Error()}
|
||||
return 0, &custom_errors.LoaderError{Batch: chunk, Msg: err.Error()}
|
||||
}
|
||||
|
||||
return len(chunk.Data), nil
|
||||
@@ -70,7 +70,7 @@ func (postgresLd *PostgresLoader) Exec(
|
||||
ctx context.Context,
|
||||
tableInfo config.TargetTableInfo,
|
||||
columns []models.ColumnType,
|
||||
chChunksIn <-chan models.Chunk,
|
||||
chChunksIn <-chan models.Batch,
|
||||
chErrorsOut chan<- custom_errors.LoaderError,
|
||||
chJobErrorsOut chan<- custom_errors.JobError,
|
||||
wgActiveChunks *sync.WaitGroup,
|
||||
|
||||
Reference in New Issue
Block a user