| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ccb2ddb commit b6c2e91
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,7 @@ | |||
| 13 | 13 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | |
| 14 | 14 | }, | |
| 15 | 15 | 'defines': [ | |
| 16 | + 'SQLITE_ENABLE_MATH_FUNCTIONS', | ||
| 16 | 17 | 'SQLITE_ENABLE_SESSION', | |
| 17 | 18 | 'SQLITE_ENABLE_PREUPDATE_HOOK' | |
| 18 | 19 | ], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ template("sqlite_gn_build") { | |||
| 8 | 8 | config("sqlite_config") { | |
| 9 | 9 | include_dirs = [ "." ] | |
| 10 | 10 | defines = [ | |
| 11 | + "SQLITE_ENABLE_MATH_FUNCTIONS", | ||
| 11 | 12 | "SQLITE_ENABLE_SESSION", | |
| 12 | 13 | "SQLITE_ENABLE_PREUPDATE_HOOK", | |
| 13 | 14 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,3 +103,11 @@ test('PRAGMAs are supported', (t) => { | |||
| 103 | 103 | { __proto__: null, journal_mode: 'wal' }, | |
| 104 | 104 | ); | |
| 105 | 105 | }); | |
| 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 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments