Skip to content
Merged
Show file tree
Hide file tree
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
37 changes: 21 additions & 16 deletions client-sdk-references/kotlin-multiplatform.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Kotlin Multiplatform (Beta)"
title: "Kotlin Multiplatform"
sidebarTitle: Overview
---

Expand All @@ -21,10 +21,6 @@ import KotlinMultiplatformInstallation from '/snippets/kotlin-multiplatform/inst
</Card>
</CardGroup>

<Note>
This SDK is currently in a [**beta** release](/resources/feature-status). It is suitable for production use provided you've tested your specific use cases.
</Note>

### SDK Features

<SdkFeatures />
Expand Down Expand Up @@ -218,8 +214,12 @@ The `get` method executes a read-only (SELECT) query and returns a single result
```kotlin
// Find a list item by ID
suspend fun find(id: Any): TodoList {
val results = db.get("SELECT * FROM lists WHERE id = ?", listOf(id))
return TodoList.fromRow(results)
return database.get(
"SELECT * FROM lists WHERE id = ?",
listOf(id)
) { cursor ->
TodoList.fromCursor(cursor)
}
}
```

Expand All @@ -230,8 +230,11 @@ The `getAll` method executes a read-only (SELECT) query and returns a set of row
```kotlin
// Get all list IDs
suspend fun getLists(): List<String> {
val results = db.getAll("SELECT id FROM lists WHERE id IS NOT NULL")
return results.map { row -> row["id"] as String }.toList()
return database.getAll(
"SELECT id FROM lists WHERE id IS NOT NULL"
) { cursor ->
cursor.getString("id")
}
}
```

Expand All @@ -243,13 +246,15 @@ The `watch` method executes a read query whenever a change to a dependent table
// You can watch any SQL query
fun watchCustomers(): Flow<List<User>> {
// TODO: implement your UI based on the result set
return database.watch("SELECT * FROM customers", mapper = { cursor ->
User(
id = cursor.getString("id"),
name = cursor.getString("name"),
email = cursor.getString("email")
)
})
return database.watch(
"SELECT * FROM customers"
) { cursor ->
User(
id = cursor.getString("id"),
name = cursor.getString("name"),
email = cursor.getString("email")
)
}
}
```

Expand Down
4 changes: 2 additions & 2 deletions installation/client-side-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The next step after configuring your database and connecting it to your PowerSyn

2. Write mutations to your backend

PowerSync currently supports apps built in [Flutter](/client-sdk-references/flutter), [React Native & Expo](/client-sdk-references/react-native-and-expo), [JavaScript Web](/client-sdk-references/javascript-web), [Node.js](/client-sdk-references/node) (alpha), [Kotlin Multiplatform](/client-sdk-references/kotlin-multiplatform) (beta), [Swift](/client-sdk-references/swift) (beta), and [.NET](/client-sdk-references/dotnet) (alpha).
PowerSync currently supports apps built in [Flutter](/client-sdk-references/flutter), [React Native & Expo](/client-sdk-references/react-native-and-expo), [JavaScript Web](/client-sdk-references/javascript-web), [Node.js](/client-sdk-references/node) (alpha), [Kotlin Multiplatform](/client-sdk-references/kotlin-multiplatform), [Swift](/client-sdk-references/swift) (beta), and [.NET](/client-sdk-references/dotnet) (alpha).

Please see the steps based on your app framework:

Expand Down Expand Up @@ -60,7 +60,7 @@ Please see the steps based on your app framework:

See the full SDK reference for further details and getting started instructions:

<Card title="Kotlin Multiplatform (Beta)" icon="k" href="/client-sdk-references/kotlin-multiplatform" horizontal />
<Card title="Kotlin Multiplatform" icon="k" href="/client-sdk-references/kotlin-multiplatform" horizontal />
</Accordion>

<Accordion title="Swift" icon="swift">
Expand Down
2 changes: 1 addition & 1 deletion installation/quickstart-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PowerSync is designed to be stack agnostic, and currently supports **Postgres**,
- [**React Native**](/client-sdk-references/react-native-and-expo) (mobile and [web](/client-sdk-references/react-native-and-expo/react-native-web-support))
- [**JavaScript Web**](/client-sdk-references/javascript-web) (vanilla JS, React, Vue)
- [**Node.js**](/client-sdk-references/node) (alpha)
- [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform) (beta)
- [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform)
- [**Swift**](/client-sdk-references/swift) (beta)
- [**.NET**](/client-sdk-references/dotnet) (alpha)

Expand Down
4 changes: 1 addition & 3 deletions snippets/client-sdks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
Currently in an alpha release.
</Card>

<Card title="Kotlin Multiplatform" icon="k" href="/client-sdk-references/kotlin-multiplatform">
Currently in a beta release.
</Card>
<Card title="Kotlin Multiplatform" icon="k" href="/client-sdk-references/kotlin-multiplatform" />

<Card title="Swift" icon="swift" href="/client-sdk-references/swift">
Currently in a beta release.
Expand Down