{"push_id":537799314,"size":1,"distinct_size":1,"ref":"refs/heads/hotfix/batch-20141231","head":"38c61229aa36368bcd00e067ba5c988163b1fb06","before":"94069a5bfd5956ea5808c9688ab9f6c9f6341575","commits":[{"sha":"38c61229aa36368bcd00e067ba5c988163b1fb06","author":{"email":"b8befde061d2591163179adbd2ab29705bb17a8a@spicypixel.com","name":"Aaron Oneal"},"message":"Improve SQL blob marshaling.\n\nWeb SQL doesn't actually support storing binary data in SQL blobs using the SQLite blob methods. It serializes binary data using strings with the SQLite text methods which results in data not being stored as a blob. This can be problematic in Cordova if you need to work with existing SQLite databases.\n\nThis change adds more robust support for binary serialization. `SQLBlob` objects can be used in statements and these will be converted to a `sqlblob` URI with base64 or URL encoded data that is unpacked on the native side and stored as a proper binary blob.\n\nWhen reading a blob back from the native side, the previous behavior was to return the blob as base64. Now, the blob can be decoded as a `SQLBlob` object which can then be unpacked in JavaScript to base64, ArrayBuffer, or binary string.\n\n  tx.executeSql('INSERT INTO test_table VALUES (?)', [new SQLBlob(arrayBuffer)]);\n\n  tx.executeSql(\"SELECT foo FROM test_table\", [], function(tx, res) {\n    var blob = new SQLBlob(res.rows.item(0).foo);\n    blob.toBase64();\n    blob.toBinaryString();\n    blob.toArrayBuffer();\n  });\n\nTests were added to verify the behavior and to demonstrate usage.\n\nOnly iOS and Android were updated. Windows Phone did not previously have blob support; saving for a future update.","distinct":true,"url":"https://api.github.com/repos/spicypixel/cordova-plugin-websql/commits/38c61229aa36368bcd00e067ba5c988163b1fb06"}]}