Skip to content

Commit db12920

Browse files
authored
Merge pull request #1 from jspeedz/bugfix/241-remove-FORMAT-from-query-when-ON-CLUSTER
fix: Remove 'FORMAT JSON' from CREATE, DROP, ALTER and RENAME queries…
2 parents aaf2812 + be41965 commit db12920

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Transport/Http.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ private function prepareWrite($sql, $bindings = []): CurlerRequest
637637
return $this->getRequestWrite($query);
638638
}
639639
if (
640-
str_starts_with($sql, 'CREATE')
641-
|| str_starts_with($sql, 'DROP')
642-
|| str_starts_with($sql, 'ALTER')
643-
|| str_starts_with($sql, 'RENAME')
640+
!str_starts_with($sql, 'CREATE')
641+
&& !str_starts_with($sql, 'DROP')
642+
&& !str_starts_with($sql, 'ALTER')
643+
&& !str_starts_with($sql, 'RENAME')
644644
) {
645645
$query->setFormat('JSON');
646646
}

0 commit comments

Comments
 (0)