Skip to content

Commit dd2ca15

Browse files
committed
Remove dbg
1 parent 703b387 commit dd2ca15

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Database/Adapter/SQL.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,10 @@ public function getSequences(string $collection, array $documents): array
738738
}
739739
}
740740

741+
if (empty($documentIds)) {
742+
return $documents;
743+
}
744+
741745
$placeholders = implode(',', array_values($keys));
742746

743747
$sql = "
@@ -747,8 +751,6 @@ public function getSequences(string $collection, array $documents): array
747751
{$this->getTenantQuery($collection, tenantCount: \count($documentIds))}
748752
";
749753

750-
var_dump($sql);
751-
var_dump($binds);
752754
$stmt = $this->getPDO()->prepare($sql);
753755

754756
foreach ($binds as $key => $value) {
@@ -765,8 +767,6 @@ public function getSequences(string $collection, array $documents): array
765767
}
766768
}
767769

768-
var_dump($sequences);
769-
770770
return $documents;
771771
}
772772

tests/e2e/Adapter/Scopes/DocumentTests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,15 +438,14 @@ public function testUpsertDocuments(): void
438438
$results[] = $doc;
439439
}
440440
);
441-
var_dump($results);
441+
442442
$this->assertEquals(2, $count);
443-
$this->assertEquals('shmuel', 'shmuel2');
444443

445444
$createdAt = [];
446445
foreach ($results as $index => $document) {
447446
$createdAt[$index] = $document->getCreatedAt();
448447
$this->assertNotEmpty(true, $document->getId());
449-
$this->assertArrayHasKey('$sequence', $document);
448+
$this->assertEmpty(true, $document->getSequence());
450449
$this->assertIsString($document->getAttribute('string'));
451450
$this->assertEquals('text📝', $document->getAttribute('string')); // Also makes sure an emoji is working
452451
$this->assertIsInt($document->getAttribute('integer'));
@@ -483,6 +482,7 @@ public function testUpsertDocuments(): void
483482

484483
foreach ($results as $document) {
485484
$this->assertNotEmpty(true, $document->getId());
485+
$this->assertNotEmpty(true, $document->getSequence());
486486
$this->assertIsString($document->getAttribute('string'));
487487
$this->assertEquals('new text📝', $document->getAttribute('string')); // Also makes sure an emoji is working
488488
$this->assertIsInt($document->getAttribute('integer'));

0 commit comments

Comments
 (0)