Interface ExecutableResultStatement

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.concurrent.CompletableFuture<java.util.List<org.neo4j.driver.Record>> fetchWith​(org.neo4j.driver.async.AsyncQueryRunner queryRunner)
      Asynchronously fetches a list of records from a database via the given queryRunner.
      <T> java.util.concurrent.CompletableFuture<java.util.List<T>> fetchWith​(org.neo4j.driver.async.AsyncQueryRunner queryRunner, java.util.function.Function<org.neo4j.driver.Record,​T> mappingFunction)
      Asynchronously fetches a list of records from a database via the given queryRunner.
      default java.util.List<org.neo4j.driver.Record> fetchWith​(org.neo4j.driver.QueryRunner queryRunner)
      Fetches a list of records from a database via the given queryRunner.
      <T> java.util.List<T> fetchWith​(org.neo4j.driver.QueryRunner queryRunner, java.util.function.Function<org.neo4j.driver.Record,​T> mappingFunction)
      Fetches a list of things from a database via the given queryRunner.
      org.neo4j.driver.summary.ResultSummary streamWith​(org.neo4j.driver.QueryRunner queryRunner, java.util.function.Consumer<java.util.stream.Stream<org.neo4j.driver.Record>> streamHandler)
      This method creates (and closes) a stream of records from the result of a given query.
    • Method Detail

      • fetchWith

        <T> java.util.List<T> fetchWith​(org.neo4j.driver.QueryRunner queryRunner,
                                        java.util.function.Function<org.neo4j.driver.Record,​T> mappingFunction)
        Fetches a list of things from a database via the given queryRunner. The mappingFunction is used for converting records into a custom types.
        Type Parameters:
        T - The type of the returned objects.
        Parameters:
        queryRunner - Any type of query runner. Neither sessions nor transactions will be closed.
        mappingFunction - A mapping function.
        Returns:
        A list of objects.
      • fetchWith

        default java.util.List<org.neo4j.driver.Record> fetchWith​(org.neo4j.driver.QueryRunner queryRunner)
        Fetches a list of records from a database via the given queryRunner.
        Parameters:
        queryRunner - Any type of query runner. Neither sessions nor transactions will be closed.
        Returns:
        A list of records.
      • fetchWith

        <T> java.util.concurrent.CompletableFuture<java.util.List<T>> fetchWith​(org.neo4j.driver.async.AsyncQueryRunner queryRunner,
                                                                                java.util.function.Function<org.neo4j.driver.Record,​T> mappingFunction)
        Asynchronously fetches a list of records from a database via the given queryRunner. The mappingFunction is used for converting records into a custom types.
        Type Parameters:
        T - The type of the returned objects
        Parameters:
        queryRunner - Any type of asynchronous query runner. Neither sessions nor transactions will be closed.
        mappingFunction - A mapping function.
        Returns:
        A completable future of a list of records
      • fetchWith

        default java.util.concurrent.CompletableFuture<java.util.List<org.neo4j.driver.Record>> fetchWith​(org.neo4j.driver.async.AsyncQueryRunner queryRunner)
        Asynchronously fetches a list of records from a database via the given queryRunner.
        Parameters:
        queryRunner - Any type of asynchronous query runner. Neither sessions nor transactions will be closed.
        Returns:
        A completable future of a list of records
      • streamWith

        org.neo4j.driver.summary.ResultSummary streamWith​(org.neo4j.driver.QueryRunner queryRunner,
                                                          java.util.function.Consumer<java.util.stream.Stream<org.neo4j.driver.Record>> streamHandler)
        This method creates (and closes) a stream of records from the result of a given query. The stream is not meant to live outside the scope of the consumer passed to this method as it should either be closed or fully consumed (we make sure of this).

        This method is especially useful when profiling a statement: You will be able to safely process what's needed and also get hold of the result summary, which will include the profile.

        Parameters:
        queryRunner - Any type of query runner. Neither sessions nor transactions will be closed
        streamHandler - A handler for the stream: Do whatever you want with the items.
        Returns:
        The result summary. There is no need to actually use this.