public function testCreateDropTable() { $tablename = 'test_create'; $this->client->execute('CREATE TABLE ' . $tablename . ' (abc UInt8) ENGINE = Memory;'); $st = $this->client->system()->columns($tablename); $column = $st->fetchOne(); $this->assertEquals('abc', $column->name); $this->assertEquals('uint8', strtolower($column->type)); $this->client->execute('DROP TABLE ' . $tablename . ';'); }
public function __set($name, $value) { if (!property_exists($this, $name)) { throw new \InvalidArgumentException(sprintf('settings with name %s not exists', $name)); } $this->{$name} = $value; return $this->client->execute('SET :name = :value'); }