Skip to content

Commit be41965

Browse files
committed
fix: Remove 'FORMAT JSON' from CREATE, DROP, ALTER and RENAME queries when executing queries 'ON CLUSTER'
refs: smi2#241, smi2#214
1 parent aaf2812 commit be41965

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)