diff --git a/client-sdk-references/kotlin-multiplatform.mdx b/client-sdk-references/kotlin-multiplatform.mdx index 49c33b36..f85e9b23 100644 --- a/client-sdk-references/kotlin-multiplatform.mdx +++ b/client-sdk-references/kotlin-multiplatform.mdx @@ -1,5 +1,5 @@ --- -title: "Kotlin Multiplatform (Beta)" +title: "Kotlin Multiplatform" sidebarTitle: Overview --- @@ -21,10 +21,6 @@ import KotlinMultiplatformInstallation from '/snippets/kotlin-multiplatform/inst - - 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. - - ### SDK Features @@ -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) + } } ``` @@ -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 { - 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") + } } ``` @@ -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> { // 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") + ) + } } ``` diff --git a/installation/client-side-setup.mdx b/installation/client-side-setup.mdx index b2b03515..fa70fd71 100644 --- a/installation/client-side-setup.mdx +++ b/installation/client-side-setup.mdx @@ -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: @@ -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: - + diff --git a/installation/quickstart-guide.mdx b/installation/quickstart-guide.mdx index 6e10daa6..88b864cd 100644 --- a/installation/quickstart-guide.mdx +++ b/installation/quickstart-guide.mdx @@ -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) diff --git a/snippets/client-sdks.mdx b/snippets/client-sdks.mdx index d770141c..7013b2bd 100644 --- a/snippets/client-sdks.mdx +++ b/snippets/client-sdks.mdx @@ -9,9 +9,7 @@ Currently in an alpha release. - - Currently in a beta release. - + Currently in a beta release.