aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/sqlite.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-01 19:34:02 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-01 19:34:02 -0800
commita896d6c46c5a2ed6cf28c885d3077df972e7be43 (patch)
treeec57c0c3e9d636136e551f525167d2372f1f993c /test/bun.js/sqlite.test.js
parent4eed310a459b09d167c85b166472eaaaea1e7db4 (diff)
downloadbun-a896d6c46c5a2ed6cf28c885d3077df972e7be43.tar.gz
bun-a896d6c46c5a2ed6cf28c885d3077df972e7be43.tar.zst
bun-a896d6c46c5a2ed6cf28c885d3077df972e7be43.zip
[`bun:sqlite`] ~15% perf improvement to all() and get()
Diffstat (limited to 'test/bun.js/sqlite.test.js')
-rw-r--r--test/bun.js/sqlite.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/bun.js/sqlite.test.js b/test/bun.js/sqlite.test.js
index 882454fb8..e5f83fe4d 100644
--- a/test/bun.js/sqlite.test.js
+++ b/test/bun.js/sqlite.test.js
@@ -519,4 +519,22 @@ it("latin1 supplement chars", () => {
greeting: "¿Qué sucedió?",
},
]);
+
+ // test that it doesn't break when we do a structure transition
+ db.query("SELECT * FROM foo").all()[0].booop = true;
+ db.query("SELECT * FROM foo").all()[0].beep = true;
+ expect(db.query("SELECT * FROM foo").all()).toEqual([
+ {
+ id: 1,
+ greeting: "Welcome to bun!",
+ },
+ {
+ id: 2,
+ greeting: "Español",
+ },
+ {
+ id: 3,
+ greeting: "¿Qué sucedió?",
+ },
+ ]);
});