cline 1.0.1 → 1.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.
- package/bin/cline +0 -0
- package/bin/cline-darwin-amd64 +0 -0
- package/bin/cline-darwin-arm64 +0 -0
- package/bin/cline-host +0 -0
- package/bin/cline-host-darwin-amd64 +0 -0
- package/bin/cline-host-darwin-arm64 +0 -0
- package/bin/cline-host-linux-amd64 +0 -0
- package/bin/cline-host-linux-arm64 +0 -0
- package/bin/cline-linux-amd64 +0 -0
- package/bin/cline-linux-arm64 +0 -0
- package/cline-core.js +24143 -16610
- package/extension/package.json +12 -4
- package/node_modules/b4a/LICENSE +201 -0
- package/node_modules/b4a/README.md +153 -0
- package/node_modules/b4a/browser.js +563 -0
- package/node_modules/b4a/index.js +188 -0
- package/node_modules/b4a/lib/ascii.js +31 -0
- package/node_modules/b4a/lib/base64.js +65 -0
- package/node_modules/b4a/lib/hex.js +51 -0
- package/node_modules/b4a/lib/utf16le.js +40 -0
- package/node_modules/b4a/lib/utf8.js +141 -0
- package/node_modules/b4a/package.json +49 -0
- package/node_modules/b4a/react-native.js +5 -0
- package/node_modules/bare-events/LICENSE +201 -0
- package/node_modules/bare-events/README.md +25 -0
- package/node_modules/bare-events/global.d.ts +15 -0
- package/node_modules/bare-events/global.js +5 -0
- package/node_modules/bare-events/index.d.ts +94 -0
- package/node_modules/bare-events/index.js +355 -0
- package/node_modules/bare-events/lib/errors.js +32 -0
- package/node_modules/bare-events/package.json +61 -0
- package/node_modules/bare-events/web.d.ts +79 -0
- package/node_modules/bare-events/web.js +347 -0
- package/node_modules/bare-fs/CMakeLists.txt +13 -0
- package/node_modules/bare-fs/LICENSE +201 -0
- package/node_modules/bare-fs/README.md +29 -0
- package/node_modules/bare-fs/binding.c +2238 -0
- package/node_modules/bare-fs/binding.js +1 -0
- package/node_modules/bare-fs/index.d.ts +1115 -0
- package/node_modules/bare-fs/index.js +2330 -0
- package/node_modules/bare-fs/lib/constants.d.ts +49 -0
- package/node_modules/bare-fs/lib/constants.js +49 -0
- package/node_modules/bare-fs/lib/errors.d.ts +11 -0
- package/node_modules/bare-fs/lib/errors.js +55 -0
- package/node_modules/bare-fs/package.json +71 -0
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/promises.d.ts +282 -0
- package/node_modules/bare-fs/promises.js +90 -0
- package/node_modules/bare-os/CMakeLists.txt +13 -0
- package/node_modules/bare-os/LICENSE +201 -0
- package/node_modules/bare-os/README.md +11 -0
- package/node_modules/bare-os/binding.c +1119 -0
- package/node_modules/bare-os/binding.js +1 -0
- package/node_modules/bare-os/index.d.ts +109 -0
- package/node_modules/bare-os/index.js +99 -0
- package/node_modules/bare-os/lib/constants.js +6 -0
- package/node_modules/bare-os/lib/errors.js +22 -0
- package/node_modules/bare-os/package.json +46 -0
- package/node_modules/bare-os/prebuilds/android-arm/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-ia32/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-x64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-x64/bare-os.bare +0 -0
- package/node_modules/bare-path/LICENSE +201 -0
- package/node_modules/bare-path/NOTICE +28 -0
- package/node_modules/bare-path/README.md +19 -0
- package/node_modules/bare-path/index.js +11 -0
- package/node_modules/bare-path/lib/constants.js +11 -0
- package/node_modules/bare-path/lib/posix.js +242 -0
- package/node_modules/bare-path/lib/shared.js +67 -0
- package/node_modules/bare-path/lib/win32.js +513 -0
- package/node_modules/bare-path/package.json +36 -0
- package/node_modules/bare-stream/LICENSE +201 -0
- package/node_modules/bare-stream/README.md +15 -0
- package/node_modules/bare-stream/global.js +8 -0
- package/node_modules/bare-stream/index.d.ts +237 -0
- package/node_modules/bare-stream/index.js +355 -0
- package/node_modules/bare-stream/package.json +61 -0
- package/node_modules/bare-stream/promises.js +3 -0
- package/node_modules/bare-stream/web.d.ts +73 -0
- package/node_modules/bare-stream/web.js +229 -0
- package/node_modules/bare-url/CMakeLists.txt +27 -0
- package/node_modules/bare-url/LICENSE +201 -0
- package/node_modules/bare-url/README.md +19 -0
- package/node_modules/bare-url/binding.c +188 -0
- package/node_modules/bare-url/binding.js +1 -0
- package/node_modules/bare-url/global.d.ts +12 -0
- package/node_modules/bare-url/global.js +2 -0
- package/node_modules/bare-url/index.d.ts +39 -0
- package/node_modules/bare-url/index.js +450 -0
- package/node_modules/bare-url/lib/errors.d.ts +8 -0
- package/node_modules/bare-url/lib/errors.js +38 -0
- package/node_modules/bare-url/lib/url-search-params.d.ts +21 -0
- package/node_modules/bare-url/lib/url-search-params.js +176 -0
- package/node_modules/bare-url/package.json +51 -0
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/better-sqlite3/deps/download.sh +1 -1
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +122 -81
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +45 -45
- package/node_modules/better-sqlite3/lib/database.js +1 -1
- package/node_modules/better-sqlite3/package.json +4 -7
- package/node_modules/better-sqlite3/src/addon.cpp +47 -0
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +44 -2164
- package/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
- package/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
- package/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
- package/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
- package/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
- package/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
- package/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
- package/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
- package/node_modules/better-sqlite3/src/util/data.cpp +194 -0
- package/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
- package/node_modules/better-sqlite3/src/util/macros.cpp +63 -0
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
- package/node_modules/events-universal/LICENSE +201 -0
- package/node_modules/events-universal/README.md +17 -0
- package/node_modules/events-universal/bare.js +1 -0
- package/node_modules/events-universal/default.js +1 -0
- package/node_modules/events-universal/index.js +1 -0
- package/node_modules/events-universal/package.json +39 -0
- package/node_modules/events-universal/react-native.js +1 -0
- package/node_modules/{fs-constants → fast-fifo}/LICENSE +1 -1
- package/node_modules/fast-fifo/README.md +78 -0
- package/node_modules/fast-fifo/fixed-size.js +39 -0
- package/node_modules/fast-fifo/index.js +48 -0
- package/node_modules/fast-fifo/package.json +28 -0
- package/node_modules/{base64-js → streamx}/LICENSE +1 -1
- package/node_modules/streamx/README.md +489 -0
- package/node_modules/streamx/index.js +1184 -0
- package/node_modules/streamx/package.json +34 -0
- package/node_modules/tar-fs/README.md +23 -34
- package/node_modules/tar-fs/index.js +211 -184
- package/node_modules/tar-fs/package.json +27 -7
- package/node_modules/tar-stream/README.md +34 -19
- package/node_modules/tar-stream/constants.js +14 -0
- package/node_modules/tar-stream/extract.js +341 -192
- package/node_modules/tar-stream/headers.js +201 -175
- package/node_modules/tar-stream/pack.js +226 -194
- package/node_modules/tar-stream/package.json +23 -46
- package/node_modules/text-decoder/LICENSE +201 -0
- package/node_modules/text-decoder/README.md +36 -0
- package/node_modules/text-decoder/index.js +64 -0
- package/node_modules/text-decoder/lib/browser-decoder.js +17 -0
- package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
- package/node_modules/text-decoder/lib/utf8-decoder.js +104 -0
- package/node_modules/text-decoder/package.json +38 -0
- package/package.json +1 -1
- package/proto/cline/account.proto +10 -8
- package/proto/cline/browser.proto +3 -1
- package/proto/cline/checkpoints.proto +5 -3
- package/proto/cline/commands.proto +4 -2
- package/proto/cline/common.proto +5 -7
- package/proto/cline/dictation.proto +3 -1
- package/proto/cline/file.proto +36 -34
- package/proto/cline/hooks.proto +3 -2
- package/proto/cline/mcp.proto +6 -4
- package/proto/cline/models.proto +189 -19
- package/proto/cline/oca_account.proto +6 -7
- package/proto/cline/slash.proto +3 -1
- package/proto/cline/state.proto +144 -292
- package/proto/cline/task.proto +4 -2
- package/proto/cline/ui.proto +25 -24
- package/proto/cline/web.proto +3 -1
- package/proto/descriptor_set.pb +0 -0
- package/proto/host/diff.proto +5 -4
- package/proto/host/env.proto +8 -7
- package/proto/host/testing.proto +3 -3
- package/proto/host/window.proto +2 -2
- package/proto/host/workspace.proto +13 -12
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer/AUTHORS.md +0 -70
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -186
- package/node_modules/buffer/index.js +0 -1817
- package/node_modules/buffer/package.json +0 -96
- package/node_modules/chownr/LICENSE +0 -15
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/chownr.js +0 -167
- package/node_modules/chownr/package.json +0 -29
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -106
- package/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -68
- package/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- package/node_modules/tar-fs/.travis.yml +0 -6
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +0 -346
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
- package/test-startup.sh +0 -14
|
@@ -146,9 +146,9 @@ extern "C" {
|
|
|
146
146
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
147
147
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
148
148
|
*/
|
|
149
|
-
#define SQLITE_VERSION "3.50.
|
|
150
|
-
#define SQLITE_VERSION_NUMBER
|
|
151
|
-
#define SQLITE_SOURCE_ID "2025-
|
|
149
|
+
#define SQLITE_VERSION "3.50.4"
|
|
150
|
+
#define SQLITE_VERSION_NUMBER 3050004
|
|
151
|
+
#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
|
|
152
152
|
|
|
153
153
|
/*
|
|
154
154
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -9058,13 +9058,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9058
9058
|
** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
|
|
9059
9059
|
** <dd>^This is the number of sort operations that have occurred.
|
|
9060
9060
|
** A non-zero value in this counter may indicate an opportunity to
|
|
9061
|
-
**
|
|
9061
|
+
** improve performance through careful use of indices.</dd>
|
|
9062
9062
|
**
|
|
9063
9063
|
** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
|
|
9064
9064
|
** <dd>^This is the number of rows inserted into transient indices that
|
|
9065
9065
|
** were created automatically in order to help joins run faster.
|
|
9066
9066
|
** A non-zero value in this counter may indicate an opportunity to
|
|
9067
|
-
**
|
|
9067
|
+
** improve performance by adding permanent indices that do not
|
|
9068
9068
|
** need to be reinitialized each time the statement is run.</dd>
|
|
9069
9069
|
**
|
|
9070
9070
|
** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
|
|
@@ -9073,19 +9073,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9073
9073
|
** to 2147483647. The number of virtual machine operations can be
|
|
9074
9074
|
** used as a proxy for the total work done by the prepared statement.
|
|
9075
9075
|
** If the number of virtual machine operations exceeds 2147483647
|
|
9076
|
-
** then the value returned by this statement status code is undefined
|
|
9076
|
+
** then the value returned by this statement status code is undefined.</dd>
|
|
9077
9077
|
**
|
|
9078
9078
|
** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
|
|
9079
9079
|
** <dd>^This is the number of times that the prepare statement has been
|
|
9080
9080
|
** automatically regenerated due to schema changes or changes to
|
|
9081
|
-
** [bound parameters] that might affect the query plan
|
|
9081
|
+
** [bound parameters] that might affect the query plan.</dd>
|
|
9082
9082
|
**
|
|
9083
9083
|
** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
|
|
9084
9084
|
** <dd>^This is the number of times that the prepared statement has
|
|
9085
9085
|
** been run. A single "run" for the purposes of this counter is one
|
|
9086
9086
|
** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
|
|
9087
9087
|
** The counter is incremented on the first [sqlite3_step()] call of each
|
|
9088
|
-
** cycle
|
|
9088
|
+
** cycle.</dd>
|
|
9089
9089
|
**
|
|
9090
9090
|
** [[SQLITE_STMTSTATUS_FILTER_MISS]]
|
|
9091
9091
|
** [[SQLITE_STMTSTATUS_FILTER HIT]]
|
|
@@ -9095,7 +9095,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9095
9095
|
** step was bypassed because a Bloom filter returned not-found. The
|
|
9096
9096
|
** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
|
|
9097
9097
|
** times that the Bloom filter returned a find, and thus the join step
|
|
9098
|
-
** had to be processed as normal
|
|
9098
|
+
** had to be processed as normal.</dd>
|
|
9099
9099
|
**
|
|
9100
9100
|
** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
|
|
9101
9101
|
** <dd>^This is the approximate number of bytes of heap memory
|
|
@@ -9200,9 +9200,9 @@ struct sqlite3_pcache_page {
|
|
|
9200
9200
|
** SQLite will typically create one cache instance for each open database file,
|
|
9201
9201
|
** though this is not guaranteed. ^The
|
|
9202
9202
|
** first parameter, szPage, is the size in bytes of the pages that must
|
|
9203
|
-
** be allocated by the cache. ^szPage will always a power of two. ^The
|
|
9203
|
+
** be allocated by the cache. ^szPage will always be a power of two. ^The
|
|
9204
9204
|
** second parameter szExtra is a number of bytes of extra storage
|
|
9205
|
-
** associated with each page cache entry. ^The szExtra parameter will
|
|
9205
|
+
** associated with each page cache entry. ^The szExtra parameter will be
|
|
9206
9206
|
** a number less than 250. SQLite will use the
|
|
9207
9207
|
** extra szExtra bytes on each page to store metadata about the underlying
|
|
9208
9208
|
** database page on disk. The value passed into szExtra depends
|
|
@@ -9210,17 +9210,17 @@ struct sqlite3_pcache_page {
|
|
|
9210
9210
|
** ^The third argument to xCreate(), bPurgeable, is true if the cache being
|
|
9211
9211
|
** created will be used to cache database pages of a file stored on disk, or
|
|
9212
9212
|
** false if it is used for an in-memory database. The cache implementation
|
|
9213
|
-
** does not have to do anything special based
|
|
9213
|
+
** does not have to do anything special based upon the value of bPurgeable;
|
|
9214
9214
|
** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
|
|
9215
9215
|
** never invoke xUnpin() except to deliberately delete a page.
|
|
9216
9216
|
** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
|
|
9217
9217
|
** false will always have the "discard" flag set to true.
|
|
9218
|
-
** ^Hence, a cache created with bPurgeable false will
|
|
9218
|
+
** ^Hence, a cache created with bPurgeable set to false will
|
|
9219
9219
|
** never contain any unpinned pages.
|
|
9220
9220
|
**
|
|
9221
9221
|
** [[the xCachesize() page cache method]]
|
|
9222
9222
|
** ^(The xCachesize() method may be called at any time by SQLite to set the
|
|
9223
|
-
** suggested maximum cache-size (number of pages stored
|
|
9223
|
+
** suggested maximum cache-size (number of pages stored) for the cache
|
|
9224
9224
|
** instance passed as the first argument. This is the value configured using
|
|
9225
9225
|
** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
|
|
9226
9226
|
** parameter, the implementation is not required to do anything with this
|
|
@@ -9247,12 +9247,12 @@ struct sqlite3_pcache_page {
|
|
|
9247
9247
|
** implementation must return a pointer to the page buffer with its content
|
|
9248
9248
|
** intact. If the requested page is not already in the cache, then the
|
|
9249
9249
|
** cache implementation should use the value of the createFlag
|
|
9250
|
-
** parameter to help it
|
|
9250
|
+
** parameter to help it determine what action to take:
|
|
9251
9251
|
**
|
|
9252
9252
|
** <table border=1 width=85% align=center>
|
|
9253
9253
|
** <tr><th> createFlag <th> Behavior when page is not already in cache
|
|
9254
9254
|
** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
|
|
9255
|
-
** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
|
|
9255
|
+
** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
|
|
9256
9256
|
** Otherwise return NULL.
|
|
9257
9257
|
** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
|
|
9258
9258
|
** NULL if allocating a new page is effectively impossible.
|
|
@@ -9269,7 +9269,7 @@ struct sqlite3_pcache_page {
|
|
|
9269
9269
|
** as its second argument. If the third parameter, discard, is non-zero,
|
|
9270
9270
|
** then the page must be evicted from the cache.
|
|
9271
9271
|
** ^If the discard parameter is
|
|
9272
|
-
** zero, then the page may be discarded or retained at the discretion of
|
|
9272
|
+
** zero, then the page may be discarded or retained at the discretion of the
|
|
9273
9273
|
** page cache implementation. ^The page cache implementation
|
|
9274
9274
|
** may choose to evict unpinned pages at any time.
|
|
9275
9275
|
**
|
|
@@ -9287,7 +9287,7 @@ struct sqlite3_pcache_page {
|
|
|
9287
9287
|
** When SQLite calls the xTruncate() method, the cache must discard all
|
|
9288
9288
|
** existing cache entries with page numbers (keys) greater than or equal
|
|
9289
9289
|
** to the value of the iLimit parameter passed to xTruncate(). If any
|
|
9290
|
-
** of these pages are pinned, they
|
|
9290
|
+
** of these pages are pinned, they become implicitly unpinned, meaning that
|
|
9291
9291
|
** they can be safely discarded.
|
|
9292
9292
|
**
|
|
9293
9293
|
** [[the xDestroy() page cache method]]
|
|
@@ -9586,7 +9586,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9586
9586
|
** application receives an SQLITE_LOCKED error, it may call the
|
|
9587
9587
|
** sqlite3_unlock_notify() method with the blocked connection handle as
|
|
9588
9588
|
** the first argument to register for a callback that will be invoked
|
|
9589
|
-
** when the blocking
|
|
9589
|
+
** when the blocking connection's current transaction is concluded. ^The
|
|
9590
9590
|
** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
|
|
9591
9591
|
** call that concludes the blocking connection's transaction.
|
|
9592
9592
|
**
|
|
@@ -9606,7 +9606,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9606
9606
|
** blocked connection already has a registered unlock-notify callback,
|
|
9607
9607
|
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
|
|
9608
9608
|
** called with a NULL pointer as its second argument, then any existing
|
|
9609
|
-
** unlock-notify callback is canceled. ^The blocked
|
|
9609
|
+
** unlock-notify callback is canceled. ^The blocked connection's
|
|
9610
9610
|
** unlock-notify callback may also be canceled by closing the blocked
|
|
9611
9611
|
** connection using [sqlite3_close()].
|
|
9612
9612
|
**
|
|
@@ -10004,7 +10004,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
10004
10004
|
** support constraints. In this configuration (which is the default) if
|
|
10005
10005
|
** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
|
|
10006
10006
|
** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
|
|
10007
|
-
** specified as part of the
|
|
10007
|
+
** specified as part of the user's SQL statement, regardless of the actual
|
|
10008
10008
|
** ON CONFLICT mode specified.
|
|
10009
10009
|
**
|
|
10010
10010
|
** If X is non-zero, then the virtual table implementation guarantees
|
|
@@ -10038,7 +10038,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
10038
10038
|
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
|
|
10039
10039
|
** <dd>Calls of the form
|
|
10040
10040
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
|
|
10041
|
-
**
|
|
10041
|
+
** [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
10042
10042
|
** identify that virtual table as being safe to use from within triggers
|
|
10043
10043
|
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
|
|
10044
10044
|
** virtual table can do no serious harm even if it is controlled by a
|
|
@@ -10206,7 +10206,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
|
10206
10206
|
** </table>
|
|
10207
10207
|
**
|
|
10208
10208
|
** ^For the purposes of comparing virtual table output values to see if the
|
|
10209
|
-
** values are same value for sorting purposes, two NULL values are considered
|
|
10209
|
+
** values are the same value for sorting purposes, two NULL values are considered
|
|
10210
10210
|
** to be the same. In other words, the comparison operator is "IS"
|
|
10211
10211
|
** (or "IS NOT DISTINCT FROM") and not "==".
|
|
10212
10212
|
**
|
|
@@ -10216,7 +10216,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
|
10216
10216
|
**
|
|
10217
10217
|
** ^A virtual table implementation is always free to return rows in any order
|
|
10218
10218
|
** it wants, as long as the "orderByConsumed" flag is not set. ^When the
|
|
10219
|
-
**
|
|
10219
|
+
** "orderByConsumed" flag is unset, the query planner will add extra
|
|
10220
10220
|
** [bytecode] to ensure that the final results returned by the SQL query are
|
|
10221
10221
|
** ordered correctly. The use of the "orderByConsumed" flag and the
|
|
10222
10222
|
** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
|
|
@@ -10313,7 +10313,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
|
10313
10313
|
** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
|
|
10314
10314
|
** xFilter method which invokes these routines, and specifically
|
|
10315
10315
|
** a parameter that was previously selected for all-at-once IN constraint
|
|
10316
|
-
** processing
|
|
10316
|
+
** processing using the [sqlite3_vtab_in()] interface in the
|
|
10317
10317
|
** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
|
|
10318
10318
|
** an xFilter argument that was selected for all-at-once IN constraint
|
|
10319
10319
|
** processing, then these routines return [SQLITE_ERROR].)^
|
|
@@ -10368,7 +10368,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
|
10368
10368
|
** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
|
|
10369
10369
|
** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
|
|
10370
10370
|
** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
|
|
10371
|
-
** can return
|
|
10371
|
+
** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
|
|
10372
10372
|
** something goes wrong.
|
|
10373
10373
|
**
|
|
10374
10374
|
** The sqlite3_vtab_rhs_value() interface is usually only successful if
|
|
@@ -10396,8 +10396,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10396
10396
|
** KEYWORDS: {conflict resolution mode}
|
|
10397
10397
|
**
|
|
10398
10398
|
** These constants are returned by [sqlite3_vtab_on_conflict()] to
|
|
10399
|
-
** inform a [virtual table] implementation
|
|
10400
|
-
**
|
|
10399
|
+
** inform a [virtual table] implementation of the [ON CONFLICT] mode
|
|
10400
|
+
** for the SQL statement being evaluated.
|
|
10401
10401
|
**
|
|
10402
10402
|
** Note that the [SQLITE_IGNORE] constant is also used as a potential
|
|
10403
10403
|
** return value from the [sqlite3_set_authorizer()] callback and that
|
|
@@ -10437,39 +10437,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10437
10437
|
** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
|
|
10438
10438
|
** <dd>^The "double" variable pointed to by the V parameter will be set to the
|
|
10439
10439
|
** query planner's estimate for the average number of rows output from each
|
|
10440
|
-
** iteration of the X-th loop. If the query planner's
|
|
10440
|
+
** iteration of the X-th loop. If the query planner's estimate was accurate,
|
|
10441
10441
|
** then this value will approximate the quotient NVISIT/NLOOP and the
|
|
10442
10442
|
** product of this value for all prior loops with the same SELECTID will
|
|
10443
|
-
** be the NLOOP value for the current loop
|
|
10443
|
+
** be the NLOOP value for the current loop.</dd>
|
|
10444
10444
|
**
|
|
10445
10445
|
** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
|
|
10446
10446
|
** <dd>^The "const char *" variable pointed to by the V parameter will be set
|
|
10447
10447
|
** to a zero-terminated UTF-8 string containing the name of the index or table
|
|
10448
|
-
** used for the X-th loop
|
|
10448
|
+
** used for the X-th loop.</dd>
|
|
10449
10449
|
**
|
|
10450
10450
|
** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
|
|
10451
10451
|
** <dd>^The "const char *" variable pointed to by the V parameter will be set
|
|
10452
10452
|
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
|
|
10453
|
-
** description for the X-th loop
|
|
10453
|
+
** description for the X-th loop.</dd>
|
|
10454
10454
|
**
|
|
10455
10455
|
** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
|
|
10456
10456
|
** <dd>^The "int" variable pointed to by the V parameter will be set to the
|
|
10457
10457
|
** id for the X-th query plan element. The id value is unique within the
|
|
10458
10458
|
** statement. The select-id is the same value as is output in the first
|
|
10459
|
-
** column of an [EXPLAIN QUERY PLAN] query
|
|
10459
|
+
** column of an [EXPLAIN QUERY PLAN] query.</dd>
|
|
10460
10460
|
**
|
|
10461
10461
|
** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
|
|
10462
10462
|
** <dd>The "int" variable pointed to by the V parameter will be set to the
|
|
10463
|
-
**
|
|
10463
|
+
** id of the parent of the current query element, if applicable, or
|
|
10464
10464
|
** to zero if the query element has no parent. This is the same value as
|
|
10465
|
-
** returned in the second column of an [EXPLAIN QUERY PLAN] query
|
|
10465
|
+
** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
|
|
10466
10466
|
**
|
|
10467
10467
|
** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
|
|
10468
10468
|
** <dd>The sqlite3_int64 output value is set to the number of cycles,
|
|
10469
10469
|
** according to the processor time-stamp counter, that elapsed while the
|
|
10470
10470
|
** query element was being processed. This value is not available for
|
|
10471
10471
|
** all query elements - if it is unavailable the output variable is
|
|
10472
|
-
** set to -1
|
|
10472
|
+
** set to -1.</dd>
|
|
10473
10473
|
** </dl>
|
|
10474
10474
|
*/
|
|
10475
10475
|
#define SQLITE_SCANSTAT_NLOOP 0
|
|
@@ -10510,8 +10510,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10510
10510
|
** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
|
|
10511
10511
|
**
|
|
10512
10512
|
** Parameter "idx" identifies the specific query element to retrieve statistics
|
|
10513
|
-
** for. Query elements are numbered starting from zero. A value of -1 may
|
|
10514
|
-
**
|
|
10513
|
+
** for. Query elements are numbered starting from zero. A value of -1 may
|
|
10514
|
+
** retrieve statistics for the entire query. ^If idx is out of range
|
|
10515
10515
|
** - less than -1 or greater than or equal to the total number of query
|
|
10516
10516
|
** elements used to implement the statement - a non-zero value is returned and
|
|
10517
10517
|
** the variable that pOut points to is unchanged.
|
|
@@ -10668,8 +10668,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
10668
10668
|
** triggers; and so forth.
|
|
10669
10669
|
**
|
|
10670
10670
|
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
|
10671
|
-
** the pre-update hook is invoked with SQLITE_DELETE
|
|
10672
|
-
**
|
|
10671
|
+
** the pre-update hook is invoked with SQLITE_DELETE, because
|
|
10672
|
+
** the new values are not yet available. In this case, when a
|
|
10673
10673
|
** callback made with op==SQLITE_DELETE is actually a write using the
|
|
10674
10674
|
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
|
10675
10675
|
** the index of the column being written. In other cases, where the
|
|
@@ -10922,7 +10922,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10922
10922
|
** For an ordinary on-disk database file, the serialization is just a
|
|
10923
10923
|
** copy of the disk file. For an in-memory database or a "TEMP" database,
|
|
10924
10924
|
** the serialization is the same sequence of bytes which would be written
|
|
10925
|
-
** to disk if that database
|
|
10925
|
+
** to disk if that database were backed up to disk.
|
|
10926
10926
|
**
|
|
10927
10927
|
** The usual case is that sqlite3_serialize() copies the serialization of
|
|
10928
10928
|
** the database into memory obtained from [sqlite3_malloc64()] and returns
|
|
@@ -10931,7 +10931,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10931
10931
|
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
|
|
10932
10932
|
** are made, and the sqlite3_serialize() function will return a pointer
|
|
10933
10933
|
** to the contiguous memory representation of the database that SQLite
|
|
10934
|
-
** is currently using for that database, or NULL if
|
|
10934
|
+
** is currently using for that database, or NULL if no such contiguous
|
|
10935
10935
|
** memory representation of the database exists. A contiguous memory
|
|
10936
10936
|
** representation of the database will usually only exist if there has
|
|
10937
10937
|
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
|
|
@@ -11002,7 +11002,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
11002
11002
|
** database is currently in a read transaction or is involved in a backup
|
|
11003
11003
|
** operation.
|
|
11004
11004
|
**
|
|
11005
|
-
** It is not possible to
|
|
11005
|
+
** It is not possible to deserialize into the TEMP database. If the
|
|
11006
11006
|
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
|
11007
11007
|
** function returns SQLITE_ERROR.
|
|
11008
11008
|
**
|
|
@@ -11024,7 +11024,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
11024
11024
|
sqlite3 *db, /* The database connection */
|
|
11025
11025
|
const char *zSchema, /* Which DB to reopen with the deserialization */
|
|
11026
11026
|
unsigned char *pData, /* The serialized database content */
|
|
11027
|
-
sqlite3_int64 szDb, /* Number bytes in the deserialization */
|
|
11027
|
+
sqlite3_int64 szDb, /* Number of bytes in the deserialization */
|
|
11028
11028
|
sqlite3_int64 szBuf, /* Total size of buffer pData[] */
|
|
11029
11029
|
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
|
|
11030
11030
|
);
|
|
@@ -11032,7 +11032,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
11032
11032
|
/*
|
|
11033
11033
|
** CAPI3REF: Flags for sqlite3_deserialize()
|
|
11034
11034
|
**
|
|
11035
|
-
** The following are allowed values for 6th argument (the F argument) to
|
|
11035
|
+
** The following are allowed values for the 6th argument (the F argument) to
|
|
11036
11036
|
** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
|
|
11037
11037
|
**
|
|
11038
11038
|
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
|
|
@@ -61,7 +61,7 @@ function Database(filenameGiven, options) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// Make sure the specified directory exists
|
|
64
|
-
if (!anonymous && !fs.existsSync(path.dirname(filename))) {
|
|
64
|
+
if (!anonymous && !filename.startsWith('file:') && !fs.existsSync(path.dirname(filename))) {
|
|
65
65
|
throw new TypeError('Cannot open database because the directory does not exist');
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.1",
|
|
4
4
|
"description": "The fastest and simplest library for SQLite in Node.js.",
|
|
5
5
|
"homepage": "http://github.com/WiseLibs/better-sqlite3",
|
|
6
6
|
"author": "Joshua Wise <joshuathomaswise@gmail.com>",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"main": "lib/index.js",
|
|
12
12
|
"files": [
|
|
13
13
|
"binding.gyp",
|
|
14
|
-
"src
|
|
14
|
+
"src/**/*.[ch]pp",
|
|
15
15
|
"lib/**",
|
|
16
16
|
"deps/**"
|
|
17
17
|
],
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"overrides": {
|
|
26
26
|
"prebuild": {
|
|
27
|
-
"node-abi": "4.
|
|
27
|
+
"node-abi": "4.13.1"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -41,12 +41,9 @@
|
|
|
41
41
|
"install": "prebuild-install || node-gyp rebuild --release",
|
|
42
42
|
"build-release": "node-gyp rebuild --release",
|
|
43
43
|
"build-debug": "node-gyp rebuild --debug",
|
|
44
|
-
"rebuild-release": "npm run lzz && npm run build-release",
|
|
45
|
-
"rebuild-debug": "npm run lzz && npm run build-debug",
|
|
46
44
|
"test": "mocha --exit --slow=75 --timeout=5000",
|
|
47
45
|
"benchmark": "node benchmark",
|
|
48
|
-
"download": "bash ./deps/download.sh"
|
|
49
|
-
"lzz": "lzz -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz"
|
|
46
|
+
"download": "bash ./deps/download.sh"
|
|
50
47
|
},
|
|
51
48
|
"license": "MIT",
|
|
52
49
|
"keywords": [
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
struct Addon {
|
|
2
|
+
explicit Addon(v8::Isolate* isolate) :
|
|
3
|
+
privileged_info(NULL),
|
|
4
|
+
next_id(0),
|
|
5
|
+
cs(isolate) {}
|
|
6
|
+
|
|
7
|
+
static void Cleanup(void* ptr) {
|
|
8
|
+
Addon* addon = static_cast<Addon*>(ptr);
|
|
9
|
+
for (Database* db : addon->dbs) db->CloseHandles();
|
|
10
|
+
addon->dbs.clear();
|
|
11
|
+
delete addon;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
inline sqlite3_uint64 NextId() {
|
|
15
|
+
return next_id++;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static void ConfigureURI() {
|
|
19
|
+
static std::once_flag init_flag;
|
|
20
|
+
std::call_once(init_flag, [](){
|
|
21
|
+
const char* env = getenv("SQLITE_USE_URI");
|
|
22
|
+
if (env != NULL) {
|
|
23
|
+
if (strcmp(env, "1") == 0) {
|
|
24
|
+
int status = sqlite3_config(SQLITE_CONFIG_URI, 1);
|
|
25
|
+
assert(status == SQLITE_OK); ((void)status);
|
|
26
|
+
} else if (strcmp(env, "0") == 0) {
|
|
27
|
+
int status = sqlite3_config(SQLITE_CONFIG_URI, 0);
|
|
28
|
+
assert(status == SQLITE_OK); ((void)status);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static NODE_METHOD(JS_setErrorConstructor) {
|
|
35
|
+
REQUIRE_ARGUMENT_FUNCTION(first, v8::Local<v8::Function> SqliteError);
|
|
36
|
+
OnlyAddon->SqliteError.Reset(OnlyIsolate, SqliteError);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
v8::Global<v8::Function> Statement;
|
|
40
|
+
v8::Global<v8::Function> StatementIterator;
|
|
41
|
+
v8::Global<v8::Function> Backup;
|
|
42
|
+
v8::Global<v8::Function> SqliteError;
|
|
43
|
+
NODE_ARGUMENTS_POINTER privileged_info;
|
|
44
|
+
sqlite3_uint64 next_id;
|
|
45
|
+
CS cs;
|
|
46
|
+
std::set<Database*, Database::CompareDatabase> dbs;
|
|
47
|
+
};
|