Skip to content

Commit 96622dd

Browse files
committed
Bump RNQS version and cleanup
1 parent 75659dd commit 96622dd

File tree

6 files changed

+35
-20
lines changed

6 files changed

+35
-20
lines changed

demos/react-native-supabase-todolist/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ PODS:
10051005
- React-debug
10061006
- react-native-encrypted-storage (4.0.3):
10071007
- React-Core
1008-
- react-native-quick-sqlite (2.2.0):
1008+
- react-native-quick-sqlite (2.2.1):
10091009
- DoubleConversion
10101010
- glog
10111011
- hermes-engine
@@ -1467,7 +1467,7 @@ DEPENDENCIES:
14671467
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
14681468
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
14691469
- react-native-encrypted-storage (from `../../../node_modules/react-native-encrypted-storage`)
1470-
- "react-native-quick-sqlite (from `../../../node_modules/@journeyapps/react-native-quick-sqlite`)"
1470+
- "react-native-quick-sqlite (from `../node_modules/@journeyapps/react-native-quick-sqlite`)"
14711471
- react-native-safe-area-context (from `../../../node_modules/react-native-safe-area-context`)
14721472
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
14731473
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
@@ -1593,7 +1593,7 @@ EXTERNAL SOURCES:
15931593
react-native-encrypted-storage:
15941594
:path: "../../../node_modules/react-native-encrypted-storage"
15951595
react-native-quick-sqlite:
1596-
:path: "../../../node_modules/@journeyapps/react-native-quick-sqlite"
1596+
:path: "../node_modules/@journeyapps/react-native-quick-sqlite"
15971597
react-native-safe-area-context:
15981598
:path: "../../../node_modules/react-native-safe-area-context"
15991599
React-nativeconfig:
@@ -1698,7 +1698,7 @@ SPEC CHECKSUMS:
16981698
React-logger: 257858bd55f3a4e1bc0cf07ddc8fb9faba6f8c7c
16991699
React-Mapbuffer: 6c1cacdbf40b531f549eba249e531a7d0bfd8e7f
17001700
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
1701-
react-native-quick-sqlite: b4b34028dbe2d532beb2575f4b90ae58bec42260
1701+
react-native-quick-sqlite: fa617eb5224e530a0cafe21f35dbff9d98b1a557
17021702
react-native-safe-area-context: afa5d614d6b1b73b743c9261985876606560d128
17031703
React-nativeconfig: ba9a2e54e2f0882cf7882698825052793ed4c851
17041704
React-NativeModulesApple: 8d11ff8955181540585c944cf48e9e7236952697
@@ -1733,4 +1733,4 @@ SPEC CHECKSUMS:
17331733

17341734
PODFILE CHECKSUM: ad989b4e43152979093488e5c8b7457e401bf191
17351735

1736-
COCOAPODS: 1.15.2
1736+
COCOAPODS: 1.16.2

demos/react-native-supabase-todolist/library/fts/fts_setup.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AppSchema } from '../powersync/AppSchema';
22
import { ExtractType, generateJsonExtracts } from './helpers';
3-
import { system } from '../powersync/system';
3+
import { PowerSyncDatabase } from '@powersync/react-native';
44

55
/**
66
* Create a Full Text Search table for the given table and columns
@@ -11,11 +11,16 @@ import { system } from '../powersync/system';
1111
* @param columns
1212
* @param tokenizationMethod
1313
*/
14-
async function createFtsTable(tableName: string, columns: string[], tokenizationMethod = 'unicode61'): Promise<void> {
14+
async function createFtsTable(
15+
db: PowerSyncDatabase,
16+
tableName: string,
17+
columns: string[],
18+
tokenizationMethod = 'unicode61'
19+
): Promise<void> {
1520
const internalName = AppSchema.tables.find((table) => table.name === tableName)?.internalName;
1621
const stringColumns = columns.join(', ');
1722

18-
return await system.powersync.writeTransaction(async (tx) => {
23+
return await db.writeTransaction(async (tx) => {
1924
// Add FTS table
2025
await tx.execute(`
2126
CREATE VIRTUAL TABLE IF NOT EXISTS fts_${tableName}
@@ -58,7 +63,7 @@ async function createFtsTable(tableName: string, columns: string[], tokenization
5863
* that correspond to the tables in your schema and populate them
5964
* with the data you would like to search on
6065
*/
61-
export async function configureFts(): Promise<void> {
62-
await createFtsTable('lists', ['name'], 'porter unicode61');
63-
await createFtsTable('todos', ['description', 'list_id']);
66+
export async function configureFts(db: PowerSyncDatabase): Promise<void> {
67+
await createFtsTable(db, 'lists', ['name'], 'porter unicode61');
68+
await createFtsTable(db, 'todos', ['description', 'list_id']);
6469
}

demos/react-native-supabase-todolist/library/powersync/system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class System {
7272

7373
// Demo using SQLite Full-Text Search with PowerSync.
7474
// See https://docs.powersync.com/usage-examples/full-text-search for more details
75-
configureFts();
75+
configureFts(this.powersync);
7676
}
7777
}
7878

demos/react-native-supabase-todolist/library/widgets/SearchBarWidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// import { Autocomplete, Box, Card, CardContent, FormControl, TextField, Typography } from '@mui/material';
21
import React from 'react';
32
import { usePowerSync } from '@powersync/react';
43
import { Autocomplete } from './AutoCompleteWidget';

demos/react-native-supabase-todolist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"@azure/core-asynciterator-polyfill": "^1.0.2",
1212
"@expo/vector-icons": "^14.0.3",
13-
"@journeyapps/react-native-quick-sqlite": "^2.2.0",
13+
"@journeyapps/react-native-quick-sqlite": "^2.2.1",
1414
"@powersync/attachments": "workspace:*",
1515
"@powersync/common": "workspace:*",
1616
"@powersync/react": "workspace:*",

pnpm-lock.yaml

Lines changed: 17 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)