google-cloud v0.40.0
·
43985 commits
to main
since this release
Updating
$ npm install google-cloud@0.40.0⚠️ Breaking Changes
Bigtable will return a Buffer instead of base64 with decode: false
Previously when setting the decode option to false, we would return a base64 encoded string. Now we return a Buffer instance instead.
Before
var bufferData = new Buffer('hello!');
row.save('family:column', bufferData, function(err) {
if (err) {
// Error handling omitted.
}
row.get('family:column', { decode: false }, function(err, data) {
if (err) {
// Error handling omitted.
}
// A base64 string is returned.
var returnedData = data.family.column[0].value;
// typeof returnedData === 'string'
// Manually convert the base64 string back to a Buffer.
var returnedBufferData = new Buffer(bufferData, 'base64');
});
});After
var bufferData = new Buffer('hello!');
row.save('family:column', bufferData, function(err) {
if (err) {
// Error handling omitted.
}
row.get('family:column', { decode: false }, function(err, data) {
if (err) {
// Error handling omitted.
}
// A Buffer is returned.
var returnedData = data.family.column[0].value;
// Buffer.isBuffer(returnedData) === true
});
});Features
- BigQuery (#1422, #1564): Automatically assign
recordtype for nested schemas. - Bigtable (#1526, #1556): Return Buffer objects with
decode: false.
Fixes
- Bigtable, Datastore, Language, Logging, Pub/Sub (#1543, #1544): Upgrade
gRPCdependency, which addresses a memory leak issue. - Bigtable, Datastore, Language, Logging, Pub/Sub (#1418, #1563): Automatically update metadata on an object after calling
getMetadata(). - Bigtable (#1554, #1555): Properly format the filter key when getting a range of rows.