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

Commit 2aa433c

Browse files
committed
docs: readme update
1 parent e3b2eed commit 2aa433c

File tree

7 files changed

+60
-7
lines changed

7 files changed

+60
-7
lines changed

.github/workflows/documentation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
python-version: 3.11
1818
- name: Install MkDocs
1919
run: pip install mkdocs==1.5.3 mkdocs-material==9.5.10
20+
- name: Copy changelog
21+
run: |
22+
cp CHANGELOG.md docs/changelog.md
2023
- name: Build docs
2124
run: mkdocs build
2225
- name: Deploy docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ android/keystores/debug.keystore
5656

5757
# Built website
5858
site/
59+
docs/changelog.md

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## [0.1.0] - 2024-XX-XX
4+
5+
Initial release.

README.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Async Storage SQLite
22

3-
Multiplatform native wrapper of SQLite for React Native Async Storage
3+
Multiplatform key-value storage backed by SQLite for React Native Async Storage
44

55
## Installation
66

@@ -16,11 +16,52 @@ implementation("io.github.react-native-async-storage:async-storage-sqlite:VERSIO
1616
pod 'AsyncStorageSQLiteKMP', 'VERSION'
1717
```
1818

19-
## Usage
19+
## Quick start
2020

21-
todo
21+
Visit [Usage page](https://react-native-async-storage.github.io/sqlite-storage-native/usage/) to learn more
2222

23-
## Running tests
23+
24+
### Android
25+
26+
```kotlin
27+
import org.asyncstorage.sqlitestorage.SQLiteStorageFactory
28+
29+
val storage = SQLiteStorageFactory(this).create("my_database_name")
30+
31+
suspend fun single(): Entry {
32+
val entry = storage.read("my_key")
33+
return entry
34+
}
35+
36+
suspend fun singleWrite() {
37+
val entry = Entry("my_key", "my_value")
38+
storage.write(entry)
39+
}
40+
```
41+
42+
43+
### iOS
44+
45+
```swift
46+
import AsyncStorageSQLite
47+
48+
let storage = AsyncStorageSQLite("my_database_name")
49+
50+
func single() async throws -> Entry {
51+
let entry = try await storage.read(key: "my_key")
52+
return entry
53+
}
54+
55+
func singleWrite() async throws {
56+
let entry = Entry(key: "my_key", value: "my_value")
57+
try await storage.write(entry: entry)
58+
}
59+
```
60+
61+
62+
## Contributing
63+
64+
### Tests
2465

2566
Gradle tasks to run tests:
2667

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Async Storage SQLite
22

3-
Multiplatform native wrapper of SQLite for React Native Async Storage
3+
Multiplatform key-value storage backed by SQLite for React Native Async Storage
44

55
!!! warning
66
Page in progress

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ repo_url: https://github.com/react-native-async-storage/sqlite-storage-kmp
44
nav:
55
- Getting started: index.md
66
- Usage: usage.md
7+
- Changelog: changelog.md
78

89
theme:
910
name: material
1011
palette:
1112
primary: deep purple
12-
accent: orange
13+
accent: amber
1314
icon:
1415
repo: fontawesome/brands/github
1516
logo: octicons/database-16
@@ -31,6 +32,8 @@ markdown_extensions:
3132
anchor_linenums: true
3233
line_spans: __span
3334
pygments_lang_class: true
35+
- toc:
36+
permalink: true
3437

3538
extra:
3639
social:

package_info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Async Storage SQLite",
33
"version": "0.0.1",
4-
"description": "Multiplatform native wrapper of SQLite for React Native Async Storage",
4+
"description": "Multiplatform key-value storage backed by SQLite for React Native Async Storage",
55
"author": "Krzysztof Borowy",
66
"homepage": "https://github.com/react-native-async-storage/sqlite-storage-native",
77
"repository": "https://github.com/react-native-async-storage/sqlite-storage-native.git",

0 commit comments

Comments
 (0)