sqlmath 2024.9.30 → 2024.11.24

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  # Todo
4
4
  - none
5
5
 
6
+ # v2024.11.24
7
+ - sqlmath - Streamline idate-sql-functions to just:
8
+ IDATEADD()
9
+ IDATEFROM()
10
+ IDATEFROMEPOCH()
11
+ IDATETO()
12
+ IDATETOEPOCH()
13
+ IDATEYMDFROM()
14
+ IDATEYMDFROMEPOCH()
15
+ - jslint - Upgrade to jslint-v2024.11.24.
16
+ - webdemo - bugfix - Fix scaling-bug for technical-prm tradebot_technical.all.1e_stk_pnl.
17
+
18
+ # v2024.10.23
19
+ - sqlite - Upgrade to sqlite-v3.46.1.
20
+ - ci - Update shell-function shHttpFileServer() to auto-serve /index.html, when url-path is root /.
21
+ - sqlmath - Expand sql-function IDATEFROMTEXT() to allow shorthand IDATEFROMTEXT(...) for IDATEFROMTEXT(DATE(...)).
22
+
6
23
  # v2024.9.30
7
24
  - lgbm - Replace Microsoft-release-version with PyPi-version of lgbm-binary, because it includes gpu-extension.
8
25
  - sqlmath - Add sql-function WIN_AVG1(), WIN_AVG2().
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2024.9.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) |
5
+ | Branch | [master<br>(v2024.11.24)](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) |
6
6
  |--:|:--:|:--:|:--:|
7
7
  | 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) |
8
8
  | 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) |
@@ -121,11 +121,11 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
121
121
  ```shell
122
122
  python -m build
123
123
  #
124
- twine upload --repository testpypi dist/sqlmath-2024.9.30*
125
- py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2024.9.30
124
+ twine upload --repository testpypi dist/sqlmath-2024.11.24*
125
+ py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2024.11.24
126
126
  #
127
- twine upload dist/sqlmath-2024.9.30*
128
- pip install sqlmath==2024.9.30
127
+ twine upload dist/sqlmath-2024.11.24*
128
+ pip install sqlmath==2024.11.24
129
129
  ```
130
130
 
131
131
 
@@ -139,11 +139,11 @@ pip install sqlmath==2024.9.30
139
139
  sh jslint_ci.sh shRollupUpgrade "v4.4.0" "v4.5.0" ".ci.sh sqlmath_base.h"
140
140
  #
141
141
  # sqlite
142
- sh jslint_ci.sh shRollupUpgrade "3.44.2" "3.46.0" ".ci.sh sqlmath_external_sqlite.c"
143
- sh jslint_ci.sh shRollupUpgrade "3440200" "3460000" ".ci.sh sqlmath_external_sqlite.c"
142
+ sh jslint_ci.sh shRollupUpgrade "3.46.0" "3.46.1" ".ci.sh sqlmath_external_sqlite.c"
143
+ sh jslint_ci.sh shRollupUpgrade "3460000" "3460100" ".ci.sh sqlmath_external_sqlite.c"
144
144
  #
145
145
  # zlib
146
- sh jslint_ci.sh shRollupUpgrade "1.3" "1.3.1" ".ci.sh sqlmath_external_zlib.c"
146
+ # sh jslint_ci.sh shRollupUpgrade "1.3" "1.3.1" ".ci.sh sqlmath_external_zlib.c"
147
147
  #
148
148
  # shSqlmathUpdate
149
149
  read -p "Press Enter to shSqlmathUpdate:"
package/jslint.mjs CHANGED
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
163
163
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
164
164
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
165
165
  );
166
- let jslint_edition = "v2024.6.28";
166
+ let jslint_edition = "v2024.11.24";
167
167
  let jslint_export; // The jslint object to be exported.
168
168
  let jslint_fudge = 1; // Fudge starting line and starting
169
169
  // ... column to 1.
@@ -4698,8 +4698,7 @@ function jslint_phase3_parse(state) {
4698
4698
 
4699
4699
  function infix_option_chain(left) {
4700
4700
  const the_token = token_now;
4701
- let name;
4702
- name = token_nxt;
4701
+ let name = token_nxt;
4703
4702
  if (
4704
4703
  (
4705
4704
  left.id !== "(string)"
@@ -4733,6 +4732,18 @@ function jslint_phase3_parse(state) {
4733
4732
 
4734
4733
  check_left(left, the_token);
4735
4734
  }
4735
+
4736
+ // Issue #468 - Fix optional dynamic-property/function-call not recognized.
4737
+
4738
+ if (name.id === "[" || name.id === "(") {
4739
+ test_cause("dyn_prop_or_call");
4740
+
4741
+ // test_cause:
4742
+ // ["aa?.(bb)", "infix_option_chain", "dyn_prop_or_call", "", 0]
4743
+ // ["aa?.[bb]", "infix_option_chain", "dyn_prop_or_call", "", 0]
4744
+
4745
+ return left;
4746
+ }
4736
4747
  if (!name.identifier) {
4737
4748
 
4738
4749
  // test_cause:
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  },
39
39
  "shCiArtifactUpload": 1,
40
40
  "shCiPublishNpm": 1,
41
- "version": "2024.9.30"
41
+ "version": "2024.11.24"
42
42
  }
package/sqlmath.mjs CHANGED
@@ -122,7 +122,7 @@ let {
122
122
  let sqlMessageDict = {}; // dict of web-worker-callbacks
123
123
  let sqlMessageId = 0;
124
124
  let sqlWorker;
125
- let version = "v2024.9.30";
125
+ let version = "v2024.11.24";
126
126
 
127
127
  async function assertErrorThrownAsync(asyncFunc, regexp) {
128
128
 
@@ -1027,9 +1027,9 @@ async function dbTableImportAsync({
1027
1027
  colList = colList.map(function (colName) {
1028
1028
  let colName2;
1029
1029
  let duplicate = 0;
1030
- colName = "c_" + colName.toLowerCase().replace((
1031
- /\W/g
1032
- ), "_");
1030
+ colName = colName.trim();
1031
+ colName = colName.replace((/\W/g), "_");
1032
+ colName = colName.replace((/^[^A-Z_a-z]|^$/gm), "_$&");
1033
1033
  while (true) {
1034
1034
  duplicate += 1;
1035
1035
  colName2 = (