We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d275e63 commit d3bb53cCopy full SHA for d3bb53c
src/Query/Query.php
@@ -30,6 +30,10 @@ class Query
30
*/
31
public function __construct($sql,$degenerations=[])
32
{
33
+ if (!trim($sql))
34
+ {
35
+ throw new QueryException('Empty Query');
36
+ }
37
$this->sql = $sql;
38
$this->degenerations=$degenerations;
39
}
tests/ClientTest.php
@@ -613,6 +613,14 @@ public function testSqlConditions()
613
);
614
615
616
+
617
+ /**
618
+ * @expectedException \ClickHouseDB\QueryException
619
+ */
620
+ public function testWriteEmpty()
621
622
+ $this->db->write('');
623
624
/**
625
*
626
0 commit comments