Class CommandRemote

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CommandInterface

    public class CommandRemote
    extends java.lang.Object
    implements CommandInterface
    Represents the client-side part of a SQL statement. This class is not used in embedded mode.
    • Field Detail

      • transferList

        private final java.util.ArrayList<Transfer> transferList
      • trace

        private final Trace trace
      • sql

        private final java.lang.String sql
      • fetchSize

        private final int fetchSize
      • id

        private int id
      • isQuery

        private boolean isQuery
      • cmdType

        private int cmdType
      • readonly

        private boolean readonly
      • created

        private final int created
    • Constructor Detail

      • CommandRemote

        public CommandRemote​(SessionRemote session,
                             java.util.ArrayList<Transfer> transferList,
                             java.lang.String sql,
                             int fetchSize)
    • Method Detail

      • stop

        public void stop()
        Description copied from interface: CommandInterface
        Stop the command execution, release all locks and resources
        Specified by:
        stop in interface CommandInterface
      • prepare

        private void prepare​(SessionRemote s,
                             boolean createParams)
      • isQuery

        public boolean isQuery()
        Description copied from interface: CommandInterface
        Check if this is a query.
        Specified by:
        isQuery in interface CommandInterface
        Returns:
        true if it is a query
      • prepareIfRequired

        private void prepareIfRequired()
      • executeQuery

        public ResultInterface executeQuery​(long maxRows,
                                            boolean scrollable)
        Description copied from interface: CommandInterface
        Execute the query.
        Specified by:
        executeQuery in interface CommandInterface
        Parameters:
        maxRows - the maximum number of rows returned
        scrollable - if the result set must be scrollable
        Returns:
        the result
      • executeUpdate

        public ResultWithGeneratedKeys executeUpdate​(java.lang.Object generatedKeysRequest)
        Description copied from interface: CommandInterface
        Execute the statement
        Specified by:
        executeUpdate in interface CommandInterface
        Parameters:
        generatedKeysRequest - null or false if generated keys are not needed, true if generated keys should be configured automatically, int[] to specify column indices to return generated keys from, or String[] to specify column names to return generated keys from
        Returns:
        the update count and generated keys, if any
      • checkParameters

        private void checkParameters()
      • sendParameters

        private void sendParameters​(Transfer transfer)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
        Description copied from interface: CommandInterface
        Close the statement.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface CommandInterface
      • cancel

        public void cancel()
        Cancel this current statement.
        Specified by:
        cancel in interface CommandInterface
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object