We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67bd3c6 commit 60a20e1Copy full SHA for 60a20e1
test/blob.test.js
@@ -51,4 +51,18 @@ describe('blob', function() {
51
done();
52
});
53
54
+
55
+ it('should be able to select empty blobs', function(done) {
56
+ const empty = new sqlite3.Database(':memory:');
57
+ empty.serialize(function() {
58
+ empty.run("CREATE TABLE files (id INTEGER PRIMARY KEY, data BLOB)");
59
+ empty.run("INSERT INTO files (data) VALUES (X'')");
60
+ });
61
+ empty.get("SELECT data FROM files LIMIT 1", (err, row) => {
62
+ if (err) throw err;
63
+ assert.ok(Buffer.isBuffer(row.data));
64
+ assert.equal(row.data.length, 0);
65
+ empty.close(done);
66
67
+ })
68
0 commit comments