sqlmath 0.0.1 → 0.0.2

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 (100) hide show
  1. package/.gitconfig +2 -2
  2. package/.github/workflows/ci.yml +73 -15
  3. package/.github/workflows/publish.yml +66 -0
  4. package/.gitignore +1 -5
  5. package/CHANGELOG.md +53 -2
  6. package/LICENSE +16 -22
  7. package/README.md +18 -219
  8. package/asset_image_folder_open_solid.svg +1 -0
  9. package/jslint.mjs +10998 -0
  10. package/jslint_ci.sh +1542 -728
  11. package/package.json +23 -8
  12. package/{sqlite-autoconf-3360000/sqlite3.c → sqlite3.c} +13116 -85
  13. package/sqlite3_ext.c +8372 -0
  14. package/{sqlite-autoconf-3360000/shell.c → sqlite3_shell.c} +330 -275
  15. package/sqlmath.mjs +1713 -0
  16. package/sqlmath_base.c +1832 -0
  17. package/sqlmath_custom.c +78 -0
  18. package/sqlmath_custom.cpp +0 -0
  19. package/sqlmath_custom.mjs +4 -0
  20. package/sqlmath_old.js +31038 -0
  21. package/extension-functions.c +0 -2047
  22. package/node_sqlite3.cc +0 -11877
  23. package/sqlite-autoconf-3360000/INSTALL +0 -370
  24. package/sqlite-autoconf-3360000/Makefile.am +0 -20
  25. package/sqlite-autoconf-3360000/Makefile.fallback +0 -19
  26. package/sqlite-autoconf-3360000/Makefile.in +0 -1028
  27. package/sqlite-autoconf-3360000/Makefile.msc +0 -1037
  28. package/sqlite-autoconf-3360000/README.txt +0 -113
  29. package/sqlite-autoconf-3360000/Replace.cs +0 -223
  30. package/sqlite-autoconf-3360000/aclocal.m4 +0 -10199
  31. package/sqlite-autoconf-3360000/compile +0 -347
  32. package/sqlite-autoconf-3360000/config.guess +0 -1480
  33. package/sqlite-autoconf-3360000/config.sub +0 -1801
  34. package/sqlite-autoconf-3360000/configure +0 -16135
  35. package/sqlite-autoconf-3360000/configure.ac +0 -285
  36. package/sqlite-autoconf-3360000/depcomp +0 -791
  37. package/sqlite-autoconf-3360000/install-sh +0 -508
  38. package/sqlite-autoconf-3360000/ltmain.sh +0 -11156
  39. package/sqlite-autoconf-3360000/missing +0 -215
  40. package/sqlite-autoconf-3360000/sqlite3.1 +0 -286
  41. package/sqlite-autoconf-3360000/sqlite3.h +0 -12353
  42. package/sqlite-autoconf-3360000/sqlite3.pc.in +0 -13
  43. package/sqlite-autoconf-3360000/sqlite3.rc +0 -83
  44. package/sqlite-autoconf-3360000/sqlite3ext.h +0 -663
  45. package/sqlite-autoconf-3360000/sqlite3rc.h +0 -3
  46. package/sqlite-autoconf-3360000/tea/Makefile.in +0 -440
  47. package/sqlite-autoconf-3360000/tea/README +0 -36
  48. package/sqlite-autoconf-3360000/tea/aclocal.m4 +0 -9
  49. package/sqlite-autoconf-3360000/tea/configure +0 -9989
  50. package/sqlite-autoconf-3360000/tea/configure.ac +0 -201
  51. package/sqlite-autoconf-3360000/tea/doc/sqlite3.n +0 -15
  52. package/sqlite-autoconf-3360000/tea/generic/tclsqlite3.c +0 -4016
  53. package/sqlite-autoconf-3360000/tea/license.terms +0 -6
  54. package/sqlite-autoconf-3360000/tea/pkgIndex.tcl.in +0 -7
  55. package/sqlite-autoconf-3360000/tea/tclconfig/install-sh +0 -528
  56. package/sqlite-autoconf-3360000/tea/tclconfig/tcl.m4 +0 -4168
  57. package/sqlite-autoconf-3360000/tea/win/makefile.vc +0 -419
  58. package/sqlite-autoconf-3360000/tea/win/nmakehlp.c +0 -815
  59. package/sqlite-autoconf-3360000/tea/win/rules.vc +0 -711
  60. package/sqlmath.js +0 -238
  61. package/test/backup.test.js +0 -279
  62. package/test/blob.test.js +0 -54
  63. package/test/cache.test.js +0 -42
  64. package/test/constants.test.js +0 -44
  65. package/test/database_fail.test.js +0 -153
  66. package/test/each.test.js +0 -39
  67. package/test/exec.test.js +0 -39
  68. package/test/extension.test.js +0 -26
  69. package/test/extension_functions.test.js +0 -29
  70. package/test/fts-content.test.js +0 -13
  71. package/test/interrupt.test.js +0 -80
  72. package/test/issue-108.test.js +0 -28
  73. package/test/json.test.js +0 -22
  74. package/test/map.test.js +0 -63
  75. package/test/named_columns.test.js +0 -38
  76. package/test/named_params.test.js +0 -69
  77. package/test/null_error.test.js +0 -41
  78. package/test/nw/.gitignore +0 -3
  79. package/test/nw/Makefile +0 -39
  80. package/test/nw/index.html +0 -14
  81. package/test/nw/package.json +0 -9
  82. package/test/open_close.test.js +0 -187
  83. package/test/other_objects.test.js +0 -98
  84. package/test/parallel_insert.test.js +0 -44
  85. package/test/prepare.test.js +0 -427
  86. package/test/profile.test.js +0 -57
  87. package/test/rerun.test.js +0 -50
  88. package/test/scheduling.test.js +0 -44
  89. package/test/serialization.test.js +0 -104
  90. package/test/support/createdb-electron.js +0 -10
  91. package/test/support/createdb.js +0 -47
  92. package/test/support/elmo.png +0 -0
  93. package/test/support/helper.js +0 -37
  94. package/test/support/script.sql +0 -70
  95. package/test/trace.test.js +0 -67
  96. package/test/unicode.test.js +0 -114
  97. package/test/upsert.test.js +0 -27
  98. package/test/verbose.test.js +0 -60
  99. package/test.js +0 -141
  100. package/test.slr.mjs +0 -212
