react-native-nitro-sqlite 8.2.1-nitro.1 → 9.0.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/RNNitroSQLite.podspec +22 -5
- package/android/CMakeLists.txt +43 -5
- package/android/build.gradle +94 -14
- package/android/{src/main/cpp/cpp-adapter.cpp → cpp-adapter.cpp} +1 -1
- package/android/gradle.properties +5 -0
- package/android/src/main/java/com/margelo/rnnitrosqlite/DocPathSetter.kt +13 -0
- package/android/src/main/java/com/margelo/rnnitrosqlite/RNNitroSQLitePackage.kt +40 -0
- package/android/src/newarch/com/margelo/rnnitrosqlite/RNNitroSQLiteOnLoadModule.kt +41 -0
- package/android/src/oldarch/com/margelo/rnnitrosqlite/RNNitroSQLiteOnLoadModule.kt +43 -0
- package/cpp/operations.cpp +0 -3
- package/cpp/sqlite/sqlite3.c +41 -41
- package/cpp/sqliteExecuteBatch.cpp +0 -1
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nitro.js.map +1 -1
- package/lib/commonjs/operations/execute.js +1 -1
- package/lib/commonjs/operations/execute.js.map +1 -1
- package/lib/commonjs/operations/session.js +3 -3
- package/lib/commonjs/operations/session.js.map +1 -1
- package/lib/commonjs/operations/transaction.js +4 -7
- package/lib/commonjs/operations/transaction.js.map +1 -1
- package/lib/commonjs/specs/NativeNitroSQLiteOnLoad.ios.js.map +1 -1
- package/lib/commonjs/specs/NativeNitroSQLiteOnLoad.js.map +1 -1
- package/lib/commonjs/specs/NativeQueryResult.nitro.js.map +1 -1
- package/lib/commonjs/specs/NitroSQLite.nitro.js.map +1 -1
- package/lib/commonjs/typeORM.js +1 -1
- package/lib/commonjs/typeORM.js.map +1 -1
- package/lib/commonjs/types.js +0 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/index.js +9 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/nitro.js +2 -0
- package/lib/module/nitro.js.map +1 -1
- package/lib/module/operations/execute.js +3 -1
- package/lib/module/operations/execute.js.map +1 -1
- package/lib/module/operations/session.js +5 -3
- package/lib/module/operations/session.js.map +1 -1
- package/lib/module/operations/transaction.js +6 -7
- package/lib/module/operations/transaction.js.map +1 -1
- package/lib/module/specs/NativeNitroSQLiteOnLoad.ios.js +2 -0
- package/lib/module/specs/NativeNitroSQLiteOnLoad.ios.js.map +1 -1
- package/lib/module/specs/NativeNitroSQLiteOnLoad.js +2 -0
- package/lib/module/specs/NativeNitroSQLiteOnLoad.js.map +1 -1
- package/lib/module/specs/NativeQueryResult.nitro.js +2 -0
- package/lib/module/specs/NativeQueryResult.nitro.js.map +1 -1
- package/lib/module/specs/NitroSQLite.nitro.js +2 -0
- package/lib/module/specs/NitroSQLite.nitro.js.map +1 -1
- package/lib/module/typeORM.js +3 -1
- package/lib/module/typeORM.js.map +1 -1
- package/lib/module/types.js +2 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/{index.d.ts → commonjs/index.d.ts} +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/{nitro.d.ts → commonjs/nitro.d.ts} +1 -0
- package/lib/typescript/commonjs/nitro.d.ts.map +1 -0
- package/lib/typescript/{operations → commonjs/operations}/execute.d.ts +1 -0
- package/lib/typescript/commonjs/operations/execute.d.ts.map +1 -0
- package/lib/typescript/{operations → commonjs/operations}/session.d.ts +1 -0
- package/lib/typescript/commonjs/operations/session.d.ts.map +1 -0
- package/lib/typescript/{operations → commonjs/operations}/transaction.d.ts +1 -0
- package/lib/typescript/commonjs/operations/transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/{specs → commonjs/specs}/NativeNitroSQLiteOnLoad.d.ts +1 -0
- package/lib/typescript/commonjs/specs/NativeNitroSQLiteOnLoad.d.ts.map +1 -0
- package/lib/typescript/{specs → commonjs/specs}/NativeNitroSQLiteOnLoad.ios.d.ts +1 -0
- package/lib/typescript/commonjs/specs/NativeNitroSQLiteOnLoad.ios.d.ts.map +1 -0
- package/lib/typescript/{specs → commonjs/specs}/NativeQueryResult.nitro.d.ts +1 -0
- package/lib/typescript/commonjs/specs/NativeQueryResult.nitro.d.ts.map +1 -0
- package/lib/typescript/{specs → commonjs/specs}/NitroSQLite.nitro.d.ts +1 -0
- package/lib/typescript/commonjs/specs/NitroSQLite.nitro.d.ts.map +1 -0
- package/lib/typescript/{typeORM.d.ts → commonjs/typeORM.d.ts} +1 -0
- package/lib/typescript/commonjs/typeORM.d.ts.map +1 -0
- package/lib/typescript/{types.d.ts → commonjs/types.d.ts} +1 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +31 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/nitro.d.ts +8 -0
- package/lib/typescript/module/nitro.d.ts.map +1 -0
- package/lib/typescript/module/operations/execute.d.ts +4 -0
- package/lib/typescript/module/operations/execute.d.ts.map +1 -0
- package/lib/typescript/module/operations/session.d.ts +5 -0
- package/lib/typescript/module/operations/session.d.ts.map +1 -0
- package/lib/typescript/module/operations/transaction.d.ts +6 -0
- package/lib/typescript/module/operations/transaction.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/specs/NativeNitroSQLiteOnLoad.d.ts +7 -0
- package/lib/typescript/module/specs/NativeNitroSQLiteOnLoad.d.ts.map +1 -0
- package/lib/typescript/module/specs/NativeNitroSQLiteOnLoad.ios.d.ts +4 -0
- package/lib/typescript/module/specs/NativeNitroSQLiteOnLoad.ios.d.ts.map +1 -0
- package/lib/typescript/module/specs/NativeQueryResult.nitro.d.ts +38 -0
- package/lib/typescript/module/specs/NativeQueryResult.nitro.d.ts.map +1 -0
- package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts +20 -0
- package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts.map +1 -0
- package/lib/typescript/module/typeORM.d.ts +20 -0
- package/lib/typescript/module/typeORM.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +80 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/nitrogen/generated/android/RNNitroSQLite+autolinking.cmake +13 -1
- package/nitrogen/generated/android/RNNitroSQLite+autolinking.gradle +2 -0
- package/nitrogen/generated/ios/RNNitroSQLite+autolinking.rb +6 -4
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Bridge.cpp +9 -0
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Bridge.hpp +5 -281
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Umbrella.hpp +3 -35
- package/nitrogen/generated/ios/RNNitroSQLiteAutolinking.swift +2 -0
- package/package.json +86 -44
- package/src/operations/transaction.ts +2 -3
- package/src/types.ts +0 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/margelo/rnnitrosqlite/RNNitroSQLiteOnLoadModule.java +0 -57
- package/android/src/main/java/com/margelo/rnnitrosqlite/RNNitroSQLitePackage.java +0 -48
- package/lib/tsconfig.tsbuildinfo +0 -1
package/cpp/sqlite/sqlite3.c
CHANGED
|
@@ -13384,7 +13384,7 @@ extern unsigned int sqlite3CoverageCounter;
|
|
|
13384
13384
|
/*
|
|
13385
13385
|
** Some conditionals are optimizations only. In other words, if the
|
|
13386
13386
|
** conditionals are replaced with a constant 1 (true) or 0 (false) then
|
|
13387
|
-
** the correct answer is still obtained, though perhaps not as
|
|
13387
|
+
** the correct answer is still obtained, though perhaps not as quickly.
|
|
13388
13388
|
**
|
|
13389
13389
|
** The following macros mark these optimizations conditionals.
|
|
13390
13390
|
*/
|
|
@@ -21251,8 +21251,8 @@ static const char* const sqlite3azCompileOpt[] = {
|
|
|
21251
21251
|
#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
|
|
21252
21252
|
"OMIT_PROGRESS_CALLBACK",
|
|
21253
21253
|
#endif
|
|
21254
|
-
#ifdef
|
|
21255
|
-
"
|
|
21254
|
+
#ifdef SQLITE_OMIT_QUICKBALANCE
|
|
21255
|
+
"OMIT_QUICKBALANCE",
|
|
21256
21256
|
#endif
|
|
21257
21257
|
#ifdef SQLITE_OMIT_REINDEX
|
|
21258
21258
|
"OMIT_REINDEX",
|
|
@@ -38734,7 +38734,7 @@ SQLITE_API int sqlite3_fullsync_count = 0;
|
|
|
38734
38734
|
** it work better.
|
|
38735
38735
|
**
|
|
38736
38736
|
** The SQLITE_NO_SYNC macro disables all fsync()s. This is useful
|
|
38737
|
-
** for testing when we want to run through the test suite
|
|
38737
|
+
** for testing when we want to run through the test suite quickly.
|
|
38738
38738
|
** You are strongly advised *not* to deploy with SQLITE_NO_SYNC
|
|
38739
38739
|
** enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash
|
|
38740
38740
|
** or power failure will likely corrupt the database file.
|
|
@@ -60920,7 +60920,7 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager* pPager) {
|
|
|
60920
60920
|
** as big endian, the wal-index can store multi-byte values in the native
|
|
60921
60921
|
** byte order of the host computer.
|
|
60922
60922
|
**
|
|
60923
|
-
** The purpose of the wal-index is to answer this question
|
|
60923
|
+
** The purpose of the wal-index is to answer this question quickly: Given
|
|
60924
60924
|
** a page number P and a maximum frame index M, return the index of the
|
|
60925
60925
|
** last frame in the wal before frame M for page P in the WAL, or return
|
|
60926
60926
|
** NULL if there are no frames for page P in the WAL prior to M.
|
|
@@ -65537,7 +65537,7 @@ struct BtCursor {
|
|
|
65537
65537
|
** The purpose of the pointer map is to facility moving pages from one
|
|
65538
65538
|
** position in the file to another as part of autovacuum. When a page
|
|
65539
65539
|
** is moved, the pointer in its parent must be updated to point to the
|
|
65540
|
-
** new location. The pointer map is used to locate the parent page
|
|
65540
|
+
** new location. The pointer map is used to locate the parent page quickly.
|
|
65541
65541
|
**
|
|
65542
65542
|
** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not
|
|
65543
65543
|
** used in this case.
|
|
@@ -71138,7 +71138,7 @@ static const void* fetchPayload(BtCursor* pCur, /* Cursor pointing to entry to r
|
|
|
71138
71138
|
** Hence, a mutex on the BtShared should be held prior to calling
|
|
71139
71139
|
** this routine.
|
|
71140
71140
|
**
|
|
71141
|
-
** These routines is used to get
|
|
71141
|
+
** These routines is used to get quick access to key and data
|
|
71142
71142
|
** in the common case where no overflow pages are used.
|
|
71143
71143
|
*/
|
|
71144
71144
|
SQLITE_PRIVATE const void* sqlite3BtreePayloadFetch(BtCursor* pCur, u32* pAmt) {
|
|
@@ -73496,7 +73496,7 @@ editpage_fail:
|
|
|
73496
73496
|
return rebuildPage(pCArray, iNew, nNew, pPg);
|
|
73497
73497
|
}
|
|
73498
73498
|
|
|
73499
|
-
#ifndef
|
|
73499
|
+
#ifndef SQLITE_OMIT_QUICKBALANCE
|
|
73500
73500
|
/*
|
|
73501
73501
|
** This version of balance() handles the common special case where
|
|
73502
73502
|
** a new entry is being inserted on the extreme right-end of the
|
|
@@ -73507,7 +73507,7 @@ editpage_fail:
|
|
|
73507
73507
|
** a new page to the right-hand side and put the one new entry in
|
|
73508
73508
|
** that page. This leaves the right side of the tree somewhat
|
|
73509
73509
|
** unbalanced. But odds are that we will be inserting new entries
|
|
73510
|
-
** at the end soon afterwards so the nearly empty page will
|
|
73510
|
+
** at the end soon afterwards so the nearly empty page will quickly
|
|
73511
73511
|
** fill up. On average.
|
|
73512
73512
|
**
|
|
73513
73513
|
** pPage is the leaf page which is the right-most page in the tree.
|
|
@@ -73520,7 +73520,7 @@ editpage_fail:
|
|
|
73520
73520
|
** words, at most 13 bytes. Hence the pSpace buffer must be at
|
|
73521
73521
|
** least 13 bytes in size.
|
|
73522
73522
|
*/
|
|
73523
|
-
static int
|
|
73523
|
+
static int balance_quick(MemPage* pParent, MemPage* pPage, u8* pSpace) {
|
|
73524
73524
|
BtShared* const pBt = pPage->pBt; /* B-Tree Database */
|
|
73525
73525
|
MemPage* pNew; /* Newly allocated page */
|
|
73526
73526
|
int rc; /* Return Code */
|
|
@@ -73616,7 +73616,7 @@ static int balance_Nitro(MemPage* pParent, MemPage* pPage, u8* pSpace) {
|
|
|
73616
73616
|
|
|
73617
73617
|
return rc;
|
|
73618
73618
|
}
|
|
73619
|
-
#endif /*
|
|
73619
|
+
#endif /* SQLITE_OMIT_QUICKBALANCE */
|
|
73620
73620
|
|
|
73621
73621
|
#if 0
|
|
73622
73622
|
/*
|
|
@@ -74615,16 +74615,16 @@ static int anotherValidCursor(BtCursor* pCur) {
|
|
|
74615
74615
|
** tree needs to be balanced, and if so calls the appropriate balancing
|
|
74616
74616
|
** routine. Balancing routines are:
|
|
74617
74617
|
**
|
|
74618
|
-
**
|
|
74618
|
+
** balance_quick()
|
|
74619
74619
|
** balance_deeper()
|
|
74620
74620
|
** balance_nonroot()
|
|
74621
74621
|
*/
|
|
74622
74622
|
static int balance(BtCursor* pCur) {
|
|
74623
74623
|
int rc = SQLITE_OK;
|
|
74624
|
-
u8
|
|
74624
|
+
u8 aBalanceQuickSpace[13];
|
|
74625
74625
|
u8* pFree = 0;
|
|
74626
74626
|
|
|
74627
|
-
VVA_ONLY(int
|
|
74627
|
+
VVA_ONLY(int balance_quick_called = 0);
|
|
74628
74628
|
VVA_ONLY(int balance_deeper_called = 0);
|
|
74629
74629
|
|
|
74630
74630
|
do {
|
|
@@ -74669,25 +74669,25 @@ static int balance(BtCursor* pCur) {
|
|
|
74669
74669
|
rc = btreeComputeFreeSpace(pParent);
|
|
74670
74670
|
}
|
|
74671
74671
|
if (rc == SQLITE_OK) {
|
|
74672
|
-
#ifndef
|
|
74672
|
+
#ifndef SQLITE_OMIT_QUICKBALANCE
|
|
74673
74673
|
if (pPage->intKeyLeaf && pPage->nOverflow == 1 && pPage->aiOvfl[0] == pPage->nCell && pParent->pgno != 1 &&
|
|
74674
74674
|
pParent->nCell == iIdx) {
|
|
74675
|
-
/* Call
|
|
74676
|
-
** to store the overflow cell.
|
|
74675
|
+
/* Call balance_quick() to create a new sibling of pPage on which
|
|
74676
|
+
** to store the overflow cell. balance_quick() inserts a new cell
|
|
74677
74677
|
** into pParent, which may cause pParent overflow. If this
|
|
74678
74678
|
** happens, the next iteration of the do-loop will balance pParent
|
|
74679
74679
|
** use either balance_nonroot() or balance_deeper(). Until this
|
|
74680
|
-
** happens, the overflow cell is stored in the
|
|
74680
|
+
** happens, the overflow cell is stored in the aBalanceQuickSpace[]
|
|
74681
74681
|
** buffer.
|
|
74682
74682
|
**
|
|
74683
74683
|
** The purpose of the following assert() is to check that only a
|
|
74684
|
-
** single call to
|
|
74684
|
+
** single call to balance_quick() is made for each call to this
|
|
74685
74685
|
** function. If this were not verified, a subtle bug involving reuse
|
|
74686
|
-
** of the
|
|
74686
|
+
** of the aBalanceQuickSpace[] might sneak in.
|
|
74687
74687
|
*/
|
|
74688
|
-
assert(
|
|
74689
|
-
VVA_ONLY(
|
|
74690
|
-
rc =
|
|
74688
|
+
assert(balance_quick_called == 0);
|
|
74689
|
+
VVA_ONLY(balance_quick_called++);
|
|
74690
|
+
rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
|
|
74691
74691
|
} else
|
|
74692
74692
|
#endif
|
|
74693
74693
|
{
|
|
@@ -78755,7 +78755,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe* pVdbe, Mem* pMem) {
|
|
|
78755
78755
|
assert((mFlags & (MEM_Int | MEM_IntReal)) == 0 || pMem->u.i == pX->u.i);
|
|
78756
78756
|
|
|
78757
78757
|
/* pMem is the register that is changing. But also mark pX as
|
|
78758
|
-
** undefined so that we can
|
|
78758
|
+
** undefined so that we can quickly detect the shallow-copy error */
|
|
78759
78759
|
pX->flags = MEM_Undefined;
|
|
78760
78760
|
pX->pScopyFrom = 0;
|
|
78761
78761
|
}
|
|
@@ -109374,12 +109374,12 @@ SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse* pParse, Token* pColDef) {
|
|
|
109374
109374
|
/* Verify that constraints are still satisfied */
|
|
109375
109375
|
if (pNew->pCheck != 0 || (pCol->notNull && (pCol->colFlags & COLFLAG_GENERATED) != 0)) {
|
|
109376
109376
|
sqlite3NestedParse(pParse,
|
|
109377
|
-
"SELECT CASE WHEN
|
|
109377
|
+
"SELECT CASE WHEN quick_check GLOB 'CHECK*'"
|
|
109378
109378
|
" THEN raise(ABORT,'CHECK constraint failed')"
|
|
109379
109379
|
" ELSE raise(ABORT,'NOT NULL constraint failed')"
|
|
109380
109380
|
" END"
|
|
109381
|
-
" FROM
|
|
109382
|
-
" WHERE
|
|
109381
|
+
" FROM pragma_quick_check(%Q,%Q)"
|
|
109382
|
+
" WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'",
|
|
109383
109383
|
zTab, zDb);
|
|
109384
109384
|
}
|
|
109385
109385
|
}
|
|
@@ -121707,7 +121707,7 @@ static const struct compareInfo likeInfoAlt = {'%', '_', 0, 0};
|
|
|
121707
121707
|
**
|
|
121708
121708
|
** The comments within this routine usually assume glob matching.
|
|
121709
121709
|
**
|
|
121710
|
-
** This routine is usually
|
|
121710
|
+
** This routine is usually quick, but can be N**2 in the worst case.
|
|
121711
121711
|
*/
|
|
121712
121712
|
static int patternCompare(const u8* zPattern, /* The glob pattern */
|
|
121713
121713
|
const u8* zString, /* The string to compare against the glob */
|
|
@@ -129896,7 +129896,7 @@ static const PragmaName aPragmaName[] = {
|
|
|
129896
129896
|
/* iArg: */ SQLITE_QueryOnly},
|
|
129897
129897
|
#endif
|
|
129898
129898
|
#if !defined(SQLITE_OMIT_INTEGRITY_CHECK)
|
|
129899
|
-
{/* zName: */ "
|
|
129899
|
+
{/* zName: */ "quick_check",
|
|
129900
129900
|
/* ePragTyp: */ PragTyp_INTEGRITY_CHECK,
|
|
129901
129901
|
/* ePragFlg: */ PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt,
|
|
129902
129902
|
/* ColNames: */ 0, 0,
|
|
@@ -131641,14 +131641,14 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131641
131641
|
#ifndef SQLITE_OMIT_INTEGRITY_CHECK
|
|
131642
131642
|
/* PRAGMA integrity_check
|
|
131643
131643
|
** PRAGMA integrity_check(N)
|
|
131644
|
-
** PRAGMA
|
|
131645
|
-
** PRAGMA
|
|
131644
|
+
** PRAGMA quick_check
|
|
131645
|
+
** PRAGMA quick_check(N)
|
|
131646
131646
|
**
|
|
131647
131647
|
** Verify the integrity of the database.
|
|
131648
131648
|
**
|
|
131649
|
-
** The "
|
|
131649
|
+
** The "quick_check" is reduced version of
|
|
131650
131650
|
** integrity_check designed to detect most database corruption
|
|
131651
|
-
** without the overhead of cross-checking indexes.
|
|
131651
|
+
** without the overhead of cross-checking indexes. Quick_check
|
|
131652
131652
|
** is linear time wherease integrity_check is O(NlogN).
|
|
131653
131653
|
**
|
|
131654
131654
|
** The maximum nubmer of errors is 100 by default. A different default
|
|
@@ -131667,7 +131667,7 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131667
131667
|
int i, j, addr, mxErr;
|
|
131668
131668
|
Table* pObjTab = 0; /* Check only this one table, if not NULL */
|
|
131669
131669
|
|
|
131670
|
-
int
|
|
131670
|
+
int isQuick = (sqlite3Tolower(zLeft[0]) == 'q');
|
|
131671
131671
|
|
|
131672
131672
|
/* If the PRAGMA command was of the form "PRAGMA <db>.integrity_check",
|
|
131673
131673
|
** then iDb is set to the index of the database identified by <db>.
|
|
@@ -131675,7 +131675,7 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131675
131675
|
** the VDBE created below.
|
|
131676
131676
|
**
|
|
131677
131677
|
** Otherwise, if the command was simply "PRAGMA integrity_check" (or
|
|
131678
|
-
** "PRAGMA
|
|
131678
|
+
** "PRAGMA quick_check"), then iDb is set to 0. In this case, set iDb
|
|
131679
131679
|
** to -1 here, to indicate that the VDBE should verify the integrity
|
|
131680
131680
|
** of all attached databases. */
|
|
131681
131681
|
assert(iDb >= 0);
|
|
@@ -131801,7 +131801,7 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131801
131801
|
sqlite3VdbeAddOp2(v, OP_Rewind, iDataCur, 0);
|
|
131802
131802
|
VdbeCoverage(v);
|
|
131803
131803
|
loopTop = sqlite3VdbeAddOp2(v, OP_AddImm, 7, 1);
|
|
131804
|
-
if (!
|
|
131804
|
+
if (!isQuick) {
|
|
131805
131805
|
/* Sanity check on record header decoding */
|
|
131806
131806
|
sqlite3VdbeAddOp3(v, OP_Column, iDataCur, pTab->nNVCol - 1, 3);
|
|
131807
131807
|
sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
|
@@ -131867,7 +131867,7 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131867
131867
|
}
|
|
131868
131868
|
sqlite3ExprListDelete(db, pCheck);
|
|
131869
131869
|
}
|
|
131870
|
-
if (!
|
|
131870
|
+
if (!isQuick) { /* Omit the remaining tests for quick_check */
|
|
131871
131871
|
/* Validate index entries for the current row */
|
|
131872
131872
|
for (j = 0, pIdx = pTab->pIndex; pIdx; pIdx = pIdx->pNext, j++) {
|
|
131873
131873
|
int jmp2, jmp3, jmp4, jmp5;
|
|
@@ -131920,7 +131920,7 @@ SQLITE_PRIVATE void sqlite3Pragma(Parse* pParse, Token* pId1, /* First part of [
|
|
|
131920
131920
|
sqlite3VdbeAddOp2(v, OP_Next, iDataCur, loopTop);
|
|
131921
131921
|
VdbeCoverage(v);
|
|
131922
131922
|
sqlite3VdbeJumpHere(v, loopTop - 1);
|
|
131923
|
-
if (!
|
|
131923
|
+
if (!isQuick) {
|
|
131924
131924
|
sqlite3VdbeLoadString(v, 2, "wrong # of entries in index ");
|
|
131925
131925
|
for (j = 0, pIdx = pTab->pIndex; pIdx; pIdx = pIdx->pNext, j++) {
|
|
131926
131926
|
if (pPk == pIdx)
|
|
@@ -146867,7 +146867,7 @@ struct WherePath {
|
|
|
146867
146867
|
** cursor number and column number for X. WhereTerm.eOperator records
|
|
146868
146868
|
** the <op> using a bitmask encoding defined by WO_xxx below. The
|
|
146869
146869
|
** use of a bitmask encoding for the operator allows us to search
|
|
146870
|
-
**
|
|
146870
|
+
** quickly for terms that match any of several different operators.
|
|
146871
146871
|
**
|
|
146872
146872
|
** A WhereTerm might also be two or more subterms connected by OR:
|
|
146873
146873
|
**
|
|
@@ -155050,7 +155050,7 @@ static int whereLoopAddBtreeIndex(WhereLoopBuilder* pBuilder, /* The WhereLoop f
|
|
|
155050
155050
|
** number of repeats in the left-most terms is at least 18.
|
|
155051
155051
|
**
|
|
155052
155052
|
** The magic number 18 is selected on the basis that scanning 17 rows
|
|
155053
|
-
** is almost always
|
|
155053
|
+
** is almost always quicker than an index seek (even though if the index
|
|
155054
155054
|
** contains fewer than 2^17 rows we assume otherwise in other parts of
|
|
155055
155055
|
** the code). And, even if it is not, it should not be too much slower.
|
|
155056
155056
|
** On the other hand, the extra seeks could end up being significantly
|
|
@@ -197957,7 +197957,7 @@ static int rtreeBestIndex(sqlite3_vtab* tab, sqlite3_index_info* pIdxInfo) {
|
|
|
197957
197957
|
|
|
197958
197958
|
/* This strategy involves a two rowid lookups on an B-Tree structures
|
|
197959
197959
|
** and then a linear search of an R-Tree node. This should be
|
|
197960
|
-
** considered almost as
|
|
197960
|
+
** considered almost as quick as a direct rowid lookup (for which
|
|
197961
197961
|
** sqlite uses an internal cost of 0.0). It is expected to return
|
|
197962
197962
|
** a single row.
|
|
197963
197963
|
*/
|
package/lib/commonjs/index.js
CHANGED
|
@@ -22,12 +22,12 @@ Object.defineProperty(exports, "typeORMDriver", {
|
|
|
22
22
|
return _typeORM.typeORMDriver;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
var _transaction = require("./operations/transaction");
|
|
26
|
-
var _nitro = require("./nitro");
|
|
27
|
-
var _session = require("./operations/session");
|
|
25
|
+
var _transaction = require("./operations/transaction.js");
|
|
26
|
+
var _nitro = require("./nitro.js");
|
|
27
|
+
var _session = require("./operations/session.js");
|
|
28
28
|
var _NativeNitroSQLiteOnLoad = _interopRequireDefault(require("./specs/NativeNitroSQLiteOnLoad"));
|
|
29
|
-
var _execute = require("./operations/execute");
|
|
30
|
-
var _types = require("./types");
|
|
29
|
+
var _execute = require("./operations/execute.js");
|
|
30
|
+
var _types = require("./types.js");
|
|
31
31
|
Object.keys(_types).forEach(function (key) {
|
|
32
32
|
if (key === "default" || key === "__esModule") return;
|
|
33
33
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -39,7 +39,7 @@ Object.keys(_types).forEach(function (key) {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
var _typeORM = require("./typeORM");
|
|
42
|
+
var _typeORM = require("./typeORM.js");
|
|
43
43
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
44
44
|
const onInitialized = exports.onInitialized = new Promise(resolve => {
|
|
45
45
|
_NativeNitroSQLiteOnLoad.default.onReactApplicationContextReady(resolve);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_transaction","require","_nitro","_session","_NativeNitroSQLiteOnLoad","_interopRequireDefault","_execute","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_typeORM","e","__esModule","default","onInitialized","Promise","resolve","NitroSQLiteOnLoad","onReactApplicationContextReady","NitroSQLite","HybridNitroSQLite","native","open","transaction","execute","executeAsync"],"
|
|
1
|
+
{"version":3,"names":["_transaction","require","_nitro","_session","_NativeNitroSQLiteOnLoad","_interopRequireDefault","_execute","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_typeORM","e","__esModule","default","onInitialized","Promise","resolve","NitroSQLiteOnLoad","onReactApplicationContextReady","NitroSQLite","HybridNitroSQLite","native","open","transaction","execute","executeAsync"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,QAAA,GAAAnB,OAAA;AAAyC,SAAAI,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElC,MAAMG,aAAa,GAAAR,OAAA,CAAAQ,aAAA,GAAG,IAAIC,OAAO,CAAQC,OAAO,IAAK;EAC1DC,gCAAiB,CAACC,8BAA8B,CAACF,OAAO,CAAC;AAC3D,CAAC,CAAC;AAEK,MAAMG,WAAW,GAAAb,OAAA,CAAAa,WAAA,GAAG;EACzB,GAAGC,wBAAiB;EACpBC,MAAM,EAAED,wBAAiB;EACzBN,aAAa;EACb;EACA;EACAQ,IAAI,EAAJA,aAAI;EACJC,WAAW,EAAXA,wBAAW;EACXC,OAAO,EAAPA,gBAAO;EACPC,YAAY,EAAZA;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","HybridNitroSQLite","exports","NitroModules","createHybridObject","locks"],"
|
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","HybridNitroSQLite","exports","NitroModules","createHybridObject","locks"],"sourceRoot":"../../src","sources":["nitro.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAIO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAC5BE,qCAAY,CAACC,kBAAkB,CAAkB,aAAa,CAAC;AAE1D,MAAMC,KAGZ,GAAAH,OAAA,CAAAG,KAAA,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.execute = execute;
|
|
7
7
|
exports.executeAsync = executeAsync;
|
|
8
|
-
var _nitro = require("../nitro");
|
|
8
|
+
var _nitro = require("../nitro.js");
|
|
9
9
|
function execute(dbName, query, params) {
|
|
10
10
|
const nativeResult = _nitro.HybridNitroSQLite.execute(dbName, query, params);
|
|
11
11
|
const result = buildJsQueryResult(nativeResult);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nitro","require","execute","dbName","query","params","nativeResult","HybridNitroSQLite","result","buildJsQueryResult","executeAsync","insertId","rowsAffected","results","data","rows","_array","length","item","idx"],"
|
|
1
|
+
{"version":3,"names":["_nitro","require","execute","dbName","query","params","nativeResult","HybridNitroSQLite","result","buildJsQueryResult","executeAsync","insertId","rowsAffected","results","data","rows","_array","length","item","idx"],"sourceRoot":"../../../src","sources":["operations/execute.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIO,SAASC,OAAOA,CACrBC,MAAc,EACdC,KAAa,EACbC,MAA0B,EACP;EACnB,MAAMC,YAAY,GAAGC,wBAAiB,CAACL,OAAO,CAACC,MAAM,EAAEC,KAAK,EAAEC,MAAM,CAAC;EACrE,MAAMG,MAAM,GAAGC,kBAAkB,CAAOH,YAAY,CAAC;EACrD,OAAOE,MAAM;AACf;AAEO,eAAeE,YAAYA,CAChCP,MAAc,EACdC,KAAa,EACbC,MAA0B,EACE;EAC5B,MAAMC,YAAY,GAAG,MAAMC,wBAAiB,CAACG,YAAY,CACvDP,MAAM,EACNC,KAAK,EACLC,MACF,CAAC;EACD,MAAMG,MAAM,GAAGC,kBAAkB,CAAOH,YAAY,CAAC;EACrD,OAAOE,MAAM;AACf;AAEA,SAASC,kBAAkBA,CAAkC;EAC3DE,QAAQ;EACRC,YAAY;EACZC;AACiB,CAAC,EAAqB;EACvC,MAAMC,IAAI,GAAGD,OAAiB;EAE9B,OAAO;IACLF,QAAQ;IACRC,YAAY;IACZG,IAAI,EAAE;MACJC,MAAM,EAAEF,IAAI;MACZG,MAAM,EAAEH,IAAI,CAACG,MAAM;MACnBC,IAAI,EAAGC,GAAW,IAAKL,IAAI,CAACK,GAAG;IACjC;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.close = close;
|
|
7
7
|
exports.open = open;
|
|
8
8
|
exports.openDb = openDb;
|
|
9
|
-
var _nitro = require("../nitro");
|
|
10
|
-
var _transaction = require("./transaction");
|
|
11
|
-
var _execute = require("./execute");
|
|
9
|
+
var _nitro = require("../nitro.js");
|
|
10
|
+
var _transaction = require("./transaction.js");
|
|
11
|
+
var _execute = require("./execute.js");
|
|
12
12
|
function open(options) {
|
|
13
13
|
openDb(options.name, options.location);
|
|
14
14
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nitro","require","_transaction","_execute","open","options","openDb","name","location","close","delete","HybridNitroSQLite","drop","attach","dbNameToAttach","alias","detach","transaction","fn","execute","query","params","executeAsync","executeBatch","commands","executeBatchAsync","loadFile","loadFileAsync","dbName","locks","queue","inProgress"],"
|
|
1
|
+
{"version":3,"names":["_nitro","require","_transaction","_execute","open","options","openDb","name","location","close","delete","HybridNitroSQLite","drop","attach","dbNameToAttach","alias","detach","transaction","fn","execute","query","params","executeAsync","executeBatch","commands","executeBatchAsync","loadFile","loadFileAsync","dbName","locks","queue","inProgress"],"sourceRoot":"../../../src","sources":["operations/session.ts"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,QAAA,GAAAF,OAAA;AAEO,SAASG,IAAIA,CAClBC,OAAqC,EACd;EACvBC,MAAM,CAACD,OAAO,CAACE,IAAI,EAAEF,OAAO,CAACG,QAAQ,CAAC;EAEtC,OAAO;IACLC,KAAK,EAAEA,CAAA,KAAMA,KAAK,CAACJ,OAAO,CAACE,IAAI,CAAC;IAChCG,MAAM,EAAEA,CAAA,KAAMC,wBAAiB,CAACC,IAAI,CAACP,OAAO,CAACE,IAAI,EAAEF,OAAO,CAACG,QAAQ,CAAC;IACpEK,MAAM,EAAEA,CAACC,cAAsB,EAAEC,KAAa,EAAEP,QAAiB,KAC/DG,wBAAiB,CAACE,MAAM,CAACR,OAAO,CAACE,IAAI,EAAEO,cAAc,EAAEC,KAAK,EAAEP,QAAQ,CAAC;IACzEQ,MAAM,EAAGD,KAAa,IAAKJ,wBAAiB,CAACK,MAAM,CAACX,OAAO,CAACE,IAAI,EAAEQ,KAAK,CAAC;IACxEE,WAAW,EAAGC,EAA6C,IACzD,IAAAD,wBAAW,EAACZ,OAAO,CAACE,IAAI,EAAEW,EAAE,CAAC;IAC/BC,OAAO,EAAEA,CACPC,KAAa,EACbC,MAA0B,KACJ,IAAAF,gBAAO,EAACd,OAAO,CAACE,IAAI,EAAEa,KAAK,EAAEC,MAAM,CAAC;IAC5DC,YAAY,EAAEA,CACZF,KAAa,EACbC,MAA0B,KACK,IAAAC,qBAAY,EAACjB,OAAO,CAACE,IAAI,EAAEa,KAAK,EAAEC,MAAM,CAAC;IAC1EE,YAAY,EAAGC,QAA6B,IAC1Cb,wBAAiB,CAACY,YAAY,CAAClB,OAAO,CAACE,IAAI,EAAEiB,QAAQ,CAAC;IACxDC,iBAAiB,EAAGD,QAA6B,IAC/Cb,wBAAiB,CAACc,iBAAiB,CAACpB,OAAO,CAACE,IAAI,EAAEiB,QAAQ,CAAC;IAC7DE,QAAQ,EAAGlB,QAAgB,IACzBG,wBAAiB,CAACe,QAAQ,CAACrB,OAAO,CAACE,IAAI,EAAEC,QAAQ,CAAC;IACpDmB,aAAa,EAAGnB,QAAgB,IAC9BG,wBAAiB,CAACgB,aAAa,CAACtB,OAAO,CAACE,IAAI,EAAEC,QAAQ;EAC1D,CAAC;AACH;AAEO,SAASF,MAAMA,CAACsB,MAAc,EAAEpB,QAAiB,EAAE;EACxDG,wBAAiB,CAACP,IAAI,CAACwB,MAAM,EAAEpB,QAAQ,CAAC;EAExCqB,YAAK,CAACD,MAAM,CAAC,GAAG;IACdE,KAAK,EAAE,EAAE;IACTC,UAAU,EAAE;EACd,CAAC;AACH;AAEO,SAAStB,KAAKA,CAACmB,MAAc,EAAE;EACpCjB,wBAAiB,CAACF,KAAK,CAACmB,MAAM,CAAC;EAC/B,OAAOC,YAAK,CAACD,MAAM,CAAC;AACtB","ignoreList":[]}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.transaction = void 0;
|
|
7
|
-
var _nitro = require("../nitro");
|
|
8
|
-
var _execute = require("./execute");
|
|
9
|
-
const transaction =
|
|
7
|
+
var _nitro = require("../nitro.js");
|
|
8
|
+
var _execute = require("./execute.js");
|
|
9
|
+
const transaction = (dbName, fn) => {
|
|
10
10
|
if (_nitro.locks[dbName] == null) throw Error(`Nitro SQLite Error: No lock found on db: ${dbName}`);
|
|
11
11
|
let isFinalized = false;
|
|
12
12
|
|
|
@@ -59,20 +59,18 @@ const transaction = async (dbName, fn) => {
|
|
|
59
59
|
}
|
|
60
60
|
throw executionError;
|
|
61
61
|
} finally {
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
63
62
|
_nitro.locks[dbName].inProgress = false;
|
|
64
63
|
isFinalized = false;
|
|
65
64
|
startNextTransaction(dbName);
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
return new Promise((resolve, reject) => {
|
|
69
|
-
var _locks$dbName;
|
|
70
68
|
const tx = {
|
|
71
69
|
start: () => {
|
|
72
70
|
run().then(resolve).catch(reject);
|
|
73
71
|
}
|
|
74
72
|
};
|
|
75
|
-
|
|
73
|
+
_nitro.locks[dbName]?.queue.push(tx);
|
|
76
74
|
startNextTransaction(dbName);
|
|
77
75
|
});
|
|
78
76
|
};
|
|
@@ -85,7 +83,6 @@ function startNextTransaction(dbName) {
|
|
|
85
83
|
}
|
|
86
84
|
if (_nitro.locks[dbName].queue.length > 0) {
|
|
87
85
|
_nitro.locks[dbName].inProgress = true;
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
89
86
|
const tx = _nitro.locks[dbName].queue.shift();
|
|
90
87
|
setImmediate(() => {
|
|
91
88
|
tx.start();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nitro","require","_execute","transaction","dbName","fn","locks","Error","isFinalized","executeOnTransaction","query","params","execute","executeAsyncOnTransaction","executeAsync","commit","result","HybridNitroSQLite","rollback","run","executionError","rollbackError","inProgress","startNextTransaction","Promise","resolve","reject","
|
|
1
|
+
{"version":3,"names":["_nitro","require","_execute","transaction","dbName","fn","locks","Error","isFinalized","executeOnTransaction","query","params","execute","executeAsyncOnTransaction","executeAsync","commit","result","HybridNitroSQLite","rollback","run","executionError","rollbackError","inProgress","startNextTransaction","Promise","resolve","reject","tx","start","then","catch","queue","push","exports","length","shift","setImmediate"],"sourceRoot":"../../../src","sources":["operations/transaction.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAD,OAAA;AAeO,MAAME,WAAW,GAAGA,CACzBC,MAAc,EACdC,EAA6C,KAC3B;EAClB,IAAIC,YAAK,CAACF,MAAM,CAAC,IAAI,IAAI,EACvB,MAAMG,KAAK,CAAC,4CAA4CH,MAAM,EAAE,CAAC;EAEnE,IAAII,WAAW,GAAG,KAAK;;EAEvB;EACA,MAAMC,oBAAoB,GAAGA,CAC3BC,KAAa,EACbC,MAA0B,KACJ;IACtB,IAAIH,WAAW,EAAE;MACf,MAAMD,KAAK,CACT,sEAAsEH,MAAM,EAC9E,CAAC;IACH;IACA,OAAO,IAAAQ,gBAAO,EAACR,MAAM,EAAEM,KAAK,EAAEC,MAAM,CAAC;EACvC,CAAC;EAED,MAAME,yBAAyB,GAAGA,CAChCH,KAAa,EACbC,MAA0B,KACK;IAC/B,IAAIH,WAAW,EAAE;MACf,MAAMD,KAAK,CACT,sEAAsEH,MAAM,EAC9E,CAAC;IACH;IACA,OAAO,IAAAU,qBAAY,EAACV,MAAM,EAAEM,KAAK,EAAEC,MAAM,CAAC;EAC5C,CAAC;EAED,MAAMI,MAAM,GAAGA,CAAA,KAAM;IACnB,IAAIP,WAAW,EAAE;MACf,MAAMD,KAAK,CACT,uEAAuEH,MAAM,EAC/E,CAAC;IACH;IACA,MAAMY,MAAM,GAAGC,wBAAiB,CAACL,OAAO,CAACR,MAAM,EAAE,QAAQ,CAAC;IAC1DI,WAAW,GAAG,IAAI;IAClB,OAAOQ,MAAM;EACf,CAAC;EAED,MAAME,QAAQ,GAAGA,CAAA,KAAM;IACrB,IAAIV,WAAW,EAAE;MACf,MAAMD,KAAK,CACT,yEAAyEH,MAAM,EACjF,CAAC;IACH;IACA,MAAMY,MAAM,GAAGC,wBAAiB,CAACL,OAAO,CAACR,MAAM,EAAE,UAAU,CAAC;IAC5DI,WAAW,GAAG,IAAI;IAClB,OAAOQ,MAAM;EACf,CAAC;EAED,eAAeG,GAAGA,CAAA,EAAG;IACnB,IAAI;MACF,MAAMF,wBAAiB,CAACH,YAAY,CAACV,MAAM,EAAE,mBAAmB,CAAC;MAEjE,MAAMC,EAAE,CAAC;QACPU,MAAM;QACNH,OAAO,EAAEH,oBAAoB;QAC7BK,YAAY,EAAED,yBAAyB;QACvCK;MACF,CAAC,CAAC;MAEF,IAAI,CAACV,WAAW,EAAEO,MAAM,CAAC,CAAC;IAC5B,CAAC,CAAC,OAAOK,cAAc,EAAE;MACvB,IAAI,CAACZ,WAAW,EAAE;QAChB,IAAI;UACFU,QAAQ,CAAC,CAAC;QACZ,CAAC,CAAC,OAAOG,aAAa,EAAE;UACtB,MAAMA,aAAa;QACrB;MACF;MAEA,MAAMD,cAAc;IACtB,CAAC,SAAS;MACRd,YAAK,CAACF,MAAM,CAAC,CAAEkB,UAAU,GAAG,KAAK;MACjCd,WAAW,GAAG,KAAK;MACnBe,oBAAoB,CAACnB,MAAM,CAAC;IAC9B;EACF;EAEA,OAAO,IAAIoB,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,EAAsB,GAAG;MAC7BC,KAAK,EAAEA,CAAA,KAAM;QACXT,GAAG,CAAC,CAAC,CAACU,IAAI,CAACJ,OAAO,CAAC,CAACK,KAAK,CAACJ,MAAM,CAAC;MACnC;IACF,CAAC;IAEDpB,YAAK,CAACF,MAAM,CAAC,EAAE2B,KAAK,CAACC,IAAI,CAACL,EAAE,CAAC;IAC7BJ,oBAAoB,CAACnB,MAAM,CAAC;EAC9B,CAAC,CAAC;AACJ,CAAC;AAAA6B,OAAA,CAAA9B,WAAA,GAAAA,WAAA;AAED,SAASoB,oBAAoBA,CAACnB,MAAc,EAAE;EAC5C,IAAIE,YAAK,CAACF,MAAM,CAAC,IAAI,IAAI,EAAE,MAAMG,KAAK,CAAC,0BAA0BH,MAAM,EAAE,CAAC;EAE1E,IAAIE,YAAK,CAACF,MAAM,CAAC,CAACkB,UAAU,EAAE;IAC5B;IACA;EACF;EAEA,IAAIhB,YAAK,CAACF,MAAM,CAAC,CAAC2B,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;IAClC5B,YAAK,CAACF,MAAM,CAAC,CAACkB,UAAU,GAAG,IAAI;IAE/B,MAAMK,EAAE,GAAGrB,YAAK,CAACF,MAAM,CAAC,CAAC2B,KAAK,CAACI,KAAK,CAAC,CAAE;IACvCC,YAAY,CAAC,MAAM;MACjBT,EAAE,CAACC,KAAK,CAAC,CAAC;IACZ,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["noop","exports","onReactApplicationContextReady","undefined","_default","default"],"
|
|
1
|
+
{"version":3,"names":["noop","exports","onReactApplicationContextReady","undefined","_default","default"],"sourceRoot":"../../../src","sources":["specs/NativeNitroSQLiteOnLoad.ios.ts"],"mappings":";;;;;;AAEO,MAAMA,IAAkC,GAAAC,OAAA,CAAAD,IAAA,GAAG;EAChDE,8BAA8B,EAAEA,CAAA,KAAMC;AACxC,CAAC;AAAA,IAAAC,QAAA,GAAAH,OAAA,CAAAI,OAAA,GAEcL,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeNitroSQLiteOnLoad.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAoE,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAMrDC,gCAAmB,CAACC,YAAY,CAAO,qBAAqB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/NativeQueryResult.nitro.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/NitroSQLite.nitro.ts"],"mappings":"","ignoreList":[]}
|
package/lib/commonjs/typeORM.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.typeORMDriver = void 0;
|
|
7
|
-
var Operations = _interopRequireWildcard(require("./operations/session"));
|
|
7
|
+
var Operations = _interopRequireWildcard(require("./operations/session.js"));
|
|
8
8
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
9
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
10
|
// _________ _______ ______ ____ _____ __ __ _____ _____
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Operations","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","typeORMDriver","exports","openDatabase","options","ok","fail","db","open","connection","executeSql","sql","params","okExecute","failExecute","result","executeAsync","transaction","fn","close","okClose","failClose","attach","dbNameToAttach","alias","location","callback","detach"],"
|
|
1
|
+
{"version":3,"names":["Operations","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","typeORMDriver","exports","openDatabase","options","ok","fail","db","open","connection","executeSql","sql","params","okExecute","failExecute","result","executeAsync","transaction","fn","close","okClose","failClose","attach","dbNameToAttach","alias","location","callback","detach"],"sourceRoot":"../../src","sources":["typeORM.ts"],"mappings":";;;;;;AAaA,IAAAA,UAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkD,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAblD;AACA;AACA;AACA;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACO,MAAMW,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,YAAY,EAAEA,CACZC,OAGC,EACDC,EAA8C,EAC9CC,IAA2B,KACa;IACxC,IAAI;MACF,MAAMC,EAAE,GAAG7B,UAAU,CAAC8B,IAAI,CAACJ,OAAO,CAAC;MAEnC,MAAMK,UAAwC,GAAG;QAC/CC,UAAU,EAAE,MAAAA,CACVC,GAAW,EACXC,MAAqC,EACrCC,SAA8C,EAC9CC,WAAkC,KAC/B;UACH,IAAI;YACF,MAAMC,MAAM,GAAG,MAAMR,EAAE,CAACS,YAAY,CAAUL,GAAG,EAAEC,MAAM,CAAC;YAC1DC,SAAS,CAACE,MAAM,CAAC;UACnB,CAAC,CAAC,OAAOjC,CAAU,EAAE;YACnBgC,WAAW,CAAChC,CAAW,CAAC;UAC1B;QACF,CAAC;QACDmC,WAAW,EACTC,EAAsC,IACpB;UAClB,OAAOX,EAAE,CAACU,WAAW,CAACC,EAAE,CAAC;QAC3B,CAAC;QACDC,KAAK,EAAEA,CAACC,OAAmB,EAAEC,SAA+B,KAAK;UAC/D,IAAI;YACFd,EAAE,CAACY,KAAK,CAAC,CAAC;YACVC,OAAO,CAAC,CAAC;UACX,CAAC,CAAC,OAAOtC,CAAC,EAAE;YACVuC,SAAS,CAACvC,CAAC,CAAC;UACd;QACF,CAAC;QACDwC,MAAM,EAAEA,CACNC,cAAsB,EACtBC,KAAa,EACbC,QAA4B,EAC5BC,QAAoB,KACjB;UACHnB,EAAE,CAACe,MAAM,CAACC,cAAc,EAAEC,KAAK,EAAEC,QAAQ,CAAC;UAC1CC,QAAQ,CAAC,CAAC;QACZ,CAAC;QACDC,MAAM,EAAEA,CAACH,KAAa,EAAEE,QAAoB,KAAK;UAC/CnB,EAAE,CAACoB,MAAM,CAACH,KAAK,CAAC;UAChBE,QAAQ,CAAC,CAAC;QACZ;MACF,CAAC;MAEDrB,EAAE,CAACI,UAAU,CAAC;MAEd,OAAOA,UAAU;IACnB,CAAC,CAAC,OAAO3B,CAAU,EAAE;MACnBwB,IAAI,CAACxB,CAAW,CAAC;MAEjB,OAAO,IAAI;IACb;EACF;AACF,CAAC","ignoreList":[]}
|
package/lib/commonjs/types.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ColumnType = void 0;
|
|
7
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
8
7
|
let ColumnType = exports.ColumnType = /*#__PURE__*/function (ColumnType) {
|
|
9
8
|
ColumnType[ColumnType["BOOLEAN"] = 0] = "BOOLEAN";
|
|
10
9
|
ColumnType[ColumnType["NUMBER"] = 1] = "NUMBER";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ColumnType","exports"],"
|
|
1
|
+
{"version":3,"names":["ColumnType","exports"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;;;;;IAmBYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAStB;AACA;AACA;AA+CA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { transaction } from "./operations/transaction.js";
|
|
4
|
+
import { HybridNitroSQLite } from "./nitro.js";
|
|
5
|
+
import { open } from "./operations/session.js";
|
|
4
6
|
import NitroSQLiteOnLoad from './specs/NativeNitroSQLiteOnLoad';
|
|
5
|
-
import { execute, executeAsync } from
|
|
6
|
-
export * from
|
|
7
|
-
export { typeORMDriver } from
|
|
7
|
+
import { execute, executeAsync } from "./operations/execute.js";
|
|
8
|
+
export * from "./types.js";
|
|
9
|
+
export { typeORMDriver } from "./typeORM.js";
|
|
8
10
|
export const onInitialized = new Promise(resolve => {
|
|
9
11
|
NitroSQLiteOnLoad.onReactApplicationContextReady(resolve);
|
|
10
12
|
});
|
|
@@ -19,5 +21,5 @@ export const NitroSQLite = {
|
|
|
19
21
|
execute,
|
|
20
22
|
executeAsync
|
|
21
23
|
};
|
|
22
|
-
export { open } from
|
|
24
|
+
export { open } from "./operations/session.js";
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["transaction","HybridNitroSQLite","open","NitroSQLiteOnLoad","execute","executeAsync","typeORMDriver","onInitialized","Promise","resolve","onReactApplicationContextReady","NitroSQLite","native"],"
|
|
1
|
+
{"version":3,"names":["transaction","HybridNitroSQLite","open","NitroSQLiteOnLoad","execute","executeAsync","typeORMDriver","onInitialized","Promise","resolve","onReactApplicationContextReady","NitroSQLite","native"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,6BAA0B;AACtD,SAASC,iBAAiB,QAAQ,YAAS;AAC3C,SAASC,IAAI,QAAQ,yBAAsB;AAC3C,OAAOC,iBAAiB,MAAM,iCAAiC;AAC/D,SAASC,OAAO,EAAEC,YAAY,QAAQ,yBAAsB;AAE5D,cAAc,YAAS;AACvB,SAASC,aAAa,QAAQ,cAAW;AAEzC,OAAO,MAAMC,aAAa,GAAG,IAAIC,OAAO,CAAQC,OAAO,IAAK;EAC1DN,iBAAiB,CAACO,8BAA8B,CAACD,OAAO,CAAC;AAC3D,CAAC,CAAC;AAEF,OAAO,MAAME,WAAW,GAAG;EACzB,GAAGV,iBAAiB;EACpBW,MAAM,EAAEX,iBAAiB;EACzBM,aAAa;EACb;EACA;EACAL,IAAI;EACJF,WAAW;EACXI,OAAO;EACPC;AACF,CAAC;AAED,SAASH,IAAI,QAAQ,yBAAsB","ignoreList":[]}
|
package/lib/module/nitro.js
CHANGED
package/lib/module/nitro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NitroModules","HybridNitroSQLite","createHybridObject","locks"],"
|
|
1
|
+
{"version":3,"names":["NitroModules","HybridNitroSQLite","createHybridObject","locks"],"sourceRoot":"../../src","sources":["nitro.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAIzD,OAAO,MAAMC,iBAAiB,GAC5BD,YAAY,CAACE,kBAAkB,CAAkB,aAAa,CAAC;AAEjE,OAAO,MAAMC,KAGZ,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { HybridNitroSQLite } from "../nitro.js";
|
|
2
4
|
export function execute(dbName, query, params) {
|
|
3
5
|
const nativeResult = HybridNitroSQLite.execute(dbName, query, params);
|
|
4
6
|
const result = buildJsQueryResult(nativeResult);
|