mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Correct some internal-use JS docs and update the 'string:flexible' type conversion to accept an ArrayBuffer (as it was recently documented to).
FossilOrigin-Name: eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0
This commit is contained in:
@ -1246,9 +1246,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
if(wasm.bigIntEnabled) return t;
|
||||
/* else fall through */
|
||||
default:
|
||||
//console.log("isSupportedBindType",t,v);
|
||||
return (util.isBindableTypedArray(v) || (v instanceof ArrayBuffer))
|
||||
? BindTypes.blob : undefined;
|
||||
return util.isBindableTypedArray(v) ? BindTypes.blob : undefined;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1466,7 +1464,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
blob binding).
|
||||
|
||||
- Uint8Array, Int8Array, and ArrayBuffer instances are bound as
|
||||
blobs. (TODO? binding the other TypedArray types.)
|
||||
blobs.
|
||||
|
||||
If passed an array, each element of the array is bound at
|
||||
the parameter index equal to the array index plus 1
|
||||
|
@ -321,7 +321,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
|
||||
};
|
||||
|
||||
/**
|
||||
Returns v if v appears to be one of our bind()-able TypedArray
|
||||
Returns true if v appears to be one of our bind()-able TypedArray
|
||||
types: Uint8Array or Int8Array or ArrayBuffer. Support for
|
||||
TypedArrays with element sizes >1 is a potential TODO just
|
||||
waiting on a use case to justify them. Until then, their `buffer`
|
||||
@ -377,7 +377,11 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
|
||||
returned. Else v is returned as-is.
|
||||
*/
|
||||
const flexibleString = function(v){
|
||||
if(isSQLableTypedArray(v)) return typedArrayToString(v);
|
||||
if(isSQLableTypedArray(v)){
|
||||
return typedArrayToString(
|
||||
(v instanceof ArrayBuffer) ? new Uint8Array(v) : v
|
||||
);
|
||||
}
|
||||
else if(Array.isArray(v)) return v.join("");
|
||||
else if(wasm.isPtr(v)) v = wasm.cstrToJs(v);
|
||||
return v;
|
||||
@ -751,7 +755,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
|
||||
affirmBindableTypedArray, flexibleString,
|
||||
bigIntFits32, bigIntFits64, bigIntFitsDouble,
|
||||
isBindableTypedArray,
|
||||
isInt32, isSQLableTypedArray, isTypedArray,
|
||||
isInt32, isSQLableTypedArray, isTypedArray,
|
||||
typedArrayToString,
|
||||
isUIThread: ()=>(self.window===self && !!self.document),
|
||||
// is this true for ESM?: 'undefined'===typeof WorkerGlobalScope
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Only\sadd\san\son-db-close\scleanup\sentry\sfor\scollations\sif\sadding\sthe\scollation\ssucceeds\sand\sxCompare\sis-a\sJS\sfunction.
|
||||
D 2022-12-26T14:25:21.345
|
||||
C Correct\ssome\sinternal-use\sJS\sdocs\sand\supdate\sthe\s'string:flexible'\stype\sconversion\sto\saccept\san\sArrayBuffer\s(as\sit\swas\srecently\sdocumented\sto).
|
||||
D 2022-12-26T14:55:00.015
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -504,8 +504,8 @@ F ext/wasm/api/post-js-header.js 47b6b281f39ad59fa6e8b658308cd98ea292c286a68407b
|
||||
F ext/wasm/api/pre-js.c-pp.js b88499dc303c21fc3f55f2c364a0f814f587b60a95784303881169f9e91c1d5f
|
||||
F ext/wasm/api/sqlite3-api-cleanup.js 680d5ccfff54459db136a49b2199d9f879c8405d9c99af1dda0cc5e7c29056f4
|
||||
F ext/wasm/api/sqlite3-api-glue.js 232bdd95abf27ce6e92b5d7e7ad28118992365520599fcc1b91cf25a430ea8bf
|
||||
F ext/wasm/api/sqlite3-api-oo1.js 959be9a922d1f012b4a25e7b763c112220bb0efb989f56b82a776ab1ccebe72d
|
||||
F ext/wasm/api/sqlite3-api-prologue.js 3792a703ea15be8d4393a99992862c285d62732d760cec95226dc5ec2781d920
|
||||
F ext/wasm/api/sqlite3-api-oo1.js 045c98796950c22556fc0842fe9f0d9a67f31920f247e24fb440571cdb6be5b0
|
||||
F ext/wasm/api/sqlite3-api-prologue.js f8d21f26615c332de98e0eb85f2e55f7b90e3d522c0357e07d6e1de8c5681e49
|
||||
F ext/wasm/api/sqlite3-api-worker1.js c9ef8865f072e61251260b218aa4ed614a21a25e9e3cc6f22acf81794d32fc0b
|
||||
F ext/wasm/api/sqlite3-license-version-header.js a661182fc93fc2cf212dfd0b987f8e138a3ac98f850b1112e29b5fbdaecc87c3
|
||||
F ext/wasm/api/sqlite3-opfs-async-proxy.js 7795b84b66a7a8dedc791340709b310bb497c3c72a80bef364fa2a58e2ddae3f
|
||||
@ -2067,8 +2067,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 7a46e629dcbf97ae037c5abb39306af7ad55f1910c1e962373e09d88d8bd5a33
|
||||
R ea04524f0bc74032e475c426c786ceba
|
||||
P 18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee
|
||||
R 160fe994465231b79e87837be38dc79b
|
||||
U stephan
|
||||
Z de786855ae41b30556ccc9f965731fe5
|
||||
Z 59b56e199ffa18f089018d23ec3db748
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
18a5480f1e0dca55703b43fa17685a4cc577cab8841ce47c807af02348ad85ee
|
||||
eff5d3bec29043cc1182bbb5229040dac5ff50264d025e354736bb63b4bc97a0
|
Reference in New Issue
Block a user