Class MockExecuteContext

    • Constructor Summary

      Constructors 
      Constructor Description
      MockExecuteContext​(java.lang.String[] sql, java.lang.Object[][] bindings)
      Create a new mock execution context.
      MockExecuteContext​(java.lang.String[] sql, java.lang.Object[][] bindings, int autoGeneratedKeys)
      Create a new mock execution context.
      MockExecuteContext​(java.lang.String[] sql, java.lang.Object[][] bindings, int[] columnIndexes)
      Create a new mock execution context.
      MockExecuteContext​(java.lang.String[] sql, java.lang.Object[][] bindings, java.lang.String[] columnNames)
      Create a new mock execution context.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int autoGeneratedKeys()
      The corresponding value from MockStatement.
      boolean batch()
      Whether this execution context is a from a batch statement.
      java.lang.Object[][] batchBindings()
      Get all bind variables of a "single batch" statement.
      boolean batchMultiple()
      Whether this execution context is from a "multi batch" statement.
      boolean batchSingle()
      Whether this execution context is from a "single batch" statement.
      java.lang.String[] batchSQL()
      Get all batch SQL statements of a "multi batch" statement.
      java.lang.Object[] bindings()
      Get the single (or first "single batch") set of bind variables.
      int[] columnIndexes()
      The corresponding value from MockStatement.
      java.lang.String[] columnNames()
      The corresponding value from MockStatement.
      int[] outParameterTypes()
      Get the types of registered out parameters, if any.
      java.lang.String sql()
      Get the single (or first "multi batch") SQL statement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockExecuteContext

        public MockExecuteContext​(java.lang.String[] sql,
                                  java.lang.Object[][] bindings)
        Create a new mock execution context.
        Parameters:
        sql - The SQL statement(s)
        bindings - The bind variable(s)
      • MockExecuteContext

        public MockExecuteContext​(java.lang.String[] sql,
                                  java.lang.Object[][] bindings,
                                  int autoGeneratedKeys)
        Create a new mock execution context.
        Parameters:
        sql - The SQL statement(s)
        bindings - The bind variable(s)
        autoGeneratedKeys - The corresponding value from MockStatement
      • MockExecuteContext

        public MockExecuteContext​(java.lang.String[] sql,
                                  java.lang.Object[][] bindings,
                                  int[] columnIndexes)
        Create a new mock execution context.

        Parameters:
        sql - The SQL statement(s)
        bindings - The bind variable(s)
        columnIndexes - The corresponding value from MockStatement
      • MockExecuteContext

        public MockExecuteContext​(java.lang.String[] sql,
                                  java.lang.Object[][] bindings,
                                  java.lang.String[] columnNames)
        Create a new mock execution context.

        Parameters:
        sql - The SQL statement(s)
        bindings - The bind variable(s)
        columnNames - The corresponding value from MockStatement
    • Method Detail

      • batch

        public boolean batch()
        Whether this execution context is a from a batch statement.
        Returns:
        Whether this execution context is a from a batch statement.
      • batchSingle

        public boolean batchSingle()
        Whether this execution context is from a "single batch" statement.
        Returns:
        Whether this execution context is from a "single batch" statement.
        See Also:
        DSLContext.batch(Query)
      • batchMultiple

        public boolean batchMultiple()
        Whether this execution context is from a "multi batch" statement.
        Returns:
        Whether this execution context is from a "multi batch" statement.
        See Also:
        DSLContext.batch(Query...)
      • batchSQL

        public java.lang.String[] batchSQL()
        Get all batch SQL statements of a "multi batch" statement.
        Returns:
        All batch SQL statements of a "multi batch" statement, or an array of length 1 with the single statement.
      • batchBindings

        public java.lang.Object[][] batchBindings()
        Get all bind variables of a "single batch" statement.
        Returns:
        All bind variables of a "single batch" statment, or an array of length 1 with the bind variables of a single statement.
      • sql

        public java.lang.String sql()
        Get the single (or first "multi batch") SQL statement.
        Returns:
        The single (or first "multi batch") SQL statement.
      • bindings

        public java.lang.Object[] bindings()
        Get the single (or first "single batch") set of bind variables.
        Returns:
        The single (or first "single batch") set of bind variables.
      • autoGeneratedKeys

        public int autoGeneratedKeys()
        The corresponding value from MockStatement.
        Returns:
        The corresponding value from MockStatement.
      • columnIndexes

        public int[] columnIndexes()
        The corresponding value from MockStatement.
        Returns:
        The corresponding value from MockStatement.
      • columnNames

        public java.lang.String[] columnNames()
        The corresponding value from MockStatement.
        Returns:
        The corresponding value from MockStatement.
      • outParameterTypes

        public int[] outParameterTypes()
        Get the types of registered out parameters, if any.
        Returns:
        the types of registered out parameters, if any.