better-sqlite3-multiple-ciphers 11.5.0 → 11.7.0
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/README.md +4 -4
- package/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +182 -63
- package/deps/sqlite3/sqlite3.h +14 -5
- package/package.json +1 -1
- package/src/better_sqlite3.cpp +25 -4
- package/src/better_sqlite3.hpp +22 -22
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ The fastest and simplest library for SQLite3 in Node.js. This particular fork su
|
|
|
17
17
|
## Current versions
|
|
18
18
|
|
|
19
19
|
- ### Stable
|
|
20
|
-
- **better-sqlite3-multiple-ciphers** - [`11.
|
|
21
|
-
- **better-sqlite3** - [`11.
|
|
22
|
-
- **SQLite** - [`3.47.
|
|
23
|
-
- **SQLite3 Multiple Ciphers** - [`1.9.
|
|
20
|
+
- **better-sqlite3-multiple-ciphers** - [`11.7.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v11.7.0)
|
|
21
|
+
- **better-sqlite3** - [`11.7.0`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v11.7.0)
|
|
22
|
+
- **SQLite** - [`3.47.2`](https://www.sqlite.org/releaselog/3_47_2.html)
|
|
23
|
+
- **SQLite3 Multiple Ciphers** - [`1.9.2`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v1.9.2)
|
|
24
24
|
|
|
25
25
|
- ### Beta
|
|
26
26
|
- **better-sqlite3-multiple-ciphers** - [`11.0.0-beta.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v11.0.0-beta.0)
|
package/deps/setup.ps1
CHANGED
package/deps/sqlite3/sqlite3.c
CHANGED
|
@@ -136,7 +136,7 @@ SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
136
136
|
/*** Begin of #include "sqlite3patched.c" ***/
|
|
137
137
|
/******************************************************************************
|
|
138
138
|
** This file is an amalgamation of many separate C source files from SQLite
|
|
139
|
-
** version 3.47.
|
|
139
|
+
** version 3.47.2. By combining all the individual C code files into this
|
|
140
140
|
** single large file, the entire code can be compiled as a single translation
|
|
141
141
|
** unit. This allows many compilers to do optimizations that would not be
|
|
142
142
|
** possible if the files were compiled separately. Performance improvements
|
|
@@ -154,7 +154,7 @@ SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
154
154
|
** separate file. This file contains only code for the core SQLite library.
|
|
155
155
|
**
|
|
156
156
|
** The content in this amalgamation comes from Fossil check-in
|
|
157
|
-
**
|
|
157
|
+
** 2aabe05e2e8cae4847a802ee2daddc1d7413.
|
|
158
158
|
*/
|
|
159
159
|
#define SQLITE_CORE 1
|
|
160
160
|
#define SQLITE_AMALGAMATION 1
|
|
@@ -598,9 +598,9 @@ extern "C" {
|
|
|
598
598
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
599
599
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
600
600
|
*/
|
|
601
|
-
#define SQLITE_VERSION "3.47.
|
|
602
|
-
#define SQLITE_VERSION_NUMBER
|
|
603
|
-
#define SQLITE_SOURCE_ID "2024-
|
|
601
|
+
#define SQLITE_VERSION "3.47.2"
|
|
602
|
+
#define SQLITE_VERSION_NUMBER 3047002
|
|
603
|
+
#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
|
|
604
604
|
|
|
605
605
|
/*
|
|
606
606
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -1104,6 +1104,13 @@ SQLITE_API int sqlite3_exec(
|
|
|
1104
1104
|
** filesystem supports doing multiple write operations atomically when those
|
|
1105
1105
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
1106
1106
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
1107
|
+
**
|
|
1108
|
+
** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
|
|
1109
|
+
** from the database file in amounts that are not a multiple of the
|
|
1110
|
+
** page size and that do not begin at a page boundary. Without this
|
|
1111
|
+
** property, SQLite is careful to only do full-page reads and write
|
|
1112
|
+
** on aligned pages, with the one exception that it will do a sub-page
|
|
1113
|
+
** read of the first page to access the database header.
|
|
1107
1114
|
*/
|
|
1108
1115
|
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
1109
1116
|
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
@@ -1120,6 +1127,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
1120
1127
|
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
1121
1128
|
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
1122
1129
|
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
1130
|
+
#define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
|
|
1123
1131
|
|
|
1124
1132
|
/*
|
|
1125
1133
|
** CAPI3REF: File Locking Levels
|
|
@@ -1266,6 +1274,7 @@ struct sqlite3_file {
|
|
|
1266
1274
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
|
|
1267
1275
|
** <li> [SQLITE_IOCAP_IMMUTABLE]
|
|
1268
1276
|
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
|
|
1277
|
+
** <li> [SQLITE_IOCAP_SUBPAGE_READ]
|
|
1269
1278
|
** </ul>
|
|
1270
1279
|
**
|
|
1271
1280
|
** The SQLITE_IOCAP_ATOMIC property means that all writes of
|
|
@@ -11345,6 +11354,7 @@ typedef struct Pager PagerMC;
|
|
|
11345
11354
|
SQLITE_PRIVATE int sqlite3mcPagerHasCodec(PagerMC* pPager);
|
|
11346
11355
|
SQLITE_PRIVATE void sqlite3mcInitMemoryMethods();
|
|
11347
11356
|
SQLITE_PRIVATE int sqlite3mcIsBackupSupported(sqlite3*, const char*, sqlite3*, const char*);
|
|
11357
|
+
SQLITE_PRIVATE void sqlite3mcCodecGetKey(sqlite3* db, int nDb, void** zKey, int* nKey);
|
|
11348
11358
|
|
|
11349
11359
|
/******** Begin file sqlite3rtree.h *********/
|
|
11350
11360
|
/*
|
|
@@ -32452,6 +32462,7 @@ SQLITE_PRIVATE void sqlite3RecordErrorOffsetOfExpr(sqlite3 *db, const Expr *pExp
|
|
|
32452
32462
|
pExpr = pExpr->pLeft;
|
|
32453
32463
|
}
|
|
32454
32464
|
if( pExpr==0 ) return;
|
|
32465
|
+
if( ExprHasProperty(pExpr, EP_FromDDL) ) return;
|
|
32455
32466
|
db->errByteOffset = pExpr->w.iOfst;
|
|
32456
32467
|
}
|
|
32457
32468
|
|
|
@@ -35841,8 +35852,8 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
|
|
|
35841
35852
|
int eValid = 1; /* True exponent is either not used or is well-formed */
|
|
35842
35853
|
int nDigit = 0; /* Number of digits processed */
|
|
35843
35854
|
int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */
|
|
35855
|
+
u64 s2; /* round-tripped significand */
|
|
35844
35856
|
double rr[2];
|
|
35845
|
-
u64 s2;
|
|
35846
35857
|
|
|
35847
35858
|
assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
|
|
35848
35859
|
*pResult = 0.0; /* Default return value, in case of an error */
|
|
@@ -35945,7 +35956,7 @@ do_atof_calc:
|
|
|
35945
35956
|
e = (e*esign) + d;
|
|
35946
35957
|
|
|
35947
35958
|
/* Try to adjust the exponent to make it smaller */
|
|
35948
|
-
while( e>0 && s<(LARGEST_UINT64/10) ){
|
|
35959
|
+
while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){
|
|
35949
35960
|
s *= 10;
|
|
35950
35961
|
e--;
|
|
35951
35962
|
}
|
|
@@ -35955,11 +35966,16 @@ do_atof_calc:
|
|
|
35955
35966
|
}
|
|
35956
35967
|
|
|
35957
35968
|
rr[0] = (double)s;
|
|
35958
|
-
|
|
35959
|
-
|
|
35960
|
-
if( s2
|
|
35961
|
-
|
|
35962
|
-
|
|
35969
|
+
assert( sizeof(s2)==sizeof(rr[0]) );
|
|
35970
|
+
memcpy(&s2, &rr[0], sizeof(s2));
|
|
35971
|
+
if( s2<=0x43efffffffffffffLL ){
|
|
35972
|
+
s2 = (u64)rr[0];
|
|
35973
|
+
rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
|
|
35974
|
+
}else{
|
|
35975
|
+
rr[1] = 0.0;
|
|
35976
|
+
}
|
|
35977
|
+
assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */
|
|
35978
|
+
|
|
35963
35979
|
if( e>0 ){
|
|
35964
35980
|
while( e>=100 ){
|
|
35965
35981
|
e -= 100;
|
|
@@ -42749,6 +42765,7 @@ static void setDeviceCharacteristics(unixFile *pFd){
|
|
|
42749
42765
|
if( pFd->ctrlFlags & UNIXFILE_PSOW ){
|
|
42750
42766
|
pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
|
|
42751
42767
|
}
|
|
42768
|
+
pFd->deviceCharacteristics |= SQLITE_IOCAP_SUBPAGE_READ;
|
|
42752
42769
|
|
|
42753
42770
|
pFd->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
|
|
42754
42771
|
}
|
|
@@ -50549,7 +50566,7 @@ static int winSectorSize(sqlite3_file *id){
|
|
|
50549
50566
|
*/
|
|
50550
50567
|
static int winDeviceCharacteristics(sqlite3_file *id){
|
|
50551
50568
|
winFile *p = (winFile*)id;
|
|
50552
|
-
return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
|
|
50569
|
+
return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | SQLITE_IOCAP_SUBPAGE_READ |
|
|
50553
50570
|
((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0);
|
|
50554
50571
|
}
|
|
50555
50572
|
|
|
@@ -51937,7 +51954,7 @@ static int winOpen(
|
|
|
51937
51954
|
|
|
51938
51955
|
int rc = SQLITE_OK; /* Function Return Code */
|
|
51939
51956
|
#if !defined(NDEBUG) || SQLITE_OS_WINCE
|
|
51940
|
-
int eType = flags&
|
|
51957
|
+
int eType = flags&0x0FFF00; /* Type of file to open */
|
|
51941
51958
|
#endif
|
|
51942
51959
|
|
|
51943
51960
|
int isExclusive = (flags & SQLITE_OPEN_EXCLUSIVE);
|
|
@@ -58157,19 +58174,27 @@ static const unsigned char aJournalMagic[] = {
|
|
|
58157
58174
|
** Return true if page pgno can be read directly from the database file
|
|
58158
58175
|
** by the b-tree layer. This is the case if:
|
|
58159
58176
|
**
|
|
58160
|
-
**
|
|
58161
|
-
**
|
|
58162
|
-
**
|
|
58177
|
+
** (1) the database file is open
|
|
58178
|
+
** (2) the VFS for the database is able to do unaligned sub-page reads
|
|
58179
|
+
** (3) there are no dirty pages in the cache, and
|
|
58180
|
+
** (4) the desired page is not currently in the wal file.
|
|
58163
58181
|
*/
|
|
58164
58182
|
SQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
|
|
58165
|
-
|
|
58166
|
-
|
|
58183
|
+
assert( pPager!=0 );
|
|
58184
|
+
assert( pPager->fd!=0 );
|
|
58185
|
+
if( pPager->fd->pMethods==0 ) return 0; /* Case (1) */
|
|
58186
|
+
assert( pPager->fd->pMethods->xDeviceCharacteristics!=0 );
|
|
58187
|
+
if( (pPager->fd->pMethods->xDeviceCharacteristics(pPager->fd)
|
|
58188
|
+
& SQLITE_IOCAP_SUBPAGE_READ)==0 ){
|
|
58189
|
+
return 0; /* Case (2) */
|
|
58190
|
+
}
|
|
58191
|
+
if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0; /* Failed (3) */
|
|
58167
58192
|
if( sqlite3mcPagerHasCodec(pPager) != 0 ) return 0;
|
|
58168
58193
|
#ifndef SQLITE_OMIT_WAL
|
|
58169
58194
|
if( pPager->pWal ){
|
|
58170
58195
|
u32 iRead = 0;
|
|
58171
58196
|
(void)sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
|
|
58172
|
-
return iRead==0;
|
|
58197
|
+
return iRead==0; /* Condition (4) */
|
|
58173
58198
|
}
|
|
58174
58199
|
#endif
|
|
58175
58200
|
return 1;
|
|
@@ -147756,32 +147781,32 @@ static Expr *substExpr(
|
|
|
147756
147781
|
if( pSubst->isOuterJoin ){
|
|
147757
147782
|
ExprSetProperty(pNew, EP_CanBeNull);
|
|
147758
147783
|
}
|
|
147759
|
-
if(
|
|
147760
|
-
|
|
147761
|
-
|
|
147762
|
-
|
|
147763
|
-
sqlite3ExprDelete(db, pExpr);
|
|
147764
|
-
pExpr = pNew;
|
|
147765
|
-
if( pExpr->op==TK_TRUEFALSE ){
|
|
147766
|
-
pExpr->u.iValue = sqlite3ExprTruthValue(pExpr);
|
|
147767
|
-
pExpr->op = TK_INTEGER;
|
|
147768
|
-
ExprSetProperty(pExpr, EP_IntValue);
|
|
147784
|
+
if( pNew->op==TK_TRUEFALSE ){
|
|
147785
|
+
pNew->u.iValue = sqlite3ExprTruthValue(pNew);
|
|
147786
|
+
pNew->op = TK_INTEGER;
|
|
147787
|
+
ExprSetProperty(pNew, EP_IntValue);
|
|
147769
147788
|
}
|
|
147770
147789
|
|
|
147771
147790
|
/* Ensure that the expression now has an implicit collation sequence,
|
|
147772
147791
|
** just as it did when it was a column of a view or sub-query. */
|
|
147773
147792
|
{
|
|
147774
|
-
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse,
|
|
147793
|
+
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pNew);
|
|
147775
147794
|
CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,
|
|
147776
147795
|
pSubst->pCList->a[iColumn].pExpr
|
|
147777
147796
|
);
|
|
147778
|
-
if( pNat!=pColl || (
|
|
147779
|
-
|
|
147797
|
+
if( pNat!=pColl || (pNew->op!=TK_COLUMN && pNew->op!=TK_COLLATE) ){
|
|
147798
|
+
pNew = sqlite3ExprAddCollateString(pSubst->pParse, pNew,
|
|
147780
147799
|
(pColl ? pColl->zName : "BINARY")
|
|
147781
147800
|
);
|
|
147782
147801
|
}
|
|
147783
147802
|
}
|
|
147784
|
-
ExprClearProperty(
|
|
147803
|
+
ExprClearProperty(pNew, EP_Collate);
|
|
147804
|
+
if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){
|
|
147805
|
+
sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,
|
|
147806
|
+
pExpr->flags & (EP_OuterON|EP_InnerON));
|
|
147807
|
+
}
|
|
147808
|
+
sqlite3ExprDelete(db, pExpr);
|
|
147809
|
+
pExpr = pNew;
|
|
147785
147810
|
}
|
|
147786
147811
|
}
|
|
147787
147812
|
}else{
|
|
@@ -156333,6 +156358,15 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3RunVacuum(
|
|
|
156333
156358
|
}
|
|
156334
156359
|
nRes = sqlite3BtreeGetRequestedReserve(pMain);
|
|
156335
156360
|
|
|
156361
|
+
/* A VACUUM cannot change the pagesize of an encrypted database. */
|
|
156362
|
+
if( db->nextPagesize ){
|
|
156363
|
+
extern void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);
|
|
156364
|
+
int nKey;
|
|
156365
|
+
char *zKey;
|
|
156366
|
+
sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);
|
|
156367
|
+
if( nKey ) db->nextPagesize = 0;
|
|
156368
|
+
}
|
|
156369
|
+
|
|
156336
156370
|
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
|
|
156337
156371
|
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
|
|
156338
156372
|
sqlite3BtreeSetPagerFlags(pTemp, pgflags|PAGER_CACHESPILL);
|
|
@@ -159109,6 +159143,7 @@ static Expr *removeUnindexableInClauseTerms(
|
|
|
159109
159143
|
pNew->pLeft->x.pList = pLhs;
|
|
159110
159144
|
}
|
|
159111
159145
|
pSelect->pEList = pRhs;
|
|
159146
|
+
pSelect->selId = ++pParse->nSelect; /* Req'd for SubrtnSig validity */
|
|
159112
159147
|
if( pLhs && pLhs->nExpr==1 ){
|
|
159113
159148
|
/* Take care here not to generate a TK_VECTOR containing only a
|
|
159114
159149
|
** single value. Since the parser never creates such a vector, some
|
|
@@ -189976,10 +190011,15 @@ static int fts3PoslistPhraseMerge(
|
|
|
189976
190011
|
if( *p1==POS_COLUMN ){
|
|
189977
190012
|
p1++;
|
|
189978
190013
|
p1 += fts3GetVarint32(p1, &iCol1);
|
|
190014
|
+
/* iCol1==0 indicates corruption. Column 0 does not have a POS_COLUMN
|
|
190015
|
+
** entry, so this is actually end-of-doclist. */
|
|
190016
|
+
if( iCol1==0 ) return 0;
|
|
189979
190017
|
}
|
|
189980
190018
|
if( *p2==POS_COLUMN ){
|
|
189981
190019
|
p2++;
|
|
189982
190020
|
p2 += fts3GetVarint32(p2, &iCol2);
|
|
190021
|
+
/* As above, iCol2==0 indicates corruption. */
|
|
190022
|
+
if( iCol2==0 ) return 0;
|
|
189983
190023
|
}
|
|
189984
190024
|
|
|
189985
190025
|
while( 1 ){
|
|
@@ -193150,7 +193190,7 @@ static int fts3EvalNearTest(Fts3Expr *pExpr, int *pRc){
|
|
|
193150
193190
|
nTmp += p->pRight->pPhrase->doclist.nList;
|
|
193151
193191
|
}
|
|
193152
193192
|
nTmp += p->pPhrase->doclist.nList;
|
|
193153
|
-
aTmp = sqlite3_malloc64(nTmp*2);
|
|
193193
|
+
aTmp = sqlite3_malloc64(nTmp*2 + FTS3_VARINT_MAX);
|
|
193154
193194
|
if( !aTmp ){
|
|
193155
193195
|
*pRc = SQLITE_NOMEM;
|
|
193156
193196
|
res = 0;
|
|
@@ -194703,10 +194743,11 @@ static int getNextString(
|
|
|
194703
194743
|
Fts3PhraseToken *pToken;
|
|
194704
194744
|
|
|
194705
194745
|
p = fts3ReallocOrFree(p, nSpace + ii*sizeof(Fts3PhraseToken));
|
|
194706
|
-
if( !p ) goto no_mem;
|
|
194707
|
-
|
|
194708
194746
|
zTemp = fts3ReallocOrFree(zTemp, nTemp + nByte);
|
|
194709
|
-
if( !zTemp
|
|
194747
|
+
if( !zTemp || !p ){
|
|
194748
|
+
rc = SQLITE_NOMEM;
|
|
194749
|
+
goto getnextstring_out;
|
|
194750
|
+
}
|
|
194710
194751
|
|
|
194711
194752
|
assert( nToken==ii );
|
|
194712
194753
|
pToken = &((Fts3Phrase *)(&p[1]))->aToken[ii];
|
|
@@ -194721,9 +194762,6 @@ static int getNextString(
|
|
|
194721
194762
|
nToken = ii+1;
|
|
194722
194763
|
}
|
|
194723
194764
|
}
|
|
194724
|
-
|
|
194725
|
-
pModule->xClose(pCursor);
|
|
194726
|
-
pCursor = 0;
|
|
194727
194765
|
}
|
|
194728
194766
|
|
|
194729
194767
|
if( rc==SQLITE_DONE ){
|
|
@@ -194731,7 +194769,10 @@ static int getNextString(
|
|
|
194731
194769
|
char *zBuf = 0;
|
|
194732
194770
|
|
|
194733
194771
|
p = fts3ReallocOrFree(p, nSpace + nToken*sizeof(Fts3PhraseToken) + nTemp);
|
|
194734
|
-
if( !p )
|
|
194772
|
+
if( !p ){
|
|
194773
|
+
rc = SQLITE_NOMEM;
|
|
194774
|
+
goto getnextstring_out;
|
|
194775
|
+
}
|
|
194735
194776
|
memset(p, 0, (char *)&(((Fts3Phrase *)&p[1])->aToken[0])-(char *)p);
|
|
194736
194777
|
p->eType = FTSQUERY_PHRASE;
|
|
194737
194778
|
p->pPhrase = (Fts3Phrase *)&p[1];
|
|
@@ -194739,11 +194780,9 @@ static int getNextString(
|
|
|
194739
194780
|
p->pPhrase->nToken = nToken;
|
|
194740
194781
|
|
|
194741
194782
|
zBuf = (char *)&p->pPhrase->aToken[nToken];
|
|
194783
|
+
assert( nTemp==0 || zTemp );
|
|
194742
194784
|
if( zTemp ){
|
|
194743
194785
|
memcpy(zBuf, zTemp, nTemp);
|
|
194744
|
-
sqlite3_free(zTemp);
|
|
194745
|
-
}else{
|
|
194746
|
-
assert( nTemp==0 );
|
|
194747
194786
|
}
|
|
194748
194787
|
|
|
194749
194788
|
for(jj=0; jj<p->pPhrase->nToken; jj++){
|
|
@@ -194753,17 +194792,17 @@ static int getNextString(
|
|
|
194753
194792
|
rc = SQLITE_OK;
|
|
194754
194793
|
}
|
|
194755
194794
|
|
|
194756
|
-
|
|
194757
|
-
return rc;
|
|
194758
|
-
no_mem:
|
|
194759
|
-
|
|
194795
|
+
getnextstring_out:
|
|
194760
194796
|
if( pCursor ){
|
|
194761
194797
|
pModule->xClose(pCursor);
|
|
194762
194798
|
}
|
|
194763
194799
|
sqlite3_free(zTemp);
|
|
194764
|
-
|
|
194765
|
-
|
|
194766
|
-
|
|
194800
|
+
if( rc!=SQLITE_OK ){
|
|
194801
|
+
sqlite3_free(p);
|
|
194802
|
+
p = 0;
|
|
194803
|
+
}
|
|
194804
|
+
*ppExpr = p;
|
|
194805
|
+
return rc;
|
|
194767
194806
|
}
|
|
194768
194807
|
|
|
194769
194808
|
/*
|
|
@@ -232984,7 +233023,27 @@ SQLITE_API int sqlite3session_config(int op, void *pArg){
|
|
|
232984
233023
|
/************** End of sqlite3session.c **************************************/
|
|
232985
233024
|
/************** Begin file fts5.c ********************************************/
|
|
232986
233025
|
|
|
232987
|
-
|
|
233026
|
+
/*
|
|
233027
|
+
** This, the "fts5.c" source file, is a composite file that is itself
|
|
233028
|
+
** assembled from the following files:
|
|
233029
|
+
**
|
|
233030
|
+
** fts5.h
|
|
233031
|
+
** fts5Int.h
|
|
233032
|
+
** fts5parse.h <--- Generated from fts5parse.y by Lemon
|
|
233033
|
+
** fts5parse.c <--- Generated from fts5parse.y by Lemon
|
|
233034
|
+
** fts5_aux.c
|
|
233035
|
+
** fts5_buffer.c
|
|
233036
|
+
** fts5_config.c
|
|
233037
|
+
** fts5_expr.c
|
|
233038
|
+
** fts5_hash.c
|
|
233039
|
+
** fts5_index.c
|
|
233040
|
+
** fts5_main.c
|
|
233041
|
+
** fts5_storage.c
|
|
233042
|
+
** fts5_tokenize.c
|
|
233043
|
+
** fts5_unicode2.c
|
|
233044
|
+
** fts5_varint.c
|
|
233045
|
+
** fts5_vocab.c
|
|
233046
|
+
*/
|
|
232988
233047
|
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)
|
|
232989
233048
|
|
|
232990
233049
|
#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
|
|
@@ -232994,6 +233053,12 @@ SQLITE_API int sqlite3session_config(int op, void *pArg){
|
|
|
232994
233053
|
# undef NDEBUG
|
|
232995
233054
|
#endif
|
|
232996
233055
|
|
|
233056
|
+
#ifdef HAVE_STDINT_H
|
|
233057
|
+
/* #include <stdint.h> */
|
|
233058
|
+
#endif
|
|
233059
|
+
#ifdef HAVE_INTTYPES_H
|
|
233060
|
+
/* #include <inttypes.h> */
|
|
233061
|
+
#endif
|
|
232997
233062
|
/*
|
|
232998
233063
|
** 2014 May 31
|
|
232999
233064
|
**
|
|
@@ -255066,7 +255131,7 @@ static void fts5SourceIdFunc(
|
|
|
255066
255131
|
){
|
|
255067
255132
|
assert( nArg==0 );
|
|
255068
255133
|
UNUSED_PARAM2(nArg, apUnused);
|
|
255069
|
-
sqlite3_result_text(pCtx, "fts5: 2024-
|
|
255134
|
+
sqlite3_result_text(pCtx, "fts5: 2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c", -1, SQLITE_TRANSIENT);
|
|
255070
255135
|
}
|
|
255071
255136
|
|
|
255072
255137
|
/*
|
|
@@ -260257,7 +260322,7 @@ static int sqlite3Fts5VocabInit(Fts5Global *pGlobal, sqlite3 *db){
|
|
|
260257
260322
|
}
|
|
260258
260323
|
|
|
260259
260324
|
|
|
260260
|
-
|
|
260325
|
+
/* Here ends the fts5.c composite file. */
|
|
260261
260326
|
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
|
|
260262
260327
|
|
|
260263
260328
|
/************** End of fts5.c ************************************************/
|
|
@@ -260840,9 +260905,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
|
|
|
260840
260905
|
|
|
260841
260906
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
260842
260907
|
#define SQLITE3MC_VERSION_MINOR 9
|
|
260843
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
260908
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
260844
260909
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
260845
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.9.
|
|
260910
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.9.2"
|
|
260846
260911
|
|
|
260847
260912
|
#endif /* SQLITE3MC_VERSION_H_ */
|
|
260848
260913
|
/*** End of #include "sqlite3mc_version.h" ***/
|
|
@@ -261001,9 +261066,9 @@ extern "C" {
|
|
|
261001
261066
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
261002
261067
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
261003
261068
|
*/
|
|
261004
|
-
#define SQLITE_VERSION "3.47.
|
|
261005
|
-
#define SQLITE_VERSION_NUMBER
|
|
261006
|
-
#define SQLITE_SOURCE_ID "2024-
|
|
261069
|
+
#define SQLITE_VERSION "3.47.2"
|
|
261070
|
+
#define SQLITE_VERSION_NUMBER 3047002
|
|
261071
|
+
#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
|
|
261007
261072
|
|
|
261008
261073
|
/*
|
|
261009
261074
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -261507,6 +261572,13 @@ SQLITE_API int sqlite3_exec(
|
|
|
261507
261572
|
** filesystem supports doing multiple write operations atomically when those
|
|
261508
261573
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
261509
261574
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
261575
|
+
**
|
|
261576
|
+
** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
|
|
261577
|
+
** from the database file in amounts that are not a multiple of the
|
|
261578
|
+
** page size and that do not begin at a page boundary. Without this
|
|
261579
|
+
** property, SQLite is careful to only do full-page reads and write
|
|
261580
|
+
** on aligned pages, with the one exception that it will do a sub-page
|
|
261581
|
+
** read of the first page to access the database header.
|
|
261510
261582
|
*/
|
|
261511
261583
|
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
261512
261584
|
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
@@ -261523,6 +261595,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
261523
261595
|
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
261524
261596
|
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
261525
261597
|
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
261598
|
+
#define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
|
|
261526
261599
|
|
|
261527
261600
|
/*
|
|
261528
261601
|
** CAPI3REF: File Locking Levels
|
|
@@ -261669,6 +261742,7 @@ struct sqlite3_file {
|
|
|
261669
261742
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
|
|
261670
261743
|
** <li> [SQLITE_IOCAP_IMMUTABLE]
|
|
261671
261744
|
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
|
|
261745
|
+
** <li> [SQLITE_IOCAP_SUBPAGE_READ]
|
|
261672
261746
|
** </ul>
|
|
261673
261747
|
**
|
|
261674
261748
|
** The SQLITE_IOCAP_ATOMIC property means that all writes of
|
|
@@ -278420,6 +278494,37 @@ toUint32FromLE(const void* buffer)
|
|
|
278420
278494
|
#if HAS_AES_HARDWARE == AES_HARDWARE_NI
|
|
278421
278495
|
/* --- Implementation for AES-NI --- */
|
|
278422
278496
|
|
|
278497
|
+
/* Define SQLITE3MC_COMPILER_HAS_ATTRIBUTE */
|
|
278498
|
+
#if defined(__has_attribute)
|
|
278499
|
+
#define SQLITE3MC_COMPILER_HAS_ATTRIBUTE(x) __has_attribute(x)
|
|
278500
|
+
#define SQLITE3MC_COMPILER_ATTRIBUTE(x) __attribute__((x))
|
|
278501
|
+
#else
|
|
278502
|
+
#define SQLITE3MC_COMPILER_HAS_ATTRIBUTE(x) 0
|
|
278503
|
+
#define SQLITE3MC_COMPILER_ATTRIBUTE(x) /**/
|
|
278504
|
+
#endif
|
|
278505
|
+
|
|
278506
|
+
/* Define SQLITE3MC_FORCE_INLINE */
|
|
278507
|
+
#if !defined(SQLITE3MC_FORCE_INLINE)
|
|
278508
|
+
#if SQLITE3MC_COMPILER_HAS_ATTRIBUTE(always_inline)
|
|
278509
|
+
#define SQLITE3MC_FORCE_INLINE inline SQLITE3MC_COMPILER_ATTRIBUTE(always_inline)
|
|
278510
|
+
#elif defined(_MSC_VER)
|
|
278511
|
+
#define SQLITE3MC_FORCE_INLINE __forceinline
|
|
278512
|
+
#else
|
|
278513
|
+
#define SQLITE3MC_FORCE_INLINE inline
|
|
278514
|
+
#endif
|
|
278515
|
+
#endif
|
|
278516
|
+
|
|
278517
|
+
/* Define SQLITE3MC_FUNC_ISA */
|
|
278518
|
+
#if SQLITE3MC_COMPILER_HAS_ATTRIBUTE(target)
|
|
278519
|
+
#define SQLITE3MC_FUNC_ISA(isa) SQLITE3MC_COMPILER_ATTRIBUTE(target(isa))
|
|
278520
|
+
#else
|
|
278521
|
+
#define SQLITE3MC_FUNC_ISA(isa)
|
|
278522
|
+
#endif
|
|
278523
|
+
|
|
278524
|
+
/* Define SQLITE3MC_FUNC_ISA_INLINE */
|
|
278525
|
+
#define SQLITE3MC_FUNC_ISA_INLINE(isa) SQLITE3MC_FUNC_ISA(isa) SQLITE3MC_FORCE_INLINE
|
|
278526
|
+
|
|
278527
|
+
|
|
278423
278528
|
/*
|
|
278424
278529
|
** Define function for detecting hardware AES support at runtime
|
|
278425
278530
|
*/
|
|
@@ -278456,6 +278561,7 @@ aesHardwareCheck()
|
|
|
278456
278561
|
#include <wmmintrin.h>
|
|
278457
278562
|
#include <smmintrin.h>
|
|
278458
278563
|
|
|
278564
|
+
SQLITE3MC_FUNC_ISA("sse4.2,aes")
|
|
278459
278565
|
static int
|
|
278460
278566
|
aesGenKeyEncryptInternal(const unsigned char* userKey, const int bits, __m128i* keyData)
|
|
278461
278567
|
{
|
|
@@ -278509,6 +278615,7 @@ aesGenKeyEncryptInternal(const unsigned char* userKey, const int bits, __m128i*
|
|
|
278509
278615
|
return rc;
|
|
278510
278616
|
}
|
|
278511
278617
|
|
|
278618
|
+
SQLITE3MC_FUNC_ISA("sse4.2,aes")
|
|
278512
278619
|
static int
|
|
278513
278620
|
aesGenKeyEncrypt(const unsigned char* userKey, const int bits, unsigned char* keyData)
|
|
278514
278621
|
{
|
|
@@ -278531,6 +278638,7 @@ aesGenKeyEncrypt(const unsigned char* userKey, const int bits, unsigned char* ke
|
|
|
278531
278638
|
return rc;
|
|
278532
278639
|
}
|
|
278533
278640
|
|
|
278641
|
+
SQLITE3MC_FUNC_ISA("sse4.2,aes")
|
|
278534
278642
|
static int
|
|
278535
278643
|
aesGenKeyDecrypt(const unsigned char* userKey, const int bits, unsigned char* keyData)
|
|
278536
278644
|
{
|
|
@@ -278565,6 +278673,7 @@ aesGenKeyDecrypt(const unsigned char* userKey, const int bits, unsigned char* ke
|
|
|
278565
278673
|
** AES CBC CTS Encryption
|
|
278566
278674
|
*/
|
|
278567
278675
|
|
|
278676
|
+
SQLITE3MC_FUNC_ISA("sse4.2,aes")
|
|
278568
278677
|
static void
|
|
278569
278678
|
aesEncryptCBC(const unsigned char* in,
|
|
278570
278679
|
unsigned char* out,
|
|
@@ -278632,6 +278741,7 @@ aesEncryptCBC(const unsigned char* in,
|
|
|
278632
278741
|
/*
|
|
278633
278742
|
** AES CBC CTS decryption
|
|
278634
278743
|
*/
|
|
278744
|
+
SQLITE3MC_FUNC_ISA("sse4.2,aes")
|
|
278635
278745
|
static void
|
|
278636
278746
|
aesDecryptCBC(const unsigned char* in,
|
|
278637
278747
|
unsigned char* out,
|
|
@@ -286537,7 +286647,7 @@ sqlite3mcBtreeSetPageSize(Btree* p, int pageSize, int nReserve, int iFix)
|
|
|
286537
286647
|
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
|
|
286538
286648
|
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
|
|
286539
286649
|
**
|
|
286540
|
-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.47.
|
|
286650
|
+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.47.2 amalgamation.
|
|
286541
286651
|
*/
|
|
286542
286652
|
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
|
|
286543
286653
|
char **pzErrMsg, /* Write error message here */
|
|
@@ -296965,7 +297075,7 @@ static int seriesBestIndex(
|
|
|
296965
297075
|
continue;
|
|
296966
297076
|
}
|
|
296967
297077
|
if( pConstraint->iColumn<SERIES_COLUMN_START ){
|
|
296968
|
-
if( pConstraint->iColumn==SERIES_COLUMN_VALUE ){
|
|
297078
|
+
if( pConstraint->iColumn==SERIES_COLUMN_VALUE && pConstraint->usable ){
|
|
296969
297079
|
switch( op ){
|
|
296970
297080
|
case SQLITE_INDEX_CONSTRAINT_EQ:
|
|
296971
297081
|
case SQLITE_INDEX_CONSTRAINT_IS: {
|
|
@@ -296973,7 +297083,9 @@ static int seriesBestIndex(
|
|
|
296973
297083
|
idxNum &= ~0x3300;
|
|
296974
297084
|
aIdx[5] = i;
|
|
296975
297085
|
aIdx[6] = -1;
|
|
297086
|
+
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
|
|
296976
297087
|
bStartSeen = 1;
|
|
297088
|
+
#endif
|
|
296977
297089
|
break;
|
|
296978
297090
|
}
|
|
296979
297091
|
case SQLITE_INDEX_CONSTRAINT_GE: {
|
|
@@ -296981,7 +297093,9 @@ static int seriesBestIndex(
|
|
|
296981
297093
|
idxNum |= 0x0100;
|
|
296982
297094
|
idxNum &= ~0x0200;
|
|
296983
297095
|
aIdx[5] = i;
|
|
297096
|
+
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
|
|
296984
297097
|
bStartSeen = 1;
|
|
297098
|
+
#endif
|
|
296985
297099
|
break;
|
|
296986
297100
|
}
|
|
296987
297101
|
case SQLITE_INDEX_CONSTRAINT_GT: {
|
|
@@ -296989,7 +297103,9 @@ static int seriesBestIndex(
|
|
|
296989
297103
|
idxNum |= 0x0200;
|
|
296990
297104
|
idxNum &= ~0x0100;
|
|
296991
297105
|
aIdx[5] = i;
|
|
297106
|
+
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
|
|
296992
297107
|
bStartSeen = 1;
|
|
297108
|
+
#endif
|
|
296993
297109
|
break;
|
|
296994
297110
|
}
|
|
296995
297111
|
case SQLITE_INDEX_CONSTRAINT_LE: {
|
|
@@ -315974,12 +316090,15 @@ static const char *tclsh_main_loop(void){
|
|
|
315974
316090
|
#ifdef WIN32
|
|
315975
316091
|
"set new [list]\n"
|
|
315976
316092
|
"foreach arg $argv {\n"
|
|
315977
|
-
"if {[file exists $arg]} {\n"
|
|
316093
|
+
"if {[string match -* $arg] || [file exists $arg]} {\n"
|
|
315978
316094
|
"lappend new $arg\n"
|
|
315979
316095
|
"} else {\n"
|
|
316096
|
+
"set once 0\n"
|
|
315980
316097
|
"foreach match [lsort [glob -nocomplain $arg]] {\n"
|
|
315981
316098
|
"lappend new $match\n"
|
|
316099
|
+
"set once 1\n"
|
|
315982
316100
|
"}\n"
|
|
316101
|
+
"if {!$once} {lappend new $arg}\n"
|
|
315983
316102
|
"}\n"
|
|
315984
316103
|
"}\n"
|
|
315985
316104
|
"set argv $new\n"
|
package/deps/sqlite3/sqlite3.h
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
33
33
|
#define SQLITE3MC_VERSION_MINOR 9
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.9.
|
|
36
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.9.2"
|
|
37
37
|
|
|
38
38
|
#endif /* SQLITE3MC_VERSION_H_ */
|
|
39
39
|
/*** End of #include "sqlite3mc_version.h" ***/
|
|
@@ -192,9 +192,9 @@ extern "C" {
|
|
|
192
192
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
193
193
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
194
194
|
*/
|
|
195
|
-
#define SQLITE_VERSION "3.47.
|
|
196
|
-
#define SQLITE_VERSION_NUMBER
|
|
197
|
-
#define SQLITE_SOURCE_ID "2024-
|
|
195
|
+
#define SQLITE_VERSION "3.47.2"
|
|
196
|
+
#define SQLITE_VERSION_NUMBER 3047002
|
|
197
|
+
#define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -698,6 +698,13 @@ SQLITE_API int sqlite3_exec(
|
|
|
698
698
|
** filesystem supports doing multiple write operations atomically when those
|
|
699
699
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
700
700
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
701
|
+
**
|
|
702
|
+
** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
|
|
703
|
+
** from the database file in amounts that are not a multiple of the
|
|
704
|
+
** page size and that do not begin at a page boundary. Without this
|
|
705
|
+
** property, SQLite is careful to only do full-page reads and write
|
|
706
|
+
** on aligned pages, with the one exception that it will do a sub-page
|
|
707
|
+
** read of the first page to access the database header.
|
|
701
708
|
*/
|
|
702
709
|
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
703
710
|
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
@@ -714,6 +721,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
714
721
|
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
715
722
|
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
716
723
|
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
724
|
+
#define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
|
|
717
725
|
|
|
718
726
|
/*
|
|
719
727
|
** CAPI3REF: File Locking Levels
|
|
@@ -860,6 +868,7 @@ struct sqlite3_file {
|
|
|
860
868
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
|
|
861
869
|
** <li> [SQLITE_IOCAP_IMMUTABLE]
|
|
862
870
|
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
|
|
871
|
+
** <li> [SQLITE_IOCAP_SUBPAGE_READ]
|
|
863
872
|
** </ul>
|
|
864
873
|
**
|
|
865
874
|
** The SQLITE_IOCAP_ATOMIC property means that all writes of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3-multiple-ciphers",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.7.0",
|
|
4
4
|
"description": "better-sqlite3 with multiple-cipher encryption support",
|
|
5
5
|
"homepage": "https://github.com/m4heshd/better-sqlite3-multiple-ciphers",
|
|
6
6
|
"author": "Mahesh Bandara Wijerathna (m4heshd) <m4heshd@gmail.com>",
|
package/src/better_sqlite3.cpp
CHANGED
|
@@ -209,6 +209,10 @@ CS::CS (v8::Isolate * isolate)
|
|
|
209
209
|
SetCode(isolate, SQLITE_WARNING, "SQLITE_WARNING");
|
|
210
210
|
SetCode(isolate, SQLITE_ROW, "SQLITE_ROW");
|
|
211
211
|
SetCode(isolate, SQLITE_DONE, "SQLITE_DONE");
|
|
212
|
+
|
|
213
|
+
SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ");
|
|
214
|
+
SetCode(isolate, SQLITE_ERROR_RETRY, "SQLITE_ERROR_RETRY");
|
|
215
|
+
SetCode(isolate, SQLITE_ERROR_SNAPSHOT, "SQLITE_ERROR_SNAPSHOT");
|
|
212
216
|
SetCode(isolate, SQLITE_IOERR_READ, "SQLITE_IOERR_READ");
|
|
213
217
|
SetCode(isolate, SQLITE_IOERR_SHORT_READ, "SQLITE_IOERR_SHORT_READ");
|
|
214
218
|
SetCode(isolate, SQLITE_IOERR_WRITE, "SQLITE_IOERR_WRITE");
|
|
@@ -237,18 +241,31 @@ CS::CS (v8::Isolate * isolate)
|
|
|
237
241
|
SetCode(isolate, SQLITE_IOERR_CONVPATH, "SQLITE_IOERR_CONVPATH");
|
|
238
242
|
SetCode(isolate, SQLITE_IOERR_VNODE, "SQLITE_IOERR_VNODE");
|
|
239
243
|
SetCode(isolate, SQLITE_IOERR_AUTH, "SQLITE_IOERR_AUTH");
|
|
244
|
+
SetCode(isolate, SQLITE_IOERR_BEGIN_ATOMIC, "SQLITE_IOERR_BEGIN_ATOMIC");
|
|
245
|
+
SetCode(isolate, SQLITE_IOERR_COMMIT_ATOMIC, "SQLITE_IOERR_COMMIT_ATOMIC");
|
|
246
|
+
SetCode(isolate, SQLITE_IOERR_ROLLBACK_ATOMIC, "SQLITE_IOERR_ROLLBACK_ATOMIC");
|
|
247
|
+
SetCode(isolate, SQLITE_IOERR_DATA, "SQLITE_IOERR_DATA");
|
|
248
|
+
SetCode(isolate, SQLITE_IOERR_CORRUPTFS, "SQLITE_IOERR_CORRUPTFS");
|
|
249
|
+
SetCode(isolate, SQLITE_IOERR_IN_PAGE, "SQLITE_IOERR_IN_PAGE");
|
|
240
250
|
SetCode(isolate, SQLITE_LOCKED_SHAREDCACHE, "SQLITE_LOCKED_SHAREDCACHE");
|
|
251
|
+
SetCode(isolate, SQLITE_LOCKED_VTAB, "SQLITE_LOCKED_VTAB");
|
|
241
252
|
SetCode(isolate, SQLITE_BUSY_RECOVERY, "SQLITE_BUSY_RECOVERY");
|
|
242
253
|
SetCode(isolate, SQLITE_BUSY_SNAPSHOT, "SQLITE_BUSY_SNAPSHOT");
|
|
243
254
|
SetCode(isolate, SQLITE_CANTOPEN_NOTEMPDIR, "SQLITE_CANTOPEN_NOTEMPDIR");
|
|
244
255
|
SetCode(isolate, SQLITE_CANTOPEN_ISDIR, "SQLITE_CANTOPEN_ISDIR");
|
|
245
256
|
SetCode(isolate, SQLITE_CANTOPEN_FULLPATH, "SQLITE_CANTOPEN_FULLPATH");
|
|
246
257
|
SetCode(isolate, SQLITE_CANTOPEN_CONVPATH, "SQLITE_CANTOPEN_CONVPATH");
|
|
258
|
+
SetCode(isolate, SQLITE_CANTOPEN_DIRTYWAL, "SQLITE_CANTOPEN_DIRTYWAL");
|
|
259
|
+
SetCode(isolate, SQLITE_CANTOPEN_SYMLINK, "SQLITE_CANTOPEN_SYMLINK");
|
|
247
260
|
SetCode(isolate, SQLITE_CORRUPT_VTAB, "SQLITE_CORRUPT_VTAB");
|
|
261
|
+
SetCode(isolate, SQLITE_CORRUPT_SEQUENCE, "SQLITE_CORRUPT_SEQUENCE");
|
|
262
|
+
SetCode(isolate, SQLITE_CORRUPT_INDEX, "SQLITE_CORRUPT_INDEX");
|
|
248
263
|
SetCode(isolate, SQLITE_READONLY_RECOVERY, "SQLITE_READONLY_RECOVERY");
|
|
249
264
|
SetCode(isolate, SQLITE_READONLY_CANTLOCK, "SQLITE_READONLY_CANTLOCK");
|
|
250
265
|
SetCode(isolate, SQLITE_READONLY_ROLLBACK, "SQLITE_READONLY_ROLLBACK");
|
|
251
266
|
SetCode(isolate, SQLITE_READONLY_DBMOVED, "SQLITE_READONLY_DBMOVED");
|
|
267
|
+
SetCode(isolate, SQLITE_READONLY_CANTINIT, "SQLITE_READONLY_CANTINIT");
|
|
268
|
+
SetCode(isolate, SQLITE_READONLY_DIRECTORY, "SQLITE_READONLY_DIRECTORY");
|
|
252
269
|
SetCode(isolate, SQLITE_ABORT_ROLLBACK, "SQLITE_ABORT_ROLLBACK");
|
|
253
270
|
SetCode(isolate, SQLITE_CONSTRAINT_CHECK, "SQLITE_CONSTRAINT_CHECK");
|
|
254
271
|
SetCode(isolate, SQLITE_CONSTRAINT_COMMITHOOK, "SQLITE_CONSTRAINT_COMMITHOOK");
|
|
@@ -260,21 +277,25 @@ CS::CS (v8::Isolate * isolate)
|
|
|
260
277
|
SetCode(isolate, SQLITE_CONSTRAINT_UNIQUE, "SQLITE_CONSTRAINT_UNIQUE");
|
|
261
278
|
SetCode(isolate, SQLITE_CONSTRAINT_VTAB, "SQLITE_CONSTRAINT_VTAB");
|
|
262
279
|
SetCode(isolate, SQLITE_CONSTRAINT_ROWID, "SQLITE_CONSTRAINT_ROWID");
|
|
280
|
+
SetCode(isolate, SQLITE_CONSTRAINT_PINNED, "SQLITE_CONSTRAINT_PINNED");
|
|
281
|
+
SetCode(isolate, SQLITE_CONSTRAINT_DATATYPE, "SQLITE_CONSTRAINT_DATATYPE");
|
|
263
282
|
SetCode(isolate, SQLITE_NOTICE_RECOVER_WAL, "SQLITE_NOTICE_RECOVER_WAL");
|
|
264
283
|
SetCode(isolate, SQLITE_NOTICE_RECOVER_ROLLBACK, "SQLITE_NOTICE_RECOVER_ROLLBACK");
|
|
284
|
+
SetCode(isolate, SQLITE_NOTICE_RBU, "SQLITE_NOTICE_RBU");
|
|
265
285
|
SetCode(isolate, SQLITE_WARNING_AUTOINDEX, "SQLITE_WARNING_AUTOINDEX");
|
|
266
286
|
SetCode(isolate, SQLITE_AUTH_USER, "SQLITE_AUTH_USER");
|
|
267
287
|
SetCode(isolate, SQLITE_OK_LOAD_PERMANENTLY, "SQLITE_OK_LOAD_PERMANENTLY");
|
|
288
|
+
SetCode(isolate, SQLITE_OK_SYMLINK, "SQLITE_OK_SYMLINK");
|
|
268
289
|
}
|
|
269
|
-
#line
|
|
290
|
+
#line 161 "./src/util/constants.lzz"
|
|
270
291
|
void CS::SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str)
|
|
271
|
-
#line
|
|
292
|
+
#line 161 "./src/util/constants.lzz"
|
|
272
293
|
{
|
|
273
294
|
constant.Reset(isolate, InternalizedFromLatin1(isolate, str));
|
|
274
295
|
}
|
|
275
|
-
#line
|
|
296
|
+
#line 165 "./src/util/constants.lzz"
|
|
276
297
|
void CS::SetCode (v8::Isolate * isolate, int code, char const * str)
|
|
277
|
-
#line
|
|
298
|
+
#line 165 "./src/util/constants.lzz"
|
|
278
299
|
{
|
|
279
300
|
codes.emplace(std::piecewise_construct,
|
|
280
301
|
std::forward_as_tuple(code),
|
package/src/better_sqlite3.hpp
CHANGED
|
@@ -68,49 +68,49 @@ public:
|
|
|
68
68
|
v8::Local <v8::String> Code (v8::Isolate * isolate, int code);
|
|
69
69
|
#line 10 "./src/util/constants.lzz"
|
|
70
70
|
explicit CS (v8::Isolate * isolate);
|
|
71
|
-
#line
|
|
71
|
+
#line 140 "./src/util/constants.lzz"
|
|
72
72
|
v8::Global <v8::String> database;
|
|
73
|
-
#line
|
|
73
|
+
#line 141 "./src/util/constants.lzz"
|
|
74
74
|
v8::Global <v8::String> reader;
|
|
75
|
-
#line
|
|
75
|
+
#line 142 "./src/util/constants.lzz"
|
|
76
76
|
v8::Global <v8::String> source;
|
|
77
|
-
#line
|
|
77
|
+
#line 143 "./src/util/constants.lzz"
|
|
78
78
|
v8::Global <v8::String> memory;
|
|
79
|
-
#line
|
|
79
|
+
#line 144 "./src/util/constants.lzz"
|
|
80
80
|
v8::Global <v8::String> readonly;
|
|
81
|
-
#line
|
|
81
|
+
#line 145 "./src/util/constants.lzz"
|
|
82
82
|
v8::Global <v8::String> name;
|
|
83
|
-
#line
|
|
83
|
+
#line 146 "./src/util/constants.lzz"
|
|
84
84
|
v8::Global <v8::String> next;
|
|
85
|
-
#line
|
|
85
|
+
#line 147 "./src/util/constants.lzz"
|
|
86
86
|
v8::Global <v8::String> length;
|
|
87
|
-
#line
|
|
87
|
+
#line 148 "./src/util/constants.lzz"
|
|
88
88
|
v8::Global <v8::String> done;
|
|
89
|
-
#line
|
|
89
|
+
#line 149 "./src/util/constants.lzz"
|
|
90
90
|
v8::Global <v8::String> value;
|
|
91
|
-
#line
|
|
91
|
+
#line 150 "./src/util/constants.lzz"
|
|
92
92
|
v8::Global <v8::String> changes;
|
|
93
|
-
#line
|
|
93
|
+
#line 151 "./src/util/constants.lzz"
|
|
94
94
|
v8::Global <v8::String> lastInsertRowid;
|
|
95
|
-
#line
|
|
95
|
+
#line 152 "./src/util/constants.lzz"
|
|
96
96
|
v8::Global <v8::String> statement;
|
|
97
|
-
#line
|
|
97
|
+
#line 153 "./src/util/constants.lzz"
|
|
98
98
|
v8::Global <v8::String> column;
|
|
99
|
-
#line
|
|
99
|
+
#line 154 "./src/util/constants.lzz"
|
|
100
100
|
v8::Global <v8::String> table;
|
|
101
|
-
#line
|
|
101
|
+
#line 155 "./src/util/constants.lzz"
|
|
102
102
|
v8::Global <v8::String> type;
|
|
103
|
-
#line
|
|
103
|
+
#line 156 "./src/util/constants.lzz"
|
|
104
104
|
v8::Global <v8::String> totalPages;
|
|
105
|
-
#line
|
|
105
|
+
#line 157 "./src/util/constants.lzz"
|
|
106
106
|
v8::Global <v8::String> remainingPages;
|
|
107
|
-
#line
|
|
107
|
+
#line 159 "./src/util/constants.lzz"
|
|
108
108
|
private:
|
|
109
|
-
#line
|
|
109
|
+
#line 161 "./src/util/constants.lzz"
|
|
110
110
|
static void SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str);
|
|
111
|
-
#line
|
|
111
|
+
#line 165 "./src/util/constants.lzz"
|
|
112
112
|
void SetCode (v8::Isolate * isolate, int code, char const * str);
|
|
113
|
-
#line
|
|
113
|
+
#line 171 "./src/util/constants.lzz"
|
|
114
114
|
std::unordered_map <int, v8::Global<v8::String> > codes;
|
|
115
115
|
};
|
|
116
116
|
#line 1 "./src/util/bind-map.lzz"
|