public function query($query)
{
$this->logger->log($query);
$query_type = $this->determine_query_type($query);
$data = array();
if ($query_type == SQL_SELECT || $query_type == SQL_SHOW) {
$SqliteResult = $this->executeQuery($query);
while ($row = $SqliteResult->fetchArray(SQLITE3_ASSOC)) {
$data[] = $row;
}
return $data;
} else {
$this->executeQuery($query);
if ($query_type == SQL_INSERT) {
return $this->sqlite3->lastInsertRowID();
}
return true;
}
}