Skip to content

Commit 5265777

Browse files
committed
Do not add FORMAT JSON to the end of query when addressed to the one instance only
1 parent a328b8a commit 5265777

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Transport/Http.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,10 @@ private function prepareWrite($sql, $bindings = []): CurlerRequest
626626

627627
$query = $this->prepareQuery($sql, $bindings);
628628

629+
if (strpos($sql, 'ON CLUSTER') === false) {
630+
return $this->getRequestWrite($query);
631+
}
632+
629633
if (strpos($sql, 'CREATE') === 0 || strpos($sql, 'DROP') === 0 || strpos($sql, 'ALTER') === 0) {
630634
$query->setFormat('JSON');
631635
}

0 commit comments

Comments
 (0)