This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +73
-4
lines changed Expand file tree Collapse file tree 3 files changed +73
-4
lines changed Original file line number Diff line number Diff line change 22
33Multiplatform key-value storage backed by SQLite for React Native Async Storage
44
5+ ![ version badge] ( https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Freact-native-async-storage%2Fsqlite-storage-native%2Fmain%2Fpackage_info.json&query=%24.version&style=flat&label=latest%20version&color=7956b7 )
6+
57## Installation
68
79### Android
810
9- ``` groovy
11+ ``` kotlin
1012implementation(" io.github.react-native-async-storage:async-storage-sqlite:VERSION" )
1113```
1214
Original file line number Diff line number Diff line change 22
33Multiplatform key-value storage backed by SQLite for React Native Async Storage
44
5- !!! warning
6- Page in progress
5+ ![ version badge] ( https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Freact-native-async-storage%2Fsqlite-storage-native%2Fmain%2Fpackage_info.json&query=%24.version&style=flat&label=latest%20version&color=7956b7 )
6+
7+
8+ ## Installation
9+
10+ ### Android
11+
12+ === "kotlin"
13+
14+ ```{.kotlin .copy .title="build.gradle.kts"}
15+ implementation("io.github.react-native-async-storage:async-storage-sqlite:VERSION")
16+ ```
17+
18+ === "groovy"
19+
20+ ```{.groovy .copy .title="build.gradle"}
21+ implementation "io.github.react-native-async-storage:async-storage-sqlite:VERSION"
22+ ```
23+
24+ ### iOS
25+
26+ === "cocoapods"
27+
28+ ```{.ruby .copy}
29+ pod 'AsyncStorageSQLiteKMP', 'VERSION'
30+ ```
31+
32+ ## Quick start
33+
34+ ### Android
35+
36+ ``` kotlin
37+ import org.asyncstorage.sqlitestorage.SQLiteStorageFactory
38+
39+ val storage = SQLiteStorageFactory (this ).create(" my_database_name" )
40+
41+ suspend fun single (): Entry {
42+ val entry = storage.read(" my_key" )
43+ return entry
44+ }
45+
46+ suspend fun singleWrite () {
47+ val entry = Entry (" my_key" , " my_value" )
48+ storage.write(entry)
49+ }
50+ ```
51+
52+
53+ ### iOS
54+
55+ ``` swift
56+ import AsyncStorageSQLite
57+
58+ let storage = AsyncStorageSQLite (" my_database_name" )
59+
60+ func single () async throws -> Entry {
61+ let entry = try await storage.read (key : " my_key" )
62+ return entry
63+ }
64+
65+ func singleWrite () async throws {
66+ let entry = Entry (key : " my_key" , value : " my_value" )
67+ try await storage.write (entry : entry)
68+ }
69+ ```
70+
71+
72+ Visit [ Usage page] ( usage.md ) to learn more
73+
774
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ site_name: Async Storage SQLite
22repo_url : https://github.com/react-native-async-storage/sqlite-storage-kmp
33
44nav :
5- - Getting started : index.md
5+ - Quick start : index.md
66 - Usage : usage.md
77 - Changelog : changelog.md
88
You can’t perform that action at this time.
0 commit comments