sqlmath 2026.8.31__tar.gz → 2026.10.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.github/workflows/ci.yml +4 -4
  2. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.gitignore +1 -0
  3. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/CHANGELOG.md +12 -0
  4. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/PKG-INFO +51 -9
  5. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/README.md +50 -8
  6. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/jslint.mjs +3121 -1431
  7. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/jslint_ci.sh +407 -339
  8. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/package.json +1 -1
  9. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/pyproject.toml +3 -3
  10. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/setup.py +2 -2
  11. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath/__init__.py +2 -2
  12. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath.mjs +40 -37
  13. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath_base.c +41 -2
  14. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath_base.h +12 -6
  15. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath_browser.mjs +103 -104
  16. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath_external_sqlite.c +12 -2
  17. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test.mjs +258 -63
  18. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test.py +3 -3
  19. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.ci.sh +0 -0
  20. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.gitconfig +0 -0
  21. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.github/workflows/publish.yml +0 -0
  22. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.github/workflows/publish_pypi_test.yml +0 -0
  23. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/.npmignore +0 -0
  24. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/LICENSE +0 -0
  25. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/MANIFEST.in +0 -0
  26. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_image_folder_open_solid.svg +0 -0
  27. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_image_github_brands.svg +0 -0
  28. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_image_logo_256.html +0 -0
  29. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_image_logo_256.png +0 -0
  30. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_image_logo_256.svg +0 -0
  31. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/asset_sqlmath_external_rollup.js +0 -0
  32. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/cpplint.py +0 -0
  33. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/csslint.js +0 -0
  34. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/indent.exe +0 -0
  35. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/index.html +0 -0
  36. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/libiconv2.dll +0 -0
  37. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/libintl3.dll +0 -0
  38. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/sqlmath_wrapper_wasm.js +0 -0
  39. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test_data_sinefit.csv +0 -0
  40. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test_lgbm_binary.test +0 -0
  41. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test_lgbm_binary.train +0 -0
  42. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test_lgbm_numpy.py +0 -0
  43. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/test_lgbm_preb.txt +0 -0
  44. {sqlmath-2026.8.31 → sqlmath-2026.10.30}/zlib.v1.3.1.vcpkg.x64-windows-static.lib +0 -0
@@ -28,10 +28,10 @@ jobs:
28
28
  node_version:
29
29
  - "24"
30
30
  os:
31
- - macos-15
32
31
  - macos-15-intel
33
- - ubuntu-22.04
34
- - windows-2022
32
+ - macos-latest
33
+ - ubuntu-26.04
34
+ - windows-latest
35
35
  python_version:
36
36
  - "3.12"
37
37
  # base - .github/workflows/ci.yml - beg
@@ -41,7 +41,7 @@ jobs:
41
41
  v${{ matrix.node_version }}
42
42
  ${{ matrix.architecture }}
43
43
  ${{ matrix.os }}
44
- CI_MATRIX_NAME_MAIN: "node v24 x64 ubuntu-22.04"
44
+ CI_MATRIX_NAME_MAIN: "node v24 x64 ubuntu-26.04"
45
45
  CI_MATRIX_NODE_VERSION: ${{ matrix.node_version }}
46
46
  CI_MATRIX_NODE_VERSION_MAIN: "24"
47
47
  CI_WORKFLOW_NAME: >
@@ -11,6 +11,7 @@ _*
11
11
  temp*
12
12
  tmp/
13
13
  undefined
14
+ ~*
14
15
 
15
16
  # nodejs
16
17
  build/
@@ -7,6 +7,18 @@
7
7
  - sqlite - Add similar error-handling from builtin-sql-function PERCENTILE() into custom-sql-function QUANTILE().
8
8
  - none
9
9
 
10
+ # v2026.10.30
11
+ - jstest - Collect each describe's tests before running them, and report every failed, hung or crashed test at exit.
12
+ - jslint - Revamp cause-based testing on option trace and V8 block coverage, replacing the runtime hook and option test_cause.
13
+ - jslint - Report: Functions - Copy each signature from its source text, keeping default values.
14
+
15
+ # v2026.9.29
16
+ - sqlmath - Update sql-function WIN_COINFLIP2() to calculate 'biasba50' - balanced-accuracy-minus-50.
17
+ - jslint-ecma - Add Exponentiation-assignment-operator '**=' support.
18
+ - jslint-cli - Add cli-option jslint_autofix=filename to autofix whitespace-warnings, and add function jslint_phase6_autofix().
19
+ - jslint-ecma - Add ES2018-feature Asynchronous Iteration - for await...of.
20
+ - jslint-cli - Skip dotfiles when linting a directory.
21
+
10
22
  # v2026.8.31
