GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlite: enable Percentile extension · nodejs/node@637bda0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/sqlite
    • sqlite.gyp
    • unofficial.gni
  • test/parallel
    • test-sqlite.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/sqlite/sqlite.gyp‎

Copy file name to clipboardExpand all lines: deps/sqlite/sqlite.gyp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'SQLITE_ENABLE_FTS5',
2222
'SQLITE_ENABLE_GEOPOLY',
2323
'SQLITE_ENABLE_MATH_FUNCTIONS',
24+
'SQLITE_ENABLE_PERCENTILE',
2425
'SQLITE_ENABLE_PREUPDATE_HOOK',
2526
'SQLITE_ENABLE_RBU',
2627
'SQLITE_ENABLE_RTREE',
Collapse file

‎deps/sqlite/unofficial.gni‎

Copy file name to clipboardExpand all lines: deps/sqlite/unofficial.gni
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ template("sqlite_gn_build") {
1515
"SQLITE_ENABLE_FTS5",
1616
"SQLITE_ENABLE_GEOPOLY",
1717
"SQLITE_ENABLE_MATH_FUNCTIONS",
18+
"SQLITE_ENABLE_PERCENTILE",
1819
"SQLITE_ENABLE_PREUPDATE_HOOK",
1920
"SQLITE_ENABLE_RBU",
2021
"SQLITE_ENABLE_RTREE",
Collapse file

‎test/parallel/test-sqlite.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-sqlite.js
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,19 @@ suite('SQL APIs enabled at build time', () => {
204204
);
205205
});
206206

207+
test('percentile is enabled', (t) => {
208+
const db = new DatabaseSync(':memory:');
209+
db.exec(`
210+
CREATE TABLE t1 (x INTEGER);
211+
INSERT INTO t1 (x) VALUES (1), (2), (3), (4), (5);
212+
`);
213+
214+
t.assert.deepStrictEqual(
215+
db.prepare('SELECT percentile(x, 50) AS p50 FROM t1;').get(),
216+
{ __proto__: null, p50: 3 },
217+
);
218+
});
219+
207220
test('dbstat is enabled', (t) => {
208221
const db = new DatabaseSync(nextDb());
209222
t.after(() => { db.close(); });
@@ -244,7 +257,7 @@ suite('SQL APIs enabled at build time', () => {
244257
);
245258
});
246259

247-
test('fts3 parenthesis', (t) => {
260+
test('fts3 parenthesis is enabled', (t) => {
248261
const db = new DatabaseSync(':memory:');
249262
db.exec(`
250263
CREATE VIRTUAL TABLE t1 USING fts3(content TEXT);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.