code: public List executeNativeQuery(String n1qlQuery, EntityMetadata em)
      {
          N1qlQueryResult result = bucket
                  .query(N1qlQuery.simple(n1qlQuery, N1qlParams.build().consistency(ScanConsistency.REQUEST_PLUS)));
          LOGGER.debug("Executed query : " + n1qlQuery + " on the " + bucket.name() + " Bucket");
  
          validateQueryResults(n1qlQuery, result);
          return result.allRows();
  
      }
docs: Execute native query.
  
  @param n1qlQuery
  the n1ql query
  @param em
  the entity manager
  @return the list