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 SQL math functions · nodejs/node@3aca628

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
@@ -13,6 +13,7 @@
1313
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1414
},
1515
'defines': [
16+
'SQLITE_ENABLE_MATH_FUNCTIONS',
1617
'SQLITE_ENABLE_SESSION',
1718
'SQLITE_ENABLE_PREUPDATE_HOOK'
1819
],
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
@@ -8,6 +8,7 @@ template("sqlite_gn_build") {
88
config("sqlite_config") {
99
include_dirs = [ "." ]
1010
defines = [
11+
"SQLITE_ENABLE_MATH_FUNCTIONS",
1112
"SQLITE_ENABLE_SESSION",
1213
"SQLITE_ENABLE_PREUPDATE_HOOK",
1314
]
Collapse file

‎test/parallel/test-sqlite.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-sqlite.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,11 @@ test('PRAGMAs are supported', (t) => {
103103
{ __proto__: null, journal_mode: 'wal' },
104104
);
105105
});
106+
107+
test('math functions are enabled', (t) => {
108+
const db = new DatabaseSync(':memory:');
109+
t.assert.deepStrictEqual(
110+
db.prepare('SELECT PI() AS pi').get(),
111+
{ __proto__: null, pi: 3.141592653589793 },
112+
);
113+
});

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.