注意追加操作不只局限于json,String,也支持,也支持存储的“字节”的末尾追加“字节”。
参考:PHP Append Functionality Broke
bucket.upsert('testString', "aa", function(err, result) {
if (err) throw err;
console.log(result);
});
bucket.append('testString', "bb", function(err, result) {
if (err) throw err;
console.log(result);
});
bucket.prepend('testString', "cc", function(err, result) {
if (err) throw err;
console.log(result);
});
bucket.get('testString', function(err, result) {
if (err) throw err;
console.log(result.value);
});