Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 6fc8d38

Browse files
committed
docs: main page
1 parent 2aa433c commit 6fc8d38

File tree

3 files changed

+73
-4
lines changed

3 files changed

+73
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
Multiplatform 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
1012
implementation("io.github.react-native-async-storage:async-storage-sqlite:VERSION")
1113
```
1214

docs/index.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,73 @@
22

33
Multiplatform 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

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site_name: Async Storage SQLite
22
repo_url: https://github.com/react-native-async-storage/sqlite-storage-kmp
33

44
nav:
5-
- Getting started: index.md
5+
- Quick start: index.md
66
- Usage: usage.md
77
- Changelog: changelog.md
88

0 commit comments

Comments
 (0)