Skip to content

Commit 2165048

Browse files
ChriztiaanChristiaan Landman
andauthored
fix: large datasets on android 12 (#28)
* fix setting temp_store to memory --------- Co-authored-by: Christiaan Landman <christiaanlandman@Christiaans-MacBook-Pro-2.local>
1 parent 40c6dd0 commit 2165048

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.changeset/wise-stingrays-float.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@journeyapps/react-native-quick-sqlite': patch
3+
---
4+
5+
Use memory temp_store

android/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ include_directories(
1111
)
1212

1313
add_definitions(
14+
-DSQLITE_TEMP_STORE=2
1415
${SQLITE_FLAGS}
1516
)
1617

tests/tests/sqlite/rawQueries.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,6 @@ export function registerBaseTests() {
566566
// Execute the read test whenever a table change ocurred
567567
db.registerTablesChangedHook((update) => readTriggerCallbacks.forEach((cb) => cb()));
568568

569-
// Needed for large volumes of data on older Android devices
570-
// https://github.com/margelo/react-native-quick-sqlite/pull/25
571-
await db.execute('PRAGMA temp_store = memory;')
572569
const numberOfUsers = 100_000;
573570
await db.writeLock(async (tx) => {
574571
await tx.execute('BEGIN');

0 commit comments

Comments
 (0)