Skip to content
Draft
Show file tree
Hide file tree
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 @@ -42,11 +42,15 @@ public function testGetCopyCommands(): void
);
// @codingStandardsIgnoreEnd
$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -92,11 +96,15 @@ public function testGetCopyCommandsNullIfMultiple(): void
);
// @codingStandardsIgnoreEnd
$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -144,11 +152,15 @@ public function testGetCopyCommandsNullIfEmpty(): void
);
// @codingStandardsIgnoreEnd
$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -197,11 +209,15 @@ public function testGetCopyCommandsRowSkip(): void
// @codingStandardsIgnoreEnd

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down Expand Up @@ -259,11 +275,15 @@ public function testGetCopyCommandWithMoreChunksOfFiles(): void
$conn->expects(self::exactly(2))->method('executeStatement')->withConsecutive([$q1], [$q2]);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ public function testGetCopyCommands(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -92,11 +96,15 @@ public function testGetCopyCommandsNullIfMultiple(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -144,11 +152,15 @@ public function testGetCopyCommandsNullIfEmpty(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -196,11 +208,15 @@ public function testGetCopyCommandsRowSkip(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down Expand Up @@ -258,11 +274,15 @@ public function testGetCopyCommandWithMoreChunksOfFiles(): void
$conn->expects(self::exactly(2))->method('executeStatement')->withConsecutive([$q1], [$q2]);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ public function testGetCopyCommands(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -92,11 +96,15 @@ public function testGetCopyCommandsNullIfMultiple(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -144,11 +152,15 @@ public function testGetCopyCommandsNullIfEmpty(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -196,11 +208,15 @@ public function testGetCopyCommandsRowSkip(): void
);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down Expand Up @@ -258,11 +274,15 @@ public function testGetCopyCommandWithMoreChunksOfFiles(): void
$conn->expects(self::exactly(2))->method('executeStatement')->withConsecutive([$q1], [$q2]);

$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 7,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 7,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 7,
],
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ public function testGetCopyCommands(): void
'INSERT INTO "test_schema"."stagingTable" ("col1", "col2") SELECT "col1", "col2" FROM "test_schema"."test_table"'
);
$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'test_schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down Expand Up @@ -74,11 +78,15 @@ public function testGetCopyCommandsSelectSource(): void
[1],
);
$conn->expects(self::once())->method('fetchAllAssociative')
// phpcs:ignore
->with("SELECT TABLE_TYPE,BYTES,ROW_COUNT FROM information_schema.tables WHERE TABLE_SCHEMA = 'test_schema' AND TABLE_NAME = 'stagingTable';")
->willReturn([
[
'TABLE_TYPE' => 'BASE TABLE', 'BYTES' => 0, 'ROW_COUNT' => 10,
'TABLE_TYPE' => 'BASE TABLE',
'BYTES' => 0,
'ROW_COUNT' => 10,
'name' => 'stagingTable',
'kind' => 'BASE TABLE',
'bytes' => 0,
'rows' => 10,
],
]);

Expand Down
Loading