@@ -1,215 +0,0 @@
1
- #! /bin/sh
2
- # Common wrapper for a few potentially missing GNU programs.
3
-
4
- scriptversion=2013-10-28.13; # UTC
5
-
6
- # Copyright (C) 1996-2014 Free Software Foundation, Inc.
7
- # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
-
9
- # This program is free software; you can redistribute it and/or modify
10
- # it under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 2, or (at your option)
12
- # any later version.
13
-
14
- # This program is distributed in the hope that it will be useful,
15
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- # GNU General Public License for more details.
18
-
19
- # You should have received a copy of the GNU General Public License
20
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
-
22
- # As a special exception to the GNU General Public License, if you
23
- # distribute this file as part of a program that contains a
24
- # configuration script generated by Autoconf, you may include it under
25
- # the same distribution terms that you use for the rest of that program.
26
-
27
- if test $# -eq 0; then
28
- echo 1>&2 "Try '$0 --help' for more information"
29
- exit 1
30
- fi
31
-
32
- case $1 in
33
-
34
- --is-lightweight)
35
- # Used by our autoconf macros to check whether the available missing
36
- # script is modern enough.
37
- exit 0
38
- ;;
39
-
40
- --run)
41
- # Back-compat with the calling convention used by older automake.
42
- shift
43
- ;;
44
-
45
- -h|--h|--he|--hel|--help)
46
- echo "\
47
- $0 [OPTION]... PROGRAM [ARGUMENT]...
48
-
49
- Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
50
- to PROGRAM being missing or too old.
51
-
52
- Options:
53
- -h, --help display this help and exit
54
- -v, --version output version information and exit
55
-
56
- Supported PROGRAM values:
57
- aclocal autoconf autoheader autom4te automake makeinfo
58
- bison yacc flex lex help2man
59
-
60
- Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
61
- 'g' are ignored when checking the name.
62
-
63
- Send bug reports to <bug-automake@gnu.org>."
64
- exit $?
65
- ;;
66
-
67
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
68
- echo "missing $scriptversion (GNU Automake)"
69
- exit $?
70
- ;;
71
-
72
- -*)
73
- echo 1>&2 "$0: unknown '$1' option"
74
- echo 1>&2 "Try '$0 --help' for more information"
75
- exit 1
76
- ;;
77
-
78
- esac
79
-
80
- # Run the given program, remember its exit status.
81
- "$@"; st=$?
82
-
83
- # If it succeeded, we are done.
84
- test $st -eq 0 && exit 0
85
-
86
- # Also exit now if we it failed (or wasn't found), and '--version' was
87
- # passed; such an option is passed most likely to detect whether the
88
- # program is present and works.
89
- case $2 in --version|--help) exit $st;; esac
90
-
91
- # Exit code 63 means version mismatch. This often happens when the user
92
- # tries to use an ancient version of a tool on a file that requires a
93
- # minimum version.
94
- if test $st -eq 63; then
95
- msg="probably too old"
96
- elif test $st -eq 127; then
97
- # Program was missing.
98
- msg="missing on your system"
99
- else
100
- # Program was found and executed, but failed. Give up.
101
- exit $st
102
- fi
103
-
104
- perl_URL=http://www.perl.org/
105
- flex_URL=http://flex.sourceforge.net/
106
- gnu_software_URL=http://www.gnu.org/software
107
-
108
- program_details ()
109
- {
110
- case $1 in
111
- aclocal|automake)
112
- echo "The '$1' program is part of the GNU Automake package:"
113
- echo "<$gnu_software_URL/automake>"
114
- echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
115
- echo "<$gnu_software_URL/autoconf>"
116
- echo "<$gnu_software_URL/m4/>"
117
- echo "<$perl_URL>"
118
- ;;
119
- autoconf|autom4te|autoheader)
120
- echo "The '$1' program is part of the GNU Autoconf package:"
121
- echo "<$gnu_software_URL/autoconf/>"
122
- echo "It also requires GNU m4 and Perl in order to run:"
123
- echo "<$gnu_software_URL/m4/>"
124
- echo "<$perl_URL>"
125
- ;;
126
- esac
127
- }
128
-
129
- give_advice ()
130
- {
131
- # Normalize program name to check for.
132
- normalized_program=`echo "$1" | sed '
133
- s/^gnu-//; t
134
- s/^gnu//; t
135
- s/^g//; t'`
136
-
137
- printf '%s\n' "'$1' is $msg."
138
-
139
- configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
140
- case $normalized_program in
141
- autoconf*)
142
- echo "You should only need it if you modified 'configure.ac',"
143
- echo "or m4 files included by it."
144
- program_details 'autoconf'
145
- ;;
146
- autoheader*)
147
- echo "You should only need it if you modified 'acconfig.h' or"
148
- echo "$configure_deps."
149
- program_details 'autoheader'
150
- ;;
151
- automake*)
152
- echo "You should only need it if you modified 'Makefile.am' or"
153
- echo "$configure_deps."
154
- program_details 'automake'
155
- ;;
156
- aclocal*)
157
- echo "You should only need it if you modified 'acinclude.m4' or"
158
- echo "$configure_deps."
159
- program_details 'aclocal'
160
- ;;
161
- autom4te*)
162
- echo "You might have modified some maintainer files that require"
163
- echo "the 'autom4te' program to be rebuilt."
164
- program_details 'autom4te'
165
- ;;
166
- bison*|yacc*)
167
- echo "You should only need it if you modified a '.y' file."
168
- echo "You may want to install the GNU Bison package:"
169
- echo "<$gnu_software_URL/bison/>"
170
- ;;
171
- lex*|flex*)
172
- echo "You should only need it if you modified a '.l' file."
173
- echo "You may want to install the Fast Lexical Analyzer package:"
174
- echo "<$flex_URL>"
175
- ;;
176
- help2man*)
177
- echo "You should only need it if you modified a dependency" \
178
- "of a man page."
179
- echo "You may want to install the GNU Help2man package:"
180
- echo "<$gnu_software_URL/help2man/>"
181
- ;;
182
- makeinfo*)
183
- echo "You should only need it if you modified a '.texi' file, or"
184
- echo "any other file indirectly affecting the aspect of the manual."
185
- echo "You might want to install the Texinfo package:"
186
- echo "<$gnu_software_URL/texinfo/>"
187
- echo "The spurious makeinfo call might also be the consequence of"
188
- echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
189
- echo "want to install GNU make:"
190
- echo "<$gnu_software_URL/make/>"
191
- ;;
192
- *)
193
- echo "You might have modified some files without having the proper"
194
- echo "tools for further handling them. Check the 'README' file, it"
195
- echo "often tells you about the needed prerequisites for installing"
196
- echo "this package. You may also peek at any GNU archive site, in"
197
- echo "case some other package contains this missing '$1' program."
198
- ;;
199
- esac
200
- }
201
-
202
- give_advice "$1" | sed -e '1s/^/WARNING: /' \
203
- -e '2,$s/^/ /' >&2
204
-
205
- # Propagate the correct exit status (expected to be 127 for a program
206
- # not found, 63 for a program that failed due to version mismatch).
207
- exit $st
208
-
209
- # Local variables:
210
- # eval: (add-hook 'write-file-hooks 'time-stamp)
211
- # time-stamp-start: "scriptversion="
212
- # time-stamp-format: "%:y-%02m-%02d.%02H"
213
- # time-stamp-time-zone: "UTC"
214
- # time-stamp-end: "; # UTC"
215
- # End:
@@ -1,286 +0,0 @@
1
- .\" Hey, EMACS: -*- nroff -*-
2
- .\" First parameter, NAME, should be all caps
3
- .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4
- .\" other parameters are allowed: see man(7), man(1)
5
- .TH SQLITE3 1 "Fri Oct 31 10:41:31 EDT 2014"
6
- .\" Please adjust this date whenever revising the manpage.
7
- .\"
8
- .\" Some roff macros, for reference:
9
- .\" .nh disable hyphenation
10
- .\" .hy enable hyphenation
11
- .\" .ad l left justify
12
- .\" .ad b justify to both left and right margins
13
- .\" .nf disable filling
14
- .\" .fi enable filling
15
- .\" .br insert line break
16
- .\" .sp <n> insert n+1 empty lines
17
- .\" for manpage-specific macros, see man(7)
18
- .SH NAME
19
- .B sqlite3
20
- \- A command line interface for SQLite version 3
21
-
22
- .SH SYNOPSIS
23
- .B sqlite3
24
- .RI [ options ]
25
- .RI [ databasefile ]
26
- .RI [ SQL ]
27
-
28
- .SH SUMMARY
29
- .PP
30
- .B sqlite3
31
- is a terminal-based front-end to the SQLite library that can evaluate
32
- queries interactively and display the results in multiple formats.
33
- .B sqlite3
34
- can also be used within shell scripts and other applications to provide
35
- batch processing features.
36
-
37
- .SH DESCRIPTION
38
- To start a
39
- .B sqlite3
40
- interactive session, invoke the
41
- .B sqlite3
42
- command and optionally provide the name of a database file. If the
43
- database file does not exist, it will be created. If the database file
44
- does exist, it will be opened.
45
-
46
- For example, to create a new database file named "mydata.db", create
47
- a table named "memos" and insert a couple of records into that table:
48
- .sp
49
- $
50
- .B sqlite3 mydata.db
51
- .br
52
- SQLite version 3.8.8
53
- .br
54
- Enter ".help" for instructions
55
- .br
56
- sqlite>
57
- .B create table memos(text, priority INTEGER);
58
- .br
59
- sqlite>
60
- .B insert into memos values('deliver project description', 10);
61
- .br
62
- sqlite>
63
- .B insert into memos values('lunch with Christine', 100);
64
- .br
65
- sqlite>
66
- .B select * from memos;
67
- .br
68
- deliver project description|10
69
- .br
70
- lunch with Christine|100
71
- .br
72
- sqlite>
73
- .sp
74
-
75
- If no database name is supplied, the ATTACH sql command can be used
76
- to attach to existing or create new database files. ATTACH can also
77
- be used to attach to multiple databases within the same interactive
78
- session. This is useful for migrating data between databases,
79
- possibly changing the schema along the way.
80
-
81
- Optionally, a SQL statement or set of SQL statements can be supplied as
82
- a single argument. Multiple statements should be separated by
83
- semi-colons.
84
-
85
- For example:
86
- .sp
87
- $
88
- .B sqlite3 -line mydata.db 'select * from memos where priority > 20;'
89
- .br
90
- text = lunch with Christine
91
- .br
92
- priority = 100
93
- .br
94
- .sp
95
-
96
- .SS SQLITE META-COMMANDS
97
- .PP
98
- The interactive interpreter offers a set of meta-commands that can be
99
- used to control the output format, examine the currently attached
100
- database files, or perform administrative operations upon the
101
- attached databases (such as rebuilding indices). Meta-commands are
102
- always prefixed with a dot (.).
103
-
104
- A list of available meta-commands can be viewed at any time by issuing
105
- the '.help' command. For example:
106
- .sp
107
- sqlite>
108
- .B .help
109
- .nf
110
- .tr %.
111
- %backup ?DB? FILE Backup DB (default "main") to FILE
112
- %bail on|off Stop after hitting an error. Default OFF
113
- %clone NEWDB Clone data into NEWDB from the existing database
114
- %databases List names and files of attached databases
115
- %dump ?TABLE? ... Dump the database in an SQL text format
116
- If TABLE specified, only dump tables matching
117
- LIKE pattern TABLE.
118
- %echo on|off Turn command echo on or off
119
- %eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN
120
- %exit Exit this program
121
- %explain ?on|off? Turn output mode suitable for EXPLAIN on or off.
122
- With no args, it turns EXPLAIN on.
123
- %fullschema Show schema and the content of sqlite_stat tables
124
- %headers on|off Turn display of headers on or off
125
- %help Show this message
126
- %import FILE TABLE Import data from FILE into TABLE
127
- %indices ?TABLE? Show names of all indices
128
- If TABLE specified, only show indices for tables
129
- matching LIKE pattern TABLE.
130
- %load FILE ?ENTRY? Load an extension library
131
- %log FILE|off Turn logging on or off. FILE can be stderr/stdout
132
- %mode MODE ?TABLE? Set output mode where MODE is one of:
133
- csv Comma-separated values
134
- column Left-aligned columns. (See .width)
135
- html HTML <table> code
136
- insert SQL insert statements for TABLE
137
- line One value per line
138
- list Values delimited by .separator string
139
- tabs Tab-separated values
140
- tcl TCL list elements
141
- %nullvalue STRING Use STRING in place of NULL values
142
- %once FILENAME Output for the next SQL command only to FILENAME
143
- %open ?FILENAME? Close existing database and reopen FILENAME
144
- %output ?FILENAME? Send output to FILENAME or stdout
145
- %print STRING... Print literal STRING
146
- %prompt MAIN CONTINUE Replace the standard prompts
147
- %quit Exit this program
148
- %read FILENAME Execute SQL in FILENAME
149
- %restore ?DB? FILE Restore content of DB (default "main") from FILE
150
- %save FILE Write in-memory database into FILE
151
- %schema ?TABLE? Show the CREATE statements
152
- If TABLE specified, only show tables matching
153
- LIKE pattern TABLE.
154
- %separator STRING ?NL? Change separator used by output mode and .import
155
- NL is the end-of-line mark for CSV
156
- %shell CMD ARGS... Run CMD ARGS... in a system shell
157
- %show Show the current values for various settings
158
- %stats on|off Turn stats on or off
159
- %system CMD ARGS... Run CMD ARGS... in a system shell
160
- %tables ?TABLE? List names of tables
161
- If TABLE specified, only list tables matching
162
- LIKE pattern TABLE.
163
- %timeout MS Try opening locked tables for MS milliseconds
164
- %timer on|off Turn SQL timer on or off
165
- %trace FILE|off Output each SQL statement as it is run
166
- %vfsname ?AUX? Print the name of the VFS stack
167
- %width NUM1 NUM2 ... Set column widths for "column" mode
168
- Negative values right-justify
169
- sqlite>
170
- .sp
171
- .fi
172
- .SH OPTIONS
173
- .B sqlite3
174
- has the following options:
175
- .TP
176
- .B \-bail
177
- Stop after hitting an error.
178
- .TP
179
- .B \-batch
180
- Force batch I/O.
181
- .TP
182
- .B \-column
183
- Query results will be displayed in a table like form, using
184
- whitespace characters to separate the columns and align the
185
- output.
186
- .TP
187
- .BI \-cmd\ command
188
- run
189
- .I command
190
- before reading stdin
191
- .TP
192
- .B \-csv
193
- Set output mode to CSV (comma separated values).
194
- .TP
195
- .B \-echo
196
- Print commands before execution.
197
- .TP
198
- .BI \-init\ file
199
- Read and execute commands from
200
- .I file
201
- , which can contain a mix of SQL statements and meta-commands.
202
- .TP
203
- .B \-[no]header
204
- Turn headers on or off.
205
- .TP
206
- .B \-help
207
- Show help on options and exit.
208
- .TP
209
- .B \-html
210
- Query results will be output as simple HTML tables.
211
- .TP
212
- .B \-interactive
213
- Force interactive I/O.
214
- .TP
215
- .B \-line
216
- Query results will be displayed with one value per line, rows
217
- separated by a blank line. Designed to be easily parsed by
218
- scripts or other programs
219
- .TP
220
- .B \-list
221
- Query results will be displayed with the separator (|, by default)
222
- character between each field value. The default.
223
- .TP
224
- .BI \-mmap\ N
225
- Set default mmap size to
226
- .I N
227
- \.
228
- .TP
229
- .BI \-nullvalue\ string
230
- Set string used to represent NULL values. Default is ''
231
- (empty string).
232
- .TP
233
- .BI \-separator\ separator
234
- Set output field separator. Default is '|'.
235
- .TP
236
- .B \-stats
237
- Print memory stats before each finalize.
238
- .TP
239
- .B \-version
240
- Show SQLite version.
241
- .TP
242
- .BI \-vfs\ name
243
- Use
244
- .I name
245
- as the default VFS.
246
-
247
-
248
- .SH INIT FILE
249
- .B sqlite3
250
- reads an initialization file to set the configuration of the
251
- interactive environment. Throughout initialization, any previously
252
- specified setting can be overridden. The sequence of initialization is
253
- as follows:
254
-
255
- o The default configuration is established as follows:
256
-
257
- .sp
258
- .nf
259
- .cc |
260
- mode = LIST
261
- separator = "|"
262
- main prompt = "sqlite> "
263
- continue prompt = " ...> "
264
- |cc .
265
- .sp
266
- .fi
267
-
268
- o If the file
269
- .B ~/.sqliterc
270
- exists, it is processed first.
271
- can be found in the user's home directory, it is
272
- read and processed. It should generally only contain meta-commands.
273
-
274
- o If the -init option is present, the specified file is processed.
275
-
276
- o All other command line options are processed.
277
-
278
- .SH SEE ALSO
279
- http://www.sqlite.org/cli.html
280
- .br
281
- The sqlite3-doc package.
282
- .SH AUTHOR
283
- This manual page was originally written by Andreas Rottmann
284
- <rotty@debian.org>, for the Debian GNU/Linux system (but may be used
285
- by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and
286
- further updated by Laszlo Boszormenyi <gcs@debian.hu> .