sqlmath 0.0.1 → 2021.11.20

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 (96) hide show
  1. package/.npmignore +10 -0
  2. package/CHANGELOG.md +53 -2
  3. package/LICENSE +16 -22
  4. package/README.md +18 -219
  5. package/_binary_sqlmath_napi8_darwin_x64.node +0 -0
  6. package/_binary_sqlmath_napi8_linux_x64.node +0 -0
  7. package/_binary_sqlmath_napi8_win32_x64.node +0 -0
  8. package/jslint.mjs +10998 -0
  9. package/package.json +23 -8
  10. package/sqlmath.mjs +1713 -0
  11. package/.gitconfig +0 -25
  12. package/.github/workflows/ci.yml +0 -61
  13. package/.gitignore +0 -24
  14. package/extension-functions.c +0 -2047
  15. package/jslint_ci.sh +0 -1968
  16. package/node_sqlite3.cc +0 -11877
  17. package/sqlite-autoconf-3360000/INSTALL +0 -370
  18. package/sqlite-autoconf-3360000/Makefile.am +0 -20
  19. package/sqlite-autoconf-3360000/Makefile.fallback +0 -19
  20. package/sqlite-autoconf-3360000/Makefile.in +0 -1028
  21. package/sqlite-autoconf-3360000/Makefile.msc +0 -1037
  22. package/sqlite-autoconf-3360000/README.txt +0 -113
  23. package/sqlite-autoconf-3360000/Replace.cs +0 -223
  24. package/sqlite-autoconf-3360000/aclocal.m4 +0 -10199
  25. package/sqlite-autoconf-3360000/compile +0 -347
  26. package/sqlite-autoconf-3360000/config.guess +0 -1480
  27. package/sqlite-autoconf-3360000/config.sub +0 -1801
  28. package/sqlite-autoconf-3360000/configure +0 -16135
  29. package/sqlite-autoconf-3360000/configure.ac +0 -285
  30. package/sqlite-autoconf-3360000/depcomp +0 -791
  31. package/sqlite-autoconf-3360000/install-sh +0 -508
  32. package/sqlite-autoconf-3360000/ltmain.sh +0 -11156
  33. package/sqlite-autoconf-3360000/missing +0 -215
  34. package/sqlite-autoconf-3360000/shell.c +0 -22381
  35. package/sqlite-autoconf-3360000/sqlite3.1 +0 -286
  36. package/sqlite-autoconf-3360000/sqlite3.c +0 -235517
  37. package/sqlite-autoconf-3360000/sqlite3.h +0 -12353
  38. package/sqlite-autoconf-3360000/sqlite3.pc.in +0 -13
  39. package/sqlite-autoconf-3360000/sqlite3.rc +0 -83
  40. package/sqlite-autoconf-3360000/sqlite3ext.h +0 -663
  41. package/sqlite-autoconf-3360000/sqlite3rc.h +0 -3
  42. package/sqlite-autoconf-3360000/tea/Makefile.in +0 -440
  43. package/sqlite-autoconf-3360000/tea/README +0 -36
  44. package/sqlite-autoconf-3360000/tea/aclocal.m4 +0 -9
  45. package/sqlite-autoconf-3360000/tea/configure +0 -9989
  46. package/sqlite-autoconf-3360000/tea/configure.ac +0 -201
  47. package/sqlite-autoconf-3360000/tea/doc/sqlite3.n +0 -15
  48. package/sqlite-autoconf-3360000/tea/generic/tclsqlite3.c +0 -4016
  49. package/sqlite-autoconf-3360000/tea/license.terms +0 -6
  50. package/sqlite-autoconf-3360000/tea/pkgIndex.tcl.in +0 -7
  51. package/sqlite-autoconf-3360000/tea/tclconfig/install-sh +0 -528
  52. package/sqlite-autoconf-3360000/tea/tclconfig/tcl.m4 +0 -4168
  53. package/sqlite-autoconf-3360000/tea/win/makefile.vc +0 -419
  54. package/sqlite-autoconf-3360000/tea/win/nmakehlp.c +0 -815
  55. package/sqlite-autoconf-3360000/tea/win/rules.vc +0 -711
  56. package/sqlmath.js +0 -238
  57. package/test/backup.test.js +0 -279
  58. package/test/blob.test.js +0 -54
  59. package/test/cache.test.js +0 -42
  60. package/test/constants.test.js +0 -44
  61. package/test/database_fail.test.js +0 -153
  62. package/test/each.test.js +0 -39
  63. package/test/exec.test.js +0 -39
  64. package/test/extension.test.js +0 -26
  65. package/test/extension_functions.test.js +0 -29
  66. package/test/fts-content.test.js +0 -13
  67. package/test/interrupt.test.js +0 -80
  68. package/test/issue-108.test.js +0 -28
  69. package/test/json.test.js +0 -22
  70. package/test/map.test.js +0 -63
  71. package/test/named_columns.test.js +0 -38
  72. package/test/named_params.test.js +0 -69
  73. package/test/null_error.test.js +0 -41
  74. package/test/nw/.gitignore +0 -3
  75. package/test/nw/Makefile +0 -39
  76. package/test/nw/index.html +0 -14
  77. package/test/nw/package.json +0 -9
  78. package/test/open_close.test.js +0 -187
  79. package/test/other_objects.test.js +0 -98
  80. package/test/parallel_insert.test.js +0 -44
  81. package/test/prepare.test.js +0 -427
  82. package/test/profile.test.js +0 -57
  83. package/test/rerun.test.js +0 -50
  84. package/test/scheduling.test.js +0 -44
  85. package/test/serialization.test.js +0 -104
  86. package/test/support/createdb-electron.js +0 -10
  87. package/test/support/createdb.js +0 -47
  88. package/test/support/elmo.png +0 -0
  89. package/test/support/helper.js +0 -37
  90. package/test/support/script.sql +0 -70
  91. package/test/trace.test.js +0 -67
  92. package/test/unicode.test.js +0 -114
  93. package/test/upsert.test.js +0 -27
  94. package/test/verbose.test.js +0 -60
  95. package/test.js +0 -141
  96. package/test.slr.mjs +0 -212
@@ -1,113 +0,0 @@
1
- This package contains:
2
-
3
- * the SQLite library amalgamation source code file: sqlite3.c
4
- * the sqlite3.h and sqlite3ext.h header files that define the C-language
5
- interface to the sqlite3.c library file
6
- * the shell.c file used to build the sqlite3 command-line shell program
7
- * autoconf/automake installation infrastucture for building on POSIX
8
- compliant systems
9
- * a Makefile.msc, sqlite3.rc, and Replace.cs for building with Microsoft
10
- Visual C++ on Windows
11
-
12
- SUMMARY OF HOW TO BUILD
13
- =======================
14
-
15
- Unix: ./configure; make
16
- Windows: nmake /f Makefile.msc
17
-
18
- BUILDING ON POSIX
19
- =================
20
-
21
- The generic installation instructions for autoconf/automake are found
22
- in the INSTALL file.
23
-
24
- The following SQLite specific boolean options are supported:
25
-
26
- --enable-readline use readline in shell tool [default=yes]
27
- --enable-threadsafe build a thread-safe library [default=yes]
28
- --enable-dynamic-extensions support loadable extensions [default=yes]
29
-
30
- The default value for the CFLAGS variable (options passed to the C
31
- compiler) includes debugging symbols in the build, resulting in larger
32
- binaries than are necessary. Override it on the configure command
33
- line like this:
34
-
35
- $ CFLAGS="-Os" ./configure
36
-
37
- to produce a smaller installation footprint.
38
-
39
- Other SQLite compilation parameters can also be set using CFLAGS. For
40
- example:
41
-
42
- $ CFLAGS="-Os -DSQLITE_THREADSAFE=0" ./configure
43
-
44
-
45
- BUILDING WITH MICROSOFT VISUAL C++
46
- ==================================
47
-
48
- To compile for Windows using Microsoft Visual C++:
49
-
50
- $ nmake /f Makefile.msc
51
-
52
- Using Microsoft Visual C++ 2005 (or later) is recommended. Several Windows
53
- platform variants may be built by adding additional macros to the NMAKE
54
- command line.
55
-
56
- Building for WinRT 8.0
57
- ----------------------
58
-
59
- FOR_WINRT=1
60
-
61
- Using Microsoft Visual C++ 2012 (or later) is required. When using the
62
- above, something like the following macro will need to be added to the
63
- NMAKE command line as well:
64
-
65
- "NSDKLIBPATH=%WindowsSdkDir%\..\8.0\lib\win8\um\x86"
66
-
67
- Building for WinRT 8.1
68
- ----------------------
69
-
70
- FOR_WINRT=1
71
-
72
- Using Microsoft Visual C++ 2013 (or later) is required. When using the
73
- above, something like the following macro will need to be added to the
74
- NMAKE command line as well:
75
-
76
- "NSDKLIBPATH=%WindowsSdkDir%\..\8.1\lib\winv6.3\um\x86"
77
-
78
- Building for UWP 10.0
79
- ---------------------
80
-
81
- FOR_WINRT=1 FOR_UWP=1
82
-
83
- Using Microsoft Visual C++ 2015 (or later) is required. When using the
84
- above, something like the following macros will need to be added to the
85
- NMAKE command line as well:
86
-
87
- "NSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
88
- "PSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
89
- "NUCRTLIBPATH=%UniversalCRTSdkDir%\..\10\lib\10.0.10586.0\ucrt\x86"
90
-
91
- Building for the Windows 10 SDK
92
- -------------------------------
93
-
94
- FOR_WIN10=1
95
-
96
- Using Microsoft Visual C++ 2015 (or later) is required. When using the
97
- above, no other macros should be needed on the NMAKE command line.
98
-
99
- Other preprocessor defines
100
- --------------------------
101
-
102
- Additionally, preprocessor defines may be specified by using the OPTS macro
103
- on the NMAKE command line. However, not all possible preprocessor defines
104
- may be specified in this manner as some require the amalgamation to be built
105
- with them enabled (see http://www.sqlite.org/compile.html). For example, the
106
- following will work:
107
-
108
- "OPTS=-DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_JSON1=1"
109
-
110
- However, the following will not compile unless the amalgamation was built
111
- with it enabled:
112
-
113
- "OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1"
@@ -1,223 +0,0 @@
1
- /*
2
- ** 2016 February 26
3
- **
4
- ** The author disclaims copyright to this source code. In place of
5
- ** a legal notice, here is a blessing:
6
- **
7
- ** May you do good and not evil.
8
- ** May you find forgiveness for yourself and forgive others.
9
- ** May you share freely, never taking more than you give.
10
- **
11
- *************************************************************************
12
- ** This file contains C# code to perform regular expression replacements
13
- ** using the standard input and output channels.
14
- */
15
-
16
- using System;
17
- using System.Diagnostics;
18
- using System.IO;
19
- using System.Reflection;
20
- using System.Runtime.InteropServices;
21
- using System.Text.RegularExpressions;
22
-
23
- ///////////////////////////////////////////////////////////////////////////////
24
-
25
- #region Assembly Metadata
26
- [assembly: AssemblyTitle("Replace Tool")]
27
- [assembly: AssemblyDescription("Replace text using standard input/output.")]
28
- [assembly: AssemblyCompany("SQLite Development Team")]
29
- [assembly: AssemblyProduct("SQLite")]
30
- [assembly: AssemblyCopyright("Public Domain")]
31
- [assembly: ComVisible(false)]
32
- [assembly: Guid("95a0513f-8863-48cd-a76f-cb80868cb578")]
33
- [assembly: AssemblyVersion("1.0.*")]
34
-
35
- #if DEBUG
36
- [assembly: AssemblyConfiguration("Debug")]
37
- #else
38
- [assembly: AssemblyConfiguration("Release")]
39
- #endif
40
- #endregion
41
-
42
- ///////////////////////////////////////////////////////////////////////////////
43
-
44
- namespace Replace
45
- {
46
- /// <summary>
47
- /// This enumeration is used to represent all the possible exit codes from
48
- /// this tool.
49
- /// </summary>
50
- internal enum ExitCode
51
- {
52
- /// <summary>
53
- /// The file download was a success.
54
- /// </summary>
55
- Success = 0,
56
-
57
- /// <summary>
58
- /// The command line arguments are missing (i.e. null). Generally,
59
- /// this should not happen.
60
- /// </summary>
61
- MissingArgs = 1,
62
-
63
- /// <summary>
64
- /// The wrong number of command line arguments was supplied.
65
- /// </summary>
66
- WrongNumArgs = 2,
67
-
68
- /// <summary>
69
- /// The "matchingOnly" flag could not be converted to a value of the
70
- /// <see cref="Boolean"/> type.
71
- /// </summary>
72
- BadMatchingOnlyFlag = 3,
73
-
74
- /// <summary>
75
- /// An exception was caught in <see cref="Main" />. Generally, this
76
- /// should not happen.
77
- /// </summary>
78
- Exception = 4
79
- }
80
-
81
- ///////////////////////////////////////////////////////////////////////////
82
-
83
- internal static class Replace
84
- {
85
- #region Private Support Methods
86
- /// <summary>
87
- /// This method displays an error message to the console and/or
88
- /// displays the command line usage information for this tool.
89
- /// </summary>
90
- /// <param name="message">
91
- /// The error message to display, if any.
92
- /// </param>
93
- /// <param name="usage">
94
- /// Non-zero to display the command line usage information.
95
- /// </param>
96
- private static void Error(
97
- string message,
98
- bool usage
99
- )
100
- {
101
- if (message != null)
102
- Console.WriteLine(message);
103
-
104
- string fileName = Path.GetFileName(
105
- Process.GetCurrentProcess().MainModule.FileName);
106
-
107
- Console.WriteLine(String.Format(
108
- "usage: {0} <regExPattern> <regExSubSpec> <matchingOnly>",
109
- fileName));
110
- }
111
- #endregion
112
-
113
- ///////////////////////////////////////////////////////////////////////
114
-
115
- #region Program Entry Point
116
- /// <summary>
117
- /// This is the entry-point for this tool. It handles processing the
118
- /// command line arguments, reading from the standard input channel,
119
- /// replacing any matching lines of text, and writing to the standard
120
- /// output channel.
121
- /// </summary>
122
- /// <param name="args">
123
- /// The command line arguments.
124
- /// </param>
125
- /// <returns>
126
- /// Zero upon success; non-zero on failure. This will be one of the
127
- /// values from the <see cref="ExitCode" /> enumeration.
128
- /// </returns>
129
- private static int Main(
130
- string[] args
131
- )
132
- {
133
- //
134
- // NOTE: Sanity check the command line arguments.
135
- //
136
- if (args == null)
137
- {
138
- Error(null, true);
139
- return (int)ExitCode.MissingArgs;
140
- }
141
-
142
- if (args.Length != 3)
143
- {
144
- Error(null, true);
145
- return (int)ExitCode.WrongNumArgs;
146
- }
147
-
148
- try
149
- {
150
- //
151
- // NOTE: Create a regular expression from the first command
152
- // line argument. Then, grab the replacement string,
153
- // which is the second argument.
154
- //
155
- Regex regEx = new Regex(args[0]);
156
- string replacement = args[1];
157
-
158
- //
159
- // NOTE: Attempt to convert the third argument to a boolean.
160
- //
161
- bool matchingOnly;
162
-
163
- if (!bool.TryParse(args[2], out matchingOnly))
164
- {
165
- Error(null, true);
166
- return (int)ExitCode.BadMatchingOnlyFlag;
167
- }
168
-
169
- //
170
- // NOTE: Grab the standard input and output channels from the
171
- // console.
172
- //
173
- TextReader inputTextReader = Console.In;
174
- TextWriter outputTextWriter = Console.Out;
175
-
176
- //
177
- // NOTE: Loop until end-of-file is hit on the standard input
178
- // stream.
179
- //
180
- while (true)
181
- {
182
- //
183
- // NOTE: Read a line from the standard input channel. If
184
- // null is returned here, there is no more input and
185
- // we are done.
186
- //
187
- string inputLine = inputTextReader.ReadLine();
188
-
189
- if (inputLine == null)
190
- break;
191
-
192
- //
193
- // NOTE: Perform regular expression replacements on this
194
- // line, if any. Then, write the modified line to
195
- // the standard output channel.
196
- //
197
- string outputLine = regEx.Replace(inputLine, replacement);
198
-
199
- if (!matchingOnly || !String.Equals(
200
- inputLine, outputLine, StringComparison.Ordinal))
201
- {
202
- outputTextWriter.WriteLine(outputLine);
203
- }
204
- }
205
-
206
- //
207
- // NOTE: At this point, everything has succeeded.
208
- //
209
- return (int)ExitCode.Success;
210
- }
211
- catch (Exception e)
212
- {
213
- //
214
- // NOTE: An exception was caught. Report it via the console
215
- // and return failure.
216
- //
217
- Error(e.ToString(), false);
218
- return (int)ExitCode.Exception;
219
- }
220
- }
221
- #endregion
222
- }
223
- }