Insert a number of rows after the given row.
9208
def insert_empty_rows(self, y: int, amount: int = 1) -> None:
        """"""
        def transform_rows(
                column: Union[int, float],
                row: Union[int, float]
        ) -> Tuple[Union[int, float], Union[int, float]]:
            return column, row + (amount if row >= y else 0)
        self._transform_coordinates(transform_rows)
790394
def set_row(self, index, values):
        
        if self._sort:
            exists, i = sorted_exists(self._index, index)
            if not exists:
                self._insert_row(i, index)
        else:
            try:
                i = self._index.index(index)
            except ValueError:  # new row
                i = len(self._index)
                self._add_row(index)
        if isinstance(values, dict):
            if not (set(values.keys()).issubset(self._columns)):
                raise ValueError('keys of values are not all in existing columns')
            for c, column in enumerate(self._columns):
                self._data[c][i] = values.get(column, self._data[c][i])
        else:
            raise TypeError('cannot handle values of this type.')
721638
def recursive_insert(self, node, coord, data, start, end):
        """"""
        if node[0] != -1:
            left = (start, node[0])
            right = (node[0], end)

            #if left is totally within coord
            if self.is_within(left, coord):
                node[1][-1].append(data)
            elif self.overlap(left, coord):
                self.recursive_insert(node[1], coord, data, left[0], left[1])

            if self.is_within(right, coord):
                node[2][-1].append(data)
            elif self.overlap(right, coord):
                self.recursive_insert(node[2], coord, data, right[0], right[1])
38241
def insert(self, table, columns, rows):
        
        cursor = self.conn.cursor()
        if len(rows):
            templ, _args = match('INSERT INTO ?s (?S) VALUES (?X)',
                                 table, columns, rows[0])
            cursor.executemany(templ, rows)
        return cursor
914796
def _prepend_row_index(rows, index):
    """"""
    if index is None or index is False:
        return rows
    if len(index) != len(rows):
        print('index=', index)
        print('rows=', rows)
        raise ValueError('index must be as long as the number of data rows')
    rows = [[v] + list(row) for v, row in zip(index, rows)]
    return rows
702502
private String addRow(String rowId, String[] row) {
        Map<InterpolationVariable, Integer> vars = getInterpolationVariables();
        if (row.length != vars.size() - 1) {
            throw new IllegalArgumentException("Invalid numbers of columns: " + row.length + " expected: "
                                                       + (vars.size() - 1));
        }
        if (rowId == null || rowId.length() == 0) {
            rowId = getNewIdColValue();
        }
        for (Map.Entry<InterpolationVariable, Integer> entry : vars.entrySet()) {
            List<String> list = table.get(entry.getKey().getVarName());
            if (list == null) {
                list = new ArrayList<String>();
                table.put(entry.getKey().getVarName(),
                          list);
            }
            if (rowsCount != list.size()) {
                throw new IllegalArgumentException("invalid list size for " + entry.getKey() + ", expected: "
                                                           + rowsCount + " was: " + list.size());
            }
            if (ID_COLUMN_NAME.equals(entry.getKey().getVarName())) {
                list.add(rowId);
            } else {
                list.add(row[entry.getValue()]);
            }
        }
        rowsCount++;
        return rowId;
    }
1277325
function insert(arr, index, values) {
  [].splice.apply(arr, [index, 0].concat(values));
}
399230
def node_insert_after(self, node, new_node):
        """"""

        assert(not self.node_is_on_list(new_node))
        assert(node is not new_node)

        next = self.node_next(node)
        assert(next is not None)
        self.node_set_next(node, new_node)
        self.node_set_prev(new_node, node)

        self.node_set_next(new_node, next)
        self.node_set_prev(next, new_node)
1355325
public void addRow(int rowIndex, Table sourceTable) {
        for (int i = 0; i < columnCount(); i++) {
            column(i).appendObj(sourceTable.column(i).get(rowIndex));
        }
    }
437464
def insert(self, index, key, value):
        """"""
        if key in self.keyOrder:
            n = self.keyOrder.index(key)
            del self.keyOrder[n]
            if n < index:
                index -= 1
        self.keyOrder.insert(index, key)
        super(SortedDict, self).__setitem__(key, value)
1089766
def insert_statement(table, columns, values):
    """"""
    if not all(isinstance(r, (list, set, tuple)) for r in values):
        values = [[r] for r in values]
    rows = []
    for row in values:
        new_row = []
        for col in row:
            if col is None:
                new_col = 'NULL'
            elif isinstance(col, (int, float, Decimal)):
                new_col = str(MySQLConverterBase().to_mysql(col))
            else:
                string = str(MySQLConverterBase().to_mysql(col))
                if "'" in string:
                    new_col = '"' + string + '"'
                else:
                    new_col = "'" + string + "'"
            new_row.append(new_col)
        rows.append(', '.join(new_row))
    vals = '(' + '),\n\t('.join(rows) + ')'
    statement = "INSERT INTO\n\t{0} ({1}) \nVALUES\n\t{2}".format(wrap(table), cols_str(columns), vals)
    return statement
755160
def insert_after(self, target):
        """"""
        if not target.parent:
            return
        target.parent.insert(target.parent.sprites.index(target) + 1, self)
126960
def _append(self, row):
		
		self.cursor.execute(self.append_statement, self.append_attrgetter(row))
627707
def insert(self, row):
        
        data = self._convert_value(row)
        self._service.InsertRow(data, self._ss.id, self.id)
1311153
def _insert(self, bs, pos):
        """"""
        assert 0 <= pos <= self.len
        if pos > self.len // 2:
            # Inserting nearer end, so cut off end.
            end = self._slice(pos, self.len)
            self._truncateend(self.len - pos)
            self._append(bs)
            self._append(end)
        else:
            # Inserting nearer start, so cut off start.
            start = self._slice(0, pos)
            self._truncatestart(pos)
            self._prepend(bs)
            self._prepend(start)
        try:
            self._pos = pos + bs.len
        except AttributeError:
            pass
        assert self._assertsanity()
1228206
def _insert_row(self, i, index):
        
        if i == len(self._index):
            self._add_row(index)
        else:
            self._index.insert(i, index)
            for c in range(len(self._columns)):
                self._data[c].insert(i, None)
1045337
def add_row(self, row):

        """"""

        if self._field_names and len(row) != len(self._field_names):
            raise Exception("Row has incorrect number of values, (actual) %d!=%d (expected)" %(len(row),len(self._field_names)))
        if not self._field_names:
            self.field_names = [("Field %d" % (n+1)) for n in range(0,len(row))]
        self._rows.append(list(row))