11
23
  - jslint-ci - Update ci-shell-function shGitLsTree() to include sha256 hash of files.
12
24
  - sqlmath - Cleanup c-function winSinefitSnr().
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlmath
3
- Version: 2026.8.31
3
+ Version: 2026.10.30
4
4
  Summary: sqlite for data-science
5
5
  Author: Kai Zhu
6
6
  Requires-Python: >=3.10
@@ -34,7 +34,7 @@ Description-Content-Type: text/markdown
34
34
 
35
35
  # Status
36
36
 
37
- | Branch | [master<br>(v2026.8.31)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
37
+ | Branch | [master<br>(v2026.10.30)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
38
38
  |--:|:--:|:--:|:--:|
39
39
  | CI | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Amaster) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Abeta) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Aalpha) |
40
40
  | Coverage | [![coverage](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/index.html) |
@@ -43,6 +43,7 @@ Description-Content-Type: text/markdown
43
43
 
44
44
 
45
45
  <br><br>
46
+
46
47
  # Table of Contents
47
48
 
48
49
  1. [Web Demo](#web-demo)
@@ -103,6 +104,7 @@ Description-Content-Type: text/markdown
103
104
 
104
105
 
105
106
  <br><br>
107
+
106
108
  # Web Demo
107
109
  - https://sqlmath.github.io/sqlmath/index.html
108
110
 
@@ -110,6 +112,7 @@ Description-Content-Type: text/markdown
110
112
 
111
113
 
112
114
  <br><br>
115
+
113
116
  # Why sqlmath?
114
117
 
115
118
  SQLite is everywhere — it's the most deployed database in the world. But it lacks the statistical and ML functions needed for data-science. sqlmath fixes that.
@@ -122,10 +125,12 @@ SQLite is everywhere — it's the most deployed database in the world. But it la
122
125
 
123
126
 
124
127
  <br><br>
128
+
125
129
  # Quickstart
126
130
 
127
131
 
128
132
  <br><br>
133
+
129
134
  ### Python
130
135
 
131
136
  ```shell
@@ -160,6 +165,7 @@ db_close(db)
160
165
 
161
166
 
162
167
  <br><br>
168
+
163
169
  ### JavaScript (Node.js)
164
170
 
165
171
  ```shell
@@ -190,16 +196,19 @@ await dbCloseAsync(db);
190
196
 
191
197
 
192
198
  <br><br>
199
+
193
200
  ### Browser (WebAssembly)
194
201
 
195
202
  Try it live: **[sqlmath.github.io/sqlmath](https://sqlmath.github.io/sqlmath/index.html)**
196
203
 
197
204
 
198
205
  <br><br>
206
+
199
207
  # Built-in SQL Functions
200
208
 
201
209
 
202
210
  <br><br>
211
+
203
212
  ### Math
204
213
 
205
214
  | Function | Description |
@@ -215,6 +224,7 @@ Try it live: **[sqlmath.github.io/sqlmath](https://sqlmath.github.io/sqlmath/ind
215
224
 
216
225
 
217
226
  <br><br>
227
+
218
228
  ### Statistics (Aggregate)
219
229
 
220
230
  | Function | Description |
@@ -226,6 +236,7 @@ Try it live: **[sqlmath.github.io/sqlmath](https://sqlmath.github.io/sqlmath/ind
226
236
 
227
237
 
228
238
  <br><br>
239
+
229
240
  ### Statistics (Scalar)
230
241
 
231
242
  | Function | Description |
@@ -235,6 +246,7 @@ Try it live: **[sqlmath.github.io/sqlmath](https://sqlmath.github.io/sqlmath/ind
235
246
 
236
247
 
237
248
  <br><br>
249
+
238
250
  ### Arrays
239
251
 
240
252
  | Function | Description |
@@ -246,12 +258,14 @@ Try it live: **[sqlmath.github.io/sqlmath](https://sqlmath.github.io/sqlmath/ind
246
258
 
247
259
 
248
260
  <br><br>
261
+
249
262
  ### Date/Time
250
263
 
251
264
  sqlmath extends SQLite's date functions with integer-format conversions (YYYYMMDDHHMMSS).
252
265
 
253
266
 
254
267
  <br><br>
268
+
255
269
  ### Time Series / Signal Processing
256
270
 
257
271
  | Function | Description |
@@ -261,6 +275,7 @@ sqlmath extends SQLite's date functions with integer-format conversions (YYYYMMD
261
275
 
262
276
 
263
277
  <br><br>
278
+
264
279
  ### Compression
265
280
 
266
281
  | Function | Description |
@@ -272,6 +287,7 @@ sqlmath extends SQLite's date functions with integer-format conversions (YYYYMMD
272
287
 
273
288
 
274
289
  <br><br>
290
+
275
291
  ### Type Casting
276
292
 
277
293
  | Function | Description |
@@ -283,6 +299,7 @@ sqlmath extends SQLite's date functions with integer-format conversions (YYYYMMD
283
299
 
284
300
 
285
301
  <br><br>
302
+
286
303
  ### Cryptography
287
304
 
288
305
  | Function | Description |
@@ -296,6 +313,7 @@ SELECT HEX(sha256('hello')) AS hash;
296
313
 
297
314
 
298
315
  <br><br>
316
+
299
317
  # Machine Learning with LightGBM
300
318
 
301
319
  sqlmath embeds [LightGBM](https://lightgbm.readthedocs.io/) for gradient boosting directly in SQL queries. Train models on your data without leaving SQL — no data shuffle to Python needed.
@@ -304,6 +322,7 @@ sqlmath embeds [LightGBM](https://lightgbm.readthedocs.io/) for gradient boostin
304
322
 
305
323
 
306
324
  <br><br>
325
+
307
326
  ### Training from a Table
308
327
 
309
328
  `LGBM_TRAINFROMTABLE` is an **aggregate function** — it consumes rows like `SUM()` or `AVG()`, but outputs a trained model BLOB.
@@ -336,6 +355,7 @@ FROM training_data;
336
355
 
337
356
 
338
357
  <br><br>
358
+
339
359
  ### Prediction
340
360
 
341
361
  ```sql
@@ -355,6 +375,7 @@ FROM test_data;
355
375
 
356
376
 
357
377
  <br><br>
378
+
358
379
  ### Real-World Example: Credit Card Fraud Detection
359
380
 
360
381
  From the [Kaggle notebook](https://www.kaggle.com/code/kaizhu256/sql-is-all-you-need) — training on 284,807 transactions with 0.17% fraud rate:
@@ -403,6 +424,7 @@ db_exec(db=db, sql="""
403
424
 
404
425
 
405
426
  <br><br>
427
+
406
428
  ### LightGBM Functions
407
429
 
408
430
  | Function | Type | Description |
@@ -423,14 +445,16 @@ Full notebook with fraud detection, intraday trading signals, and model persiste
423
445
  **Kaggle Environment:**
424
446
  - Linux x64, Python 3.12, Node.js 24
425
447
  - Datasets: [Credit Card Fraud](https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud) (284K transactions), SPY intraday OHLCV
426
- - sqlmath installs via `pip install sqlmath==2026.8.31`
448
+ - sqlmath installs via `pip install sqlmath==2026.10.30`
427
449
 
428
450
 
429
451
  <br><br>
452
+
430
453
  # Use Cases
431
454
 
432
455
 
433
456
  <br><br>
457
+
434
458
  ### Financial Data Analysis
435
459
 
436
460
  ```python
@@ -459,6 +483,7 @@ db_close(db)
459
483
 
460
484
 
461
485
  <br><br>
486
+
462
487
  ### Embedded ML Pipelines
463
488
 
464
489
  Train and deploy models without data movement:
@@ -485,6 +510,7 @@ db_file_save(db=db, filename="scored_data.sqlite")
485
510
 
486
511
 
487
512
  <br><br>
513
+
488
514
  ### Data Compression & Hashing
489
515
 
490
516
  ```sql
@@ -501,6 +527,7 @@ HAVING COUNT(*) > 1;
501
527
 
502
528
 
503
529
  <br><br>
530
+
504
531
  # Why sqlmath vs Alternatives?
505
532
 
506
533
  | Feature | sqlmath | pandas | DuckDB | sqlite3 |
@@ -508,14 +535,14 @@ HAVING COUNT(*) > 1;
508
535
  | In-database ML | ✅ LightGBM | ❌ | ❌ | ❌ |
509
536
  | Zero data shuffle | ✅ | ❌ | ✅ | ✅ |
510
537
  | Statistical functions | ✅ 20+ | ✅ | ✅ | ❌ |
511
- | Browser support | ✅ WASM | ❌ | ❌ | ❌ |
538
+ | Browser support | ✅ WASM + LightGBM | ❌ | ✅ DuckDB-Wasm | ✅ official WASM |
512
539
  | Single file deployment | ✅ | ❌ | ✅ | ✅ |
513
540
  | Memory efficiency | ✅ Streaming | ❌ In-memory | ✅ | ✅ |
514
541
 
515
542
  **Choose sqlmath when:**
516
543
  - You need ML training/inference inside the database
517
544
  - Your data is already in SQLite
518
- - You want browser-based analytics (WebAssembly)
545
+ - You want ML training/inference in the browser (WebAssembly)
519
546
  - You need statistical functions beyond basic SQL
520
547
 
521
548
  **Choose pandas when:**
@@ -530,6 +557,7 @@ HAVING COUNT(*) > 1;
530
557
 
531
558
 
532
559
  <br><br>
560
+
533
561
  # Python API Reference
534
562
 
535
563
  ```python
@@ -547,6 +575,7 @@ from sqlmath import (
547
575
 
548
576
 
549
577
  <br><br>
578
+
550
579
  ### db_exec()
551
580
 
552
581
  ```python
@@ -562,6 +591,7 @@ result = db_exec(
562
591
 
563
592
 
564
593
  <br><br>
594
+
565
595
  # Node.js API Reference
566
596
  - https://sqlmath.github.io/sqlmath/apidoc.html
567
597
 
@@ -569,6 +599,7 @@ result = db_exec(
569
599
 
570
600
 
571
601
  <br><br>
602
+
572
603
  # Platform Notes
573
604
 
574
605
  The JavaScript (Node.js) binding is more mature than Python. Key differences:
@@ -584,10 +615,12 @@ The JavaScript (Node.js) binding is more mature than Python. Key differences:
584
615
 
585
616
 
586
617
  <br><br>
618
+
587
619
  # Building from Source
588
620
 
589
621
 
590
622
  <br><br>
623
+
591
624
  ### Prerequisites
592
625
 
593
626
  - Node.js 24+
@@ -596,6 +629,7 @@ The JavaScript (Node.js) binding is more mature than Python. Key differences:
596
629
 
597
630
 
598
631
  <br><br>
632
+
599
633
  ### Build
600
634
 
601
635
  ```shell
@@ -614,6 +648,7 @@ sh jslint_ci.sh shCiBuildWasm
614
648
 
615
649
 
616
650
  <br><br>
651
+
617
652
  ### Run Tests
618
653
 
619
654
  ```shell
@@ -629,6 +664,7 @@ npm run test --fast
629
664
 
630
665
 
631
666
  <br><br>
667
+
632
668
  ### Serve Demo Locally
633
669
 
634
670
  ```shell
@@ -638,11 +674,13 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
638
674
 
639
675
 
640
676
  <br><br>
677
+
641
678
  # Package Listing
642
679
  ![screenshot_package_listing.svg](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/screenshot_package_listing.svg)
643
680
 
644
681
 
645
682
  <br><br>
683
+
646
684
  # Changelog
647
685
  - [Full CHANGELOG.md](CHANGELOG.md)
648
686
 
@@ -650,6 +688,7 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
650
688
 
651
689
 
652
690
  <br><br>
691
+
653
692
  # License
654
693
  - [sqlite](https://github.com/sqlite/sqlite) is under [public domain](https://www.sqlite.org/copyright.html).
655
694
  - [jslint](https://github.com/jslint-org/jslint) is under [Unlicense License](https://github.com/jslint-org/jslint/blob/master/LICENSE).
@@ -660,23 +699,26 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
660
699
 
661
700
 
662
701
  <br><br>
702
+
663
703
  # Devops Instruction
664
704
 
665
705
 
666
706
  <br><br>
707
+
667
708
  ### python pypi publish
668
709
  ```shell
669
710
  python -m build
670
711
  #
671
- twine upload --repository testpypi dist/sqlmath-2026.8.31*
672
- py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2026.8.31
712
+ twine upload --repository testpypi dist/sqlmath-2026.10.30*
713
+ py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2026.10.30
673
714
  #
674
- twine upload dist/sqlmath-2026.8.31*
675
- pip install sqlmath==2026.8.31
715
+ twine upload dist/sqlmath-2026.10.30*
716
+ pip install sqlmath==2026.10.30
676
717
  ```
677
718
 
678
719
 
679
720
  <br><br>
721
+
680
722
  ### sqlite upgrade
681
723
  - goto https://www.sqlite.org/changes.html
682
724
  ```shell