This method will insert blob data to blob table
438391
def __delete_internal_blob(self, key):
        ''' 
        '''
        with self.get_conn() as conn:
            conn.isolation_level = None
            try:
                c = conn.cursor()
                c.execute("BEGIN")
                if key is None:
                    c.execute("DELETE FROM cache_entries WHERE key IS NULL")
                    c.execute("DELETE FROM blob_entries WHERE KEY IS NULL")
                else:
                    c.execute("DELETE FROM cache_entries WHERE key = ?", (key,))
                    c.execute("DELETE FROM blob_entries WHERE KEY = ?", (key,))
                c.execute("COMMIT")
            except:
                getLogger().debug("Cannot delete")
                return False
            return True
1317633
function insert() {
    var insertValues = this.single.insert || [];
    var sql = 'insert into ' + this.tableName + ' ';

    if (Array.isArray(insertValues)) {
      if (insertValues.length === 0) {
        return '';
      }
    } else if (typeof insertValues === 'object' && isEmpty(insertValues)) {
      return sql + this._emptyInsertValue;
    }

    var insertData = this._prepInsert(insertValues);
    this.__insertValues = insertData.values;
    if (typeof insertData === 'string') {
      sql += insertData;
    } else {
      if (insertData.columns.length) {
        sql += '(' + this.formatter.columnize(insertData.columns);
        sql += ') values (';
        sql += this.formatter.parameterize(insertData.columns);
        sql += ')';
      } else if (insertValues.length === 1 && insertValues[0]) {
        sql += this._emptyInsertValue;
      } else {
        sql = '';
      }
    }
    var out = {
      sql: sql,
      bindings: insertData.values
    };
    if (out.sql !== '') {
      out.returning = this.single.returning;
    }
    return out;
  }
308361
function update (table, columns, values) {
    if (this.typecheck) t.typecheck('update', [table, columns, values]);
    if ('string'===typeof columns) {
        columns = [columns];
        values = [values];
    }
    var result = [];
    for (var i=0; i < columns.length; i++) {
        var value = ('string'===typeof values[i]
            // X\'blob\' \'\\xblob\'
            && values[i].indexOf("X\'") != 0 && values[i].indexOf("\'\\x") != 0)
            ? this.string(values[i]) : values[i];
        result.push(columns[i]+'='+value);
    }
    return ['update',table,'set',result.join()].join(' ');
}
461619
function insert (table, object, fields) {
  var input = this

  if (input instanceof Array) {
    insertArray.call(input, table, object, fields)
  } else {
    insertObject.call(input, table, object, fields)
  }
}
621123
def appendbcolz(table, obj, check_names=True):
    

    import bcolz
    import numpy as np

    if isinstance(obj, string_types):
        ctbl = bcolz.open(obj, mode='a')
    else:
        assert hasattr(obj, 'append') and hasattr(obj, 'names'), \
            'expected rootdir or ctable, found %r' % obj
        ctbl = obj

    # setup
    dtype = ctbl.dtype
    it = iter(table)
    hdr = next(it)
    flds = list(map(text_type, hdr))

    # check names match
    if check_names:
        assert tuple(flds) == tuple(ctbl.names), 'column names do not match'

    # fill chunk-wise
    chunklen = sum(ctbl.cols[name].chunklen
                   for name in ctbl.names) // len(ctbl.names)
    while True:
        data = list(itertools.islice(it, chunklen))
        data = np.array(data, dtype=dtype)
        ctbl.append(data)
        if len(data) < chunklen:
            break

    ctbl.flush()
    return ctbl
570589
public Object add(Object data, int iOpenMode) throws DBException, RemoteException
    {
        synchronized(m_objSync)
        {
            return m_tableRemote.add(data, iOpenMode);
        }
    }
772841
def append_data(data)
      data = Encoding::ASCII_8BIT == data.encoding ? data : data.htb
      chunks << Bitcoin::Script.pack_pushdata(data)
      self
    end
595590
def to_blob
      str = StringIO.new
      str.set_encoding("ASCII-8BIT")
      write(str)
      str.string
    end
523825
def put_blob(storage_conn=None, **kwargs):
    '''
    
    '''
    if not storage_conn:
        storage_conn = get_storage_conn(opts=kwargs)

    if 'container' not in kwargs:
        raise SaltSystemExit(code=42, msg='The blob container name must be specified as "container"')

    if 'name' not in kwargs:
        raise SaltSystemExit(code=42, msg='The blob name must be specified as "name"')

    if 'blob_path' not in kwargs and 'blob_content' not in kwargs:
        raise SaltSystemExit(
            code=42,
            msg='Either a path to a file needs to be passed in as "blob_path" '
            'or the contents of a blob as "blob_content."'
        )

    blob_kwargs = {
        'container_name': kwargs['container'],
        'blob_name': kwargs['name'],
        'cache_control': kwargs.get('cache_control', None),
        'content_language': kwargs.get('content_language', None),
        'content_md5': kwargs.get('content_md5', None),
        'x_ms_blob_content_type': kwargs.get('blob_content_type', None),
        'x_ms_blob_content_encoding': kwargs.get('blob_content_encoding', None),
        'x_ms_blob_content_language': kwargs.get('blob_content_language', None),
        'x_ms_blob_content_md5': kwargs.get('blob_content_md5', None),
        'x_ms_blob_cache_control': kwargs.get('blob_cache_control', None),
        'x_ms_meta_name_values': kwargs.get('meta_name_values', None),
        'x_ms_lease_id': kwargs.get('lease_id', None),
    }
    if 'blob_path' in kwargs:
        data = storage_conn.put_block_blob_from_path(
            file_path=kwargs['blob_path'],
            **blob_kwargs
        )
    elif 'blob_content' in kwargs:
        data = storage_conn.put_block_blob_from_bytes(
            blob=kwargs['blob_content'],
            **blob_kwargs
        )

    return data
1368484
def with_blob(self, blob):
        
        content = json.loads(blob.content)
        self.partition_id = content["partition_id"]
        self.owner = content["owner"]
        self.token = content["token"]
        self.epoch = content["epoch"]
        self.offset = content["offset"]
        self.sequence_number = content["sequence_number"]
        self.event_processor_context = content.get("event_processor_context")
1312919
function blobify(data) {
	if(typeof data === "string") return s2ab(data);
	if(Array.isArray(data)) return a2u(data);
	return data;
}
1133158
def WriteBlobs(self, blob_id_data_map, cursor=None):
    """"""
    chunks = []
    for blob_id, blob in iteritems(blob_id_data_map):
      chunks.extend(_BlobToChunks(blob_id.AsBytes(), blob))
    for values in _PartitionChunks(chunks):
      _Insert(cursor, "blobs", values)
111351
def insert(self, table, data_list, return_cols='id'):
        
        data_list = copy.deepcopy(data_list)  # Create deepcopy so the original list does not get modified
        # Make sure that `data_list` is a list
        if not isinstance(data_list, list):
            data_list = [data_list]
        # Make sure data_list has content
        if len(data_list) == 0:
            # No need to continue
            return []

        # Data in the list must be dicts (just check the first one)
        if not isinstance(data_list[0], dict):
            logger.critical("Data must be a list of dicts")
            # Do not return here, let the exception handle the error that will be thrown when the query runs

        # Make sure return_cols is a list
        if return_cols is None or len(return_cols) == 0 or return_cols[0] is None:
            return_cols = ''
        elif not isinstance(return_cols, list):
            return_cols = [return_cols]

        if len(return_cols) > 0:
            return_cols = 'RETURNING ' + ','.join(return_cols)

        try:
            with self.getcursor() as cur:
                query = "INSERT INTO {table} ({fields}) VALUES {values} {return_cols}"\
                        .format(table=table,
                                fields='"{0}"'.format('", "'.join(data_list[0].keys())),
                                values=','.join(['%s'] * len(data_list)),
                                return_cols=return_cols,
                                )
                values = []
                for row in [tuple(v.values()) for v in data_list]:
                    values.append(_check_values(row))

                query = cur.mogrify(query, values)
                cur.execute(query)

                try:
                    return cur.fetchall()
                except Exception:
                    return None

        except Exception as e:
            logger.exception("Error inserting data")
            logger.debug("Error inserting data: {data}".format(data=data_list))
            raise e.with_traceback(sys.exc_info()[2])
63309
public Blob update() {
    // [START update]
    Map<String, String> newMetadata = new HashMap<>();
    newMetadata.put("key", "value");
    blob.toBuilder().setMetadata(null).build().update();
    Blob updatedBlob = blob.toBuilder().setMetadata(newMetadata).build().update();
    // [END update]
    return updatedBlob;
  }
1201493
function writeblobs(data, cb) {
    var ab = asyncbuilder(cb);
    var reqQ = new Queue( { concurrency: 5 } );

    u.each(data, function(file) {
      var append = ab.asyncAppend();
      var blob = { encoding: file.buffer ? 'base64' : 'utf-8',
                   content: file.buffer ? file.buffer.toString('base64') : (file.text || '') };

      reqQ.push(function(reqDone) {
        post(self.endpoint + '/git/blobs', blob, function(err, ghblob) {
          if (ghblob) { file.sha = ghblob.sha; }
          append(err, file);
          reqDone();
        });
      });

    });
    ab.complete();
  }
706089
def insert(self, data):
        
        return json.loads(self._post('', headers=KVStoreCollectionData.JSON_HEADER, body=data).body.read().decode('utf-8'))
1016133
function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
  {
                $sql = "UPDATE $table SET $column=? WHERE $where";
                $stmtid = ads_prepare($this->_connectionID,$sql);
                if ($stmtid == false){
                  $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
                  return false;
          }
                if (! ads_execute($stmtid,array($val),array(SQL_BINARY) )){
                        if ($this->_haserrorfunctions){
                                $this->_errorMsg = ads_errormsg();
                    $this->_errorCode = ads_error();
            }
                        return false;
           }
                 return TRUE;
        }