Insert mutates the data T.
336294
def insert(
            self, M_c, T, X_L_list, X_D_list, new_rows=None, N_GRID=31,
            CT_KERNEL=0):
        """"""
        if new_rows is None:
            raise ValueError("new_row must exist")

        if not isinstance(new_rows, list):
            raise TypeError('new_rows must be list of lists')
            if not isinstance(new_rows[0], list):
                raise TypeError('new_rows must be list of lists')

        X_L_list, X_D_list, was_multistate = su.ensure_multistate(
            X_L_list, X_D_list)

        # get insert arg tuples
        arg_tuples = self.get_insert_arg_tuples(
            M_c, T, X_L_list, X_D_list, new_rows, N_GRID, CT_KERNEL)

        chain_tuples = self.mapper(self.do_insert, arg_tuples)
        X_L_list, X_D_list = zip(*chain_tuples)

        if not was_multistate:
            X_L_list, X_D_list = X_L_list[0], X_D_list[0]

        T.extend(new_rows)
        ret_tuple = X_L_list, X_D_list, T
        return ret_tuple
1232506
private static Mutation createMutation(byte[] colName, byte[] colValue, long timestamp) {
        if (colValue == null) {
            colValue = EMPTY_BYTES;
        }
        Column col = new Column();
        col.setName(colName);
        col.setValue(colValue);
        col.setTimestamp(timestamp);
        
        ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
        cosc.setColumn(col);
        
        Mutation mutation = new Mutation();
        mutation.setColumn_or_supercolumn(cosc);
        return mutation;
    }
933191
def insert_data(self, node, data, start, end):
        """"""
        for item in data:
            self.recursive_insert(node, [item[0], item[1]], item[-1], start, end)
71995
def add_mutations_and_flush(self, table, muts):
        
        if not isinstance(muts, list) and not isinstance(muts, tuple):
            muts = [muts]
        cells = {}
        for mut in muts:
            cells.setdefault(mut.row, []).extend(mut.updates)
        self.client.updateAndFlush(self.login, table, cells)
451546
def insert(self, i, v):
        """"""
        self.list1.insert(i, v)
        self.list2.insert(i, v.obj)
        if isinstance(v, EpBunch):
            v.theidf = self.theidf
548826
@Override
  public <SN,N,V> Mutator<K> addInsertion(K key, String cf, HSuperColumn<SN,N,V> sc) {
    getPendingMutations().addSuperInsertion(key, Arrays.asList(cf),
        ((HSuperColumnImpl<SN,N,V>) sc).toThrift());
    return this;
  }
314847
public BulkMutation add(@Nonnull ByteString rowKey, @Nonnull Mutation mutation) {
    Preconditions.checkNotNull(rowKey);
    Preconditions.checkNotNull(mutation);

    builder.addEntries(
        MutateRowsRequest.Entry.newBuilder()
            .setRowKey(rowKey)
            .addAllMutations(mutation.getMutations())
            .build());
    return this;
  }
1202941
def insert(cls, val):
        
        with db.session.begin_nested():
            obj = cls(recid=val)
            db.session.add(obj)
            cls._set_sequence(cls.max())
139640
def _modify(self, **patch):
        """"""

        requests_params, patch_uri, session, read_only = \
            self._prepare_put_or_patch(patch)
        self._check_for_boolean_pair_reduction(patch)
        read_only_mutations = []
        for attr in read_only:
            if attr in patch:
                read_only_mutations.append(attr)
        if read_only_mutations:
            msg = 'Attempted to mutate read-only attribute(s): %s' \
                % read_only_mutations
            raise AttemptedMutationOfReadOnly(msg)

        patch = self._prepare_request_json(patch)
        response = session.patch(patch_uri, json=patch, **requests_params)
        self._local_update(response.json())
1112404
def mutate(self):
        
        self._client.post('{}/mutate'.format(Instance.api_endpoint), model=self)

        return True
451494
function insertData(filename, tableSchema) {
  return getSampleData(filename).then(
      function(data) {
        var rows = data.map(function(obj) {
          return tableSchema.createRow(obj);
        });
        return db.insert().into(tableSchema).values(rows);
      });
}
674207
public <T> MutateInBuilder arrayInsert(String path, T value) {
        asyncBuilder.arrayInsert(path, value);
        return this;
    }
304933
def insert_into_obj(self, data):
        '''
        '''
        if not data:
            data = ''
        size = len(data)
        n1 = size%256
        n2 = size/256
            
        self.send('^DI'+chr(n1)+chr(n2)+data)
244751
def insert(to_add, after: nil, before: nil)
      if after && before || !after && !before
        raise ArgumentError, 'either :after or :before keys should be passed'
      end
      matcher = after || before
      matcher_proc = if matcher.is_a?(Proc)
                       __to_matcher(&matcher)
                     else
                       __to_matcher(matcher)
                     end
      node = each_node.find(&matcher_proc)
      return unless node
      new_node = after ? insert_after_node(to_add, node) : insert_before_node(to_add, node)
      new_node.data
    end
38315
def p_insertx(self,t):
    ""
    t[0] = InsertX(t[3],t[4],t[7].children,t[9])
1266263
def insert_many(self, it):
        """"""
        unique_indexes = self._uniqueIndexes  # [ind for ind in self._indexes.values() if ind.is_unique]
        NO_SUCH_ATTR = object()
        new_objs = list(it)
        if unique_indexes:
            for ind in unique_indexes:
                ind_attr = ind.attr
                new_keys = dict((getattr(obj, ind_attr, NO_SUCH_ATTR), obj) for obj in new_objs)
                if not ind.accept_none and (None in new_keys or NO_SUCH_ATTR in new_keys):
                    raise KeyError("unique key cannot be None or blank for index %s" % ind_attr, 
                                    [ob for ob in new_objs if getattr(ob, ind_attr, NO_SUCH_ATTR) is None])
                if len(new_keys) < len(new_objs):
                    raise KeyError("given sequence contains duplicate keys for index %s" % ind_attr)
                for key in new_keys:
                    if key in ind:
                        obj = new_keys[key]
                        raise KeyError("duplicate unique key value '%s' for index %s" % (getattr(obj, ind_attr), ind_attr), 
                                       new_keys[key])
                    
        for obj in new_objs:
            self.obs.append(obj)
            for attr, ind in self._indexes.items():
                obval = getattr(obj, attr)
                ind[obval] = obj

        return self
674358
def _insert_data(self, name, value, timestamp, interval, config, **kwargs):
    ''''''
    kwargs = {
      'name'        : name,
      'interval'    : interval,
      'insert_time' : time.time(),
      'i_time'      : config['i_calc'].to_bucket(timestamp),
      'value'       : value
    }
    if not config['coarse']:
      kwargs['r_time'] = config['r_calc'].to_bucket(timestamp)
    stmt = self._table.insert().values(**kwargs)
    conn = self._client.connect()
    result = conn.execute(stmt)