Interface Statement

    • Method Detail

      • execute

        StatementResult execute​(ExecutionContext ctx)
        Execute a CohQL query or command and return the relevant result.
        ctx - the context to use
        a StatementResult containing the results of executing the statement
      • sanityCheck

        void sanityCheck​(ExecutionContext ctx)
        Perform sanity checks on the statement that will be executed.

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

        ctx - the context to use
        RuntimeException - if sanity checking fails
      • showPlan

        void showPlan​(PrintWriter out)
        Output to the provided PrintWriter a human readable trace of the actions that will be taken by this statement if or when executed.
        out - the PrintWriter to write the trace to
      • getExecutionConfirmation

        String getExecutionConfirmation​(ExecutionContext ctx)
        Return a string that will be used as a question to confirm execution of a statement. If null is returned then no confirmation is required.
        ctx - the context to use
        a String that will be used to confirm execution of a statement
      • isManagingTimeout

        default boolean isManagingTimeout()
        Obtain a flag indicating whether this Statement will manage its own timeout handling.
        true if this Statement manages timeout handling or false if the StatementExecutor should manage timeouts.