public function create($data) { foreach ((array) $data as $k => $v) { $data[$k] = serialize($v); } chdb_create($this->_get_pathname(), $data); return true; }
public function create($data) { foreach ((array) $data as $k => $v) { $data[$k] = serialize($v); } chdb_create($this->_get_pathname(), $data); $this->_controller = new chdb($this->_get_pathname()); if (is_file($this->_get_prev_pathname()) && $this->_get_prev_pathname() != $this->_get_pathname()) { try { unlink($this->_get_prev_pathname()); } catch (Exception $e) { logger::error($e->getMessage()); } } return true; }