Skip to content

Commit 68d4f04

Browse files
committed
sql.js adapter: Add warning for persistence section
1 parent 2c4dd1d commit 68d4f04

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎client-sdks/frameworks/expo-go-support.mdx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Expo Go is a sandbox environment that allows you to quickly test your applicatio
1313
<Warning>
1414
This package is in an **alpha** release.
1515

16-
**Expo Go Sandbox Environment Only** This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file.
16+
**Expo Go Sandbox Environment Only** This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and doesn't support persistence reliably.
1717
</Warning>
1818

1919
## Usage
@@ -115,6 +115,14 @@ After adding PowerSync to your app:
115115

116116
## Data Persistence
117117

118+
<Warning>
119+
Support for persistence with `adapter-sql-js` is deprecated. The reason is that the implementation is inefficient,
120+
doesn't provide consistency guarantees expected from SQLite, and doesn't work while the database is connected.
121+
122+
If you need persisted data across app restarts, use the [recommended setup](/client-sdks/reference/react-native-and-expo#installation)
123+
with a local app build instead of Expo Go.
124+
</Warning>
125+
118126
The default version of this adapter uses in-memory persistence, but you can specify your own `persister` option to the open factory. See an example in the package [README](https://www.npmjs.com/package/@powersync/adapter-sql-js).
119127

120128
## Moving Beyond Expo Go

0 commit comments

Comments
 (0)