Package adams.db

Class BulkInsertTable

    • Field Detail

      • m_cols

        protected List<String> m_cols
        columns for bulk insert.
    • Constructor Detail

      • BulkInsertTable

        public BulkInsertTable​(AbstractDatabaseConnection dbcon,
                               String tablename)
        Constructor. Setup column vector.
        Parameters:
        dbcon - the database context this table is used in
        tablename - the name of the table
    • Method Detail

      • generateInsertHeader

        public String generateInsertHeader()
        Return Insert header. Generated from column names
        Returns:
        insert header
      • attach

        public void attach​(MultipleInsert mi)
        Attach a multiple insert object to this table.
        Parameters:
        mi - the insert
      • insert

        public boolean insert​(MultipleInsert mi,
                              Hashtable<String,​String> vals)
        Insert bulk data.
        Parameters:
        mi - multiple insert
        vals - hashtable of values
        Returns:
        success?
      • doInsert

        protected boolean doInsert​(MultipleInsert mi)
        Performs the bulk insert.
        Parameters:
        mi - the insert
        Returns:
        success?
      • insertComplete

        public boolean insertComplete​(MultipleInsert mi)
        Complete bulk insert.
        Parameters:
        mi - the insert
        Returns:
        success?
      • getInsertColumnsAsString

        protected String getInsertColumnsAsString()
        Return columns as comma separated list.
        Returns:
        column names