Class SelectStatementBuilder.SelectStatement

    • Field Detail

      • f_sCache

        protected final String f_sCache
        The name of the cache to query.
      • f_filter

        protected final Filter f_filter
        The Filter to use in the query.
      • f_fReduction

        protected final boolean f_fReduction
        Flag to denote whether this query is an aggregation to select specific fields from the values of a cache; e.g. select x, y, z from foo.
    • Constructor Detail

      • SelectStatement

        public SelectStatement​(String sCache,
                               Filter filter,
                               InvocableMap.EntryAggregator aggregator,
                               boolean fReduction)
        Construct a SelectStatement that will query the specified cache.
        Parameters:
        sCache - the cache to query
        filter - the Filter to use to query tha cache
        aggregator - the InvocableMap.EntryAggregator to run against the cache entries
        fReduction - a flag indicating whether this query is a sub-set of entry fields
    • Method Detail

      • execute

        public StatementResult execute​(ExecutionContext ctx)
        Description copied from interface: Statement
        Execute a CohQL query or command and return the relevant result.
        Parameters:
        ctx - the context to use
        Returns:
        a StatementResult containing the results of executing the statement
      • executeAsync

        public CompletableFuture<StatementResult> executeAsync​(ExecutionContext ctx)
        Description copied from interface: Statement
        Execute a CohQL query or command asynchronously and return the CompletableFuture with the relevant result.
        Parameters:
        ctx - the context to use
        Returns:
        a StatementResult future containing the results of executing the statement
      • showPlan

        public void showPlan​(PrintWriter out)
        Description copied from interface: Statement
        Output to the provided PrintWriter a human readable trace of the actions that will be taken by this statement if or when executed.
        Parameters:
        out - the PrintWriter to write the trace to
      • sanityCheck

        public void sanityCheck​(ExecutionContext ctx)
        Description copied from interface: Statement
        Perform sanity checks on the statement that will be executed.

        Implementations can fail sanity checking by throwing an unchecked exception (RuntimeException).

        Specified by:
        sanityCheck in interface Statement
        Overrides:
        sanityCheck in class AbstractStatement
        Parameters:
        ctx - the context to use
      • getFilter

        public Filter getFilter()
        Return the Filter to use to execute this query.
        Returns:
        the Filter to use to execute this query