code: @Override
      public Map<String, DbColumnType> getQueryMetadata(String query) throws DatabaseEngineException {
          final Map<String, DbColumnType> metaMap = new LinkedHashMap<>();
          ResultSet rs = null;
          Statement stmt = null;
  
          try {
              getConnection();
              stmt = conn.createStatement();
              long start = System.currentTimeMillis();
              rs = stmt.executeQuery(query);
              logger.trace("[{} ms] {}", (System.currentTimeMillis() - start), query);
  
              ResultSetMetaData meta = rs.getMetaData();
              for (int i = 1; i <= meta.getColumnCount(); i++) {
                  metaMap.put(meta.getColumnName(i), toPdbType(meta.getColumnType(i), meta.getColumnTypeName(i)));
              }
  
              return metaMap;
          } catch (final Exception e) {
              throw new DatabaseEngineException("Error querying", e);
          } finally {
              try {
                  if (rs != null) {
                      rs.close();
                  }
              } catch (final Exception e) {
                  logger.trace("Error closing result set.", e);
              }
  
              try {
                  if (stmt != null) {
                      stmt.close();
                  }
              } catch (final Exception e) {
                  logger.trace("Error closing statement.", e);
              }
          }
      }
docs: Gets the query metadata.
  
  @param query The query to retrieve the metadata from.
  @return A representation of the table columns and types.
  @throws DatabaseEngineException If something occurs getting the metadata.