Skip to content

Commit 5ae1bdd

Browse files
authored
Merge pull request #216 from zenoleg/fix-prepare-write
Do not add unexpected FORMAT JSON for not distributed queries
2 parents a328b8a + 5265777 commit 5ae1bdd

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)