From f19827813d632398082dcbcc4f0a3ca8ec7615e3 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 7 Jun 2023 18:38:39 +0800 Subject: [PATCH] Response metadata parse on write requests in cluster --- src/Transport/Http.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Transport/Http.php b/src/Transport/Http.php index be59d49..572d370 100644 --- a/src/Transport/Http.php +++ b/src/Transport/Http.php @@ -625,6 +625,11 @@ private function prepareWrite($sql, $bindings = []): CurlerRequest } $query = $this->prepareQuery($sql, $bindings); + + if (strpos($sql, 'CREATE') === 0 || strpos($sql, 'DROP') === 0 || strpos($sql, 'ALTER') === 0) { + $query->setFormat('JSON'); + } + return $this->getRequestWrite($query); }