Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added options for extractor #443

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
private readonly Columns $columnRange,
private readonly bool $withHeader,
private readonly int $rowsInBatch,
private readonly string $rowEntryName='row',
private readonly string $rowEntryName = 'row',
private readonly array $options = [],
) {
if ($this->rowsInBatch <= 0) {

Check warning on line 28 in src/adapter/etl-adapter-google-sheet/src/Flow/ETL/Adapter/GoogleSheet/GoogleSheetExtractor.php

View workflow job for this annotation

GitHub Actions / Mutation Tests (locked, 8.1, ubuntu-latest)

Escaped Mutant for Mutator "LessThanOrEqualTo": --- Original +++ New @@ @@ { public function __construct(private readonly Sheets $service, private readonly string $spreadsheetId, private readonly Columns $columnRange, private readonly bool $withHeader, private readonly int $rowsInBatch, private readonly string $rowEntryName = 'row', private readonly array $options = []) { - if ($this->rowsInBatch <= 0) { + if ($this->rowsInBatch < 0) { throw new InvalidArgumentException('Rows in batch must be greater than 0'); } }
throw new InvalidArgumentException('Rows in batch must be greater than 0');
}
}
Expand All @@ -40,7 +41,7 @@

$totalRows = 0;
/** @var ValueRange $response */
$response = $this->service->spreadsheets_values->get($this->spreadsheetId, $cellsRange->toString());
$response = $this->service->spreadsheets_values->get($this->spreadsheetId, $cellsRange->toString(), $this->options);
/** @var array[] $values */
$values = $response->getValues();

Expand Down
Loading