Add a column to table, copying the formatter from self.
353798
def _add_column_and_format(self, table, label, column):
        """"""
        label = self._as_label(label)
        table[label] = column
        if label in self._formats:
            table._formats[label] = self._formats[label]
546256
def insert(self, table, value, ignore=False, commit=True):
        
        value_q, _args = self._value_parser(value, columnname=False)
        _sql = ''.join(['INSERT', ' IGNORE' if ignore else '', ' INTO ', self._backtick(table),
                        ' (', self._backtick_columns(value), ') VALUES (', value_q, ');'])

        if self.debug:
            return self.cur.mogrify(_sql, _args)

        self.cur.execute(_sql, _args)
        if commit:
            self.conn.commit()
        return self.cur.lastrowid
248490
def add_column(column_name, definition)
      attributes = column_attributes(column_name, definition)
      migration.add_column(*attributes)
    end
521585
def copy_table(tbl, start=0, stop=None, blen=None, storage=None,
               create='table', **kwargs):
    """"""

    # setup
    names, columns = _util.check_table_like(tbl)
    storage = _util.get_storage(storage)
    blen = _util.get_blen_table(tbl, blen)
    if stop is None:
        stop = len(columns[0])
    else:
        stop = min(stop, len(columns[0]))
    length = stop - start
    if length < 0:
        raise ValueError('invalid stop/start')

    # copy block-wise
    out = None
    for i in range(start, stop, blen):
        j = min(i+blen, stop)
        res = [c[i:j] for c in columns]
        if out is None:
            out = getattr(storage, create)(res, names=names,
                                           expectedlen=length, **kwargs)
        else:
            out.append(res)

    return out
743351
def add_table(self, dataframe, isStyled = False):
        """"""

        if isStyled :
            table_string = dataframe.render()
        else :
            table_string = dataframe.style.render()
            
        table_string = table_string.replace("\n", "").replace("<table", """<table class = "table table-sm table-hover" """).replace("<thead>", """<thead class="thead-inverse">""")
        self.table = table_string
195736
public ColumnList addColumn(IColumn column){
        return this.addColumn(column.family(), column.qualifier(), column.timestamp(), column.value());
    }
1037524
function _addColumn(){
    self._visitingAlter = true;
    var table = self._queryNode.table;
    self._visitingAddColumn = true;
    var result='ALTER TABLE '+self.visit(table.toNode())+' ADD ('+self.visit(alter.nodes[0].nodes[0]);
    for (var i= 1,len=alter.nodes.length; i<len; i++){
      var node=alter.nodes[i];
      assert(node.type=='ADD COLUMN',errMsg);
      result+=', '+self.visit(node.nodes[0]);
    }
    result+=')';
    self._visitingAddColumn = false;
    self._visitingAlter = false;
    return [result];
  }
1051345
def copy_format(self):
        

        row, col, tab = self.grid.actions.cursor
        code_array = self.grid.code_array

        # Cell attributes

        new_cell_attributes = []
        selection = self.get_selection()
        if not selection:
            # Current cell is chosen for selection
            selection = Selection([], [], [], [], [(row, col)])

        # Format content is shifted so that the top left corner is 0,0
        ((top, left), (bottom, right)) = \
            selection.get_grid_bbox(self.grid.code_array.shape)

        cell_attributes = code_array.cell_attributes
        for __selection, table, attrs in cell_attributes:
            if tab == table:
                new_selection = selection & __selection
                if new_selection:
                    new_shifted_selection = new_selection.shifted(-top, -left)
                    if "merge_area" not in attrs:
                        selection_params = new_shifted_selection.parameters
                        cellattribute = selection_params, table, attrs
                        new_cell_attributes.append(cellattribute)

        # Rows

        shifted_new_row_heights = {}
        for row, table in code_array.row_heights:
            if tab == table and top <= row <= bottom:
                shifted_new_row_heights[row-top, table] = \
                    code_array.row_heights[row, table]

        # Columns

        shifted_new_col_widths = {}
        for col, table in code_array.col_widths:
            if tab == table and left <= col <= right:
                shifted_new_col_widths[col-left, table] = \
                    code_array.col_widths[col, table]

        format_data = {
            "cell_attributes": new_cell_attributes,
            "row_heights": shifted_new_row_heights,
            "col_widths": shifted_new_col_widths,
        }

        attr_string = repr(format_data)

        self.grid.main_window.clipboard.set_clipboard(attr_string)
157544
def print_table(columns, formatter)
      columns.transpose.each { |row| puts sprintf(formatter, *row) }
    end
325238
def columns_formatter(cls, colname):
        """"""
        def wrapper(func):
            cls.columns_formatters[colname] = func
            return func
        return wrapper
465908
def _add(self, ctx, table_name, record_id, column_values):
        
        vsctl_table = self._get_table(table_name)
        ovsrec_row = ctx.must_get_row(vsctl_table, record_id)
        for column, value in column_values:
            ctx.add_column(ovsrec_row, column, value)
        ctx.invalidate_cache()
747845
public void addColumn(DefaultTableColumn column) {
        column.setModelIndex(columnModel.getColumnCount());
        columnModel.addColumn(column);
    }
1288530
@TimerJ
    public IndexMetadataBuilder addColumn(String columnName, ColumnType colType) {
        ColumnName colName = new ColumnName(tableName, columnName);
        ColumnMetadata colMetadata = new ColumnMetadata(colName, null, colType);
        columns.put(colName, colMetadata);
        return this;
    }
592221
def add_table(self, name, columns, type_map=None, if_not_exists=False):
        """"""
        # Check types mapping #
        if type_map is None and isinstance(columns, dict): types = columns
        if type_map is None:                               types = {}
        # Safe or unsafe #
        if if_not_exists: query = 'CREATE TABLE IF NOT EXISTS "%s" (%s);'
        else:             query = 'CREATE table "%s" (%s);'
        # Do it #
        cols = ','.join(['"' + c + '"' + ' ' + types.get(c, 'text') for c in columns])
        self.own_cursor.execute(query % (self.main_table, cols))
887087
def populate_from_staging(self, staging_table, from_column_list, output_table):
        
        self.sql_text += 'INSERT INTO ' + output_table + ' (\n'
        for c in self.col_list:
            if c != '':
                self.sql_text += '    ' + c + ',\n'
        self.sql_text += '    ' + self.date_updated_col + ') (\n'
        self.sql_text += '    SELECT \n'
        for c in from_column_list:
            if c != '':
                self.sql_text += '        ' + c + ',\n'
        self.sql_text += '        SYSDATE \n    FROM ' + staging_table
        self.sql_text += '\n);\n'
375411
public static TableColumnModel leftShift(TableColumnModel self, TableColumn column) {
        self.addColumn(column);
        return self;
    }
822145
def insert_column(column_index = 0)
      validate_workbook
      ensure_cell_exists(0, column_index)

      old_range = cols.get_range(column_index)

      # Go through each cell in column
      sheet_data.rows.each_with_index { |row, row_index|
        next if row.nil? # Do not process blank rows

        old_cell = row[column_index]
        c = nil

        if old_cell && old_cell.style_index != 0 &&
             old_range && old_range.style_index != old_cell.style_index then

          c = RubyXL::Cell.new(:style_index => old_cell.style_index, :worksheet => self,
                               :row => row_index, :column => column_index,
                               :datatype => RubyXL::DataType::SHARED_STRING)
        end

        row.insert_cell_shift_right(c, column_index)
      }

      cols.insert_column(column_index)

      # TODO: update column numbers
    end