@Override
	public ResultSet query(String query) {
		//Connection connection = null;
		Statement statement = null;
		ResultSet result = null/*new JdbcRowSetImpl()*/;
		try {
			//connection = open();
			//if (checkConnection())
		    statement = this.connection.createStatement();
		    result = statement.executeQuery("SELECT CURTIME()");
		    
		    switch (this.getStatement(query)) {
			    case SELECT:
				    result = statement.executeQuery(query);
				    break;
			    
			    default:
			    	statement.executeUpdate(query);
		    }
		    //connection.close();
	    	return result;
		} catch (SQLException e) {
			this.writeError("Error in SQL query: " + e.getMessage(), false);
		}
		return result;
	}