Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow
npx [email protected] init AmplifyDataStoreRN --version 0.68.2
cd AmplifyDataStoreRN
npx amplify-app@latest
npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage
npm install aws-amplify @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage
npx pod-install
```

Expand All @@ -46,6 +46,12 @@ DataStore.configure({
});
```

<Callout>

The SQLite storage adapter does not currently support custom primary keys.
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.

</Callout>
</Block>
<Block name="Expo">

Expand All @@ -68,7 +74,7 @@ To enable SQLite with DataStore for enhanced local database performance, follow
expo init AmplifyDataStoreExpo
cd AmplifyDataStoreExpo
npx amplify-app@latest
expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage
expo install aws-amplify @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage
```

Then configure the SQLite storage adapter with DataStore in your app:
Expand All @@ -82,5 +88,11 @@ DataStore.configure({
});
```

<Callout>

The SQLite storage adapter does not currently support custom primary keys.
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.

</Callout>
</Block>
</BlockSwitcher>