Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deps/sqlite/sqlite.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'SQLITE_ENABLE_FTS5',
'SQLITE_ENABLE_GEOPOLY',
'SQLITE_ENABLE_MATH_FUNCTIONS',
'SQLITE_ENABLE_PERCENTILE',
'SQLITE_ENABLE_PREUPDATE_HOOK',
'SQLITE_ENABLE_RBU',
'SQLITE_ENABLE_RTREE',
Expand Down
1 change: 1 addition & 0 deletions deps/sqlite/unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ template("sqlite_gn_build") {
"SQLITE_ENABLE_FTS5",
"SQLITE_ENABLE_GEOPOLY",
"SQLITE_ENABLE_MATH_FUNCTIONS",
"SQLITE_ENABLE_PERCENTILE",
"SQLITE_ENABLE_PREUPDATE_HOOK",
"SQLITE_ENABLE_RBU",
"SQLITE_ENABLE_RTREE",
Expand Down
15 changes: 14 additions & 1 deletion test/parallel/test-sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,19 @@ suite('SQL APIs enabled at build time', () => {
);
});

test('percentile is enabled', (t) => {
const db = new DatabaseSync(':memory:');
db.exec(`
CREATE TABLE t1 (x INTEGER);
INSERT INTO t1 (x) VALUES (1), (2), (3), (4), (5);
`);

t.assert.deepStrictEqual(
db.prepare('SELECT percentile(x, 50) AS p50 FROM t1;').get(),
{ __proto__: null, p50: 3 },
);
});

test('dbstat is enabled', (t) => {
const db = new DatabaseSync(nextDb());
t.after(() => { db.close(); });
Expand Down Expand Up @@ -244,7 +257,7 @@ suite('SQL APIs enabled at build time', () => {
);
});

test('fts3 parenthesis', (t) => {
test('fts3 parenthesis is enabled', (t) => {
const db = new DatabaseSync(':memory:');
db.exec(`
CREATE VIRTUAL TABLE t1 USING fts3(content TEXT);
Expand Down