public function getSelectedFields(String $query) : Array
	{
		$columns = [];

		if (Type::getStatementType($query) == 1) {
			if (preg_match("/(SELECT|select|Select)(.*?)FROM|from|From([^ ]+)/s", $query, $matches)) {
				$columns = explode(',', $matches[2]);
				$columns = array_map(function($field) {
					return trim(ltrim($field));
				}, $columns);
			}
		}

		return $columns;
	}