diff --git a/client-sdks/orms/kotlin/room.mdx b/client-sdks/orms/kotlin/room.mdx index f9b30860..e31aa3fd 100644 --- a/client-sdks/orms/kotlin/room.mdx +++ b/client-sdks/orms/kotlin/room.mdx @@ -99,32 +99,14 @@ To inform PowerSync about that table, include it as a `RawTable` in the schema: ```Kotlin val schema = Schema( + // For more information on raw tables, see https://docs.powersync.com/client-sdks/advanced/raw-tables RawTable( name = "todos", - put = - PendingStatement( - "INSERT OR REPLACE INTO todos (id, description, created_by) VALUES (?, ?, ?)", - listOf( - PendingStatementParameter.Id, - PendingStatementParameter.Column("description"), - PendingStatementParameter.Column("created_by"), - ), - ), - delete = - PendingStatement( - "DELETE FROM todos WHERE id = ?", - listOf(PendingStatementParameter.Id), - ), + schema = RawTableSchema(), ), ) ``` -Here: - -- The SQL statements must match the schema created by Room. -- The `RawTable.name` and `PendingStatementParameter.Column` values must match the table and column names of the synced - table from the PowerSync Service, derived from your Sync Rules. - For more details, see [raw tables](/client-sdks/advanced/raw-tables). After these steps, you can open your Room database like you normally would. Then, you can use the @@ -146,13 +128,7 @@ The returned `PowerSyncDatabase` behaves just like a regular PowerSync database, `connect` to establish a sync connection: ```Kotlin -powersync.connect( - YourBackendConnector(), - options = SyncOptions( - // Raw tables require the new client implementation. - newClientImplementation = true - ) -) +powersync.connect(YourBackendConnector()) ``` ## Usage diff --git a/sync/streams/migration.mdx b/sync/streams/migration.mdx index 8df67f40..a13ea99a 100644 --- a/sync/streams/migration.mdx +++ b/sync/streams/migration.mdx @@ -53,8 +53,8 @@ If you want "sync everything upfront" behavior (like Sync Rules), set [`auto_sub | Node.js | v0.11.0 | v0.16.0 | | Capacitor | v0.0.1 | v0.3.0 | | Tauri | v0.0.1 | Always (Rust client only) | -| Dart/Flutter | v1.16.0 | v1.17.0 | -| Kotlin | v1.7.0 | v1.9.0 | +| Dart/Flutter | v1.16.0 | v1.17.0 (legacy client removed in v2.0.0) | +| Kotlin | v1.7.0 | v1.9.0 (legacy client removed in v1.12.0) | | Swift | v1.11.0 | v1.8.0 | | .NET | v0.0.8-alpha.1 | v0.0.5-alpha.1 | @@ -79,16 +79,19 @@ database.connect( ); ``` +As of Dart SDK v2.0.0, the legacy sync client has been removed and the Rust client is the only implementation. The `syncImplementation` parameter is no longer needed. + **Kotlin:** ```kotlin database.connect(MyConnector(), options = SyncOptions( newClientImplementation = true, )) ``` +As of Kotlin SDK v1.12.0, the legacy sync client has been removed and the Rust client is the only implementation. The `newClientImplementation` parameter is no longer needed. **Swift:** ```swift -@_spi(PowerSyncExperimental) import PowerSync +import PowerSync try await db.connect(connector: connector, options: ConnectOptions( newClientImplementation: true,