code: private GenericQueryRequest createN1qlRequest(final N1qlQuery query, String bucket, String username, String password,
              InetAddress targetNode) {
          String rawQuery = query.n1ql().toString();
          rawQuery = rawQuery.replaceAll(
            CouchbaseAsyncBucket.CURRENT_BUCKET_IDENTIFIER,
            "`" + bucket + "`"
          );
          String statement = query.statement().toString();
          if (targetNode != null) {
              return GenericQueryRequest.jsonQuery(rawQuery, bucket, username, password, targetNode,
                  query.params().clientContextId(), statement);
          } else {
              return GenericQueryRequest.jsonQuery(rawQuery, bucket, username, password,
                  query.params().clientContextId(), statement);
          }
      }
docs: Creates the core query request and performs centralized string substitution.