Class InsertCommand.TupleInserter

  • All Implemented Interfaces:
    TupleProcessor
    Enclosing class:
    InsertCommand

    private static class InsertCommand.TupleInserter
    extends java.lang.Object
    implements TupleProcessor
    An implementation of the tuple processor interface used by the InsertCommand to insert tuples into a table, when the command is of the form INSERT ... SELECT.
    • Constructor Summary

      Constructors 
      Constructor Description
      TupleInserter​(EventDispatcher eventDispatcher, TableInfo tableInfo)
      Initialize the tuple-inserter object with the details it needs to insert tuples into the specified table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void finish()
      This function is called when all tuples have been produced and passed to the tuple processor.
      void process​(Tuple tuple)
      This implementation simply inserts each tuple it is handed.
      void setSchema​(Schema schema)
      This implementation ignores the schema of the results, since we just don't care.
      • Methods inherited from class java.lang.Object

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

      • tableInfo

        private TableInfo tableInfo
        The table into which the new tuples will be inserted.
      • eventDispatcher

        EventDispatcher eventDispatcher
        The event-dispatcher for reporting insert events to other components.
    • Constructor Detail

      • TupleInserter

        TupleInserter​(EventDispatcher eventDispatcher,
                      TableInfo tableInfo)
        Initialize the tuple-inserter object with the details it needs to insert tuples into the specified table.
        Parameters:
        tableInfo - details of the table that will be modified
    • Method Detail

      • setSchema

        public void setSchema​(Schema schema)
        This implementation ignores the schema of the results, since we just don't care.
        Specified by:
        setSchema in interface TupleProcessor
      • process

        public void process​(Tuple tuple)
        This implementation simply inserts each tuple it is handed.
        Specified by:
        process in interface TupleProcessor
        Parameters:
        tuple - The tuple to process.
      • finish

        public void finish()
        Description copied from interface: TupleProcessor
        This function is called when all tuples have been produced and passed to the tuple processor.
        Specified by:
        finish in interface TupleProcessor