diff --git a/client-sdks/reference/flutter.mdx b/client-sdks/reference/flutter.mdx index 19f93178..605eef96 100644 --- a/client-sdks/reference/flutter.mdx +++ b/client-sdks/reference/flutter.mdx @@ -287,7 +287,7 @@ class TodoList { ### Fetching a Single Item -The [get](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/get.html) method executes a read-only (SELECT) query and returns a single result. It throws an exception if no result is found. Use [getOptional](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/getOptional.html) to return a single optional result (returns `null` if no result is found). +The [get](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/get.html) method executes a read-only (SELECT) query and returns a single result. It throws an exception if no result is found. Use [getOptional](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/getOptional.html) to return a single optional result (returns `null` if no result is found). The following is an example of selecting a list item by ID: ```dart lib/widgets/lists_widget.dart @@ -302,7 +302,7 @@ Future find(id) async { ### Querying Items (PowerSync.getAll) -The [getAll](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/getAll.html) method returns a set of rows from a table. +The [getAll](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/getAll.html) method returns a set of rows from a table. ```dart lib/widgets/lists_widget.dart import 'package:powersync/sqlite3.dart'; @@ -317,13 +317,13 @@ Future> getLists() async { ### Watching Queries (PowerSync.watch) -The [watch](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/watch.html) method executes a read query whenever a change to a dependent table is made. +The [watch](https://pub.dev/documentation/powersync/latest/powersync/PowerSyncDatabase/watch.html) method executes a read query whenever a change to a dependent table is made. ### Mutations (PowerSync.execute) -The [execute](https://pub.dev/documentation/powersync/latest/powersync/PowerSyncDatabase/execute.html) method can be used for executing single SQLite write statements. +The [execute](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/execute.html) method can be used for executing single SQLite write statements. ```dart lib/widgets/todos_widget.dart {12-15} import 'package:flutter/material.dart'; diff --git a/client-sdks/reference/javascript-web.mdx b/client-sdks/reference/javascript-web.mdx index b0471d8f..bb50f199 100644 --- a/client-sdks/reference/javascript-web.mdx +++ b/client-sdks/reference/javascript-web.mdx @@ -311,7 +311,7 @@ logger.setLevel(LogLevel.DEBUG); Enable verbose output in the developer tools for detailed logs. -Additionally, the [WASQLiteDBAdapter](https://powersync-ja.github.io/powersync-js/web-sdk/classes/WASQLiteDBAdapter) opens SQLite connections inside a shared web worker. This worker can be inspected in Chrome by accessing: +Additionally, the [WASQLiteOpenFactory](https://powersync-ja.github.io/powersync-js/web-sdk/classes/WASQLiteOpenFactory.html) opens SQLite connections inside a shared web worker. This worker can be inspected in Chrome by accessing: ``` chrome://inspect/#workers diff --git a/client-sdks/reference/kotlin.mdx b/client-sdks/reference/kotlin.mdx index a532f07f..4be3628c 100644 --- a/client-sdks/reference/kotlin.mdx +++ b/client-sdks/reference/kotlin.mdx @@ -176,7 +176,7 @@ import com.powersync.PowerSyncDatabase class MyConnector : PowerSyncBackendConnector() { override suspend fun fetchCredentials(): PowerSyncCredentials { // implement fetchCredentials to obtain the necessary credentials to connect to your backend - // See an example implementation in https://github.com/powersync-ja/powersync-kotlin/blob/main/connectors/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt + // See an example implementation in https://github.com/powersync-ja/powersync-kotlin/blob/main/integrations/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt return { endpoint: '[Your PowerSync instance URL or self-hosted endpoint]', @@ -194,7 +194,7 @@ class MyConnector : PowerSyncBackendConnector() { } ``` -**Note**: If you are using Supabase, you can use [SupabaseConnector.kt](https://github.com/powersync-ja/powersync-kotlin/blob/main/connectors/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt) as a starting point. +**Note**: If you are using Supabase, you can use [SupabaseConnector.kt](https://github.com/powersync-ja/powersync-kotlin/blob/main/integrations/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt) as a starting point. ## Using PowerSync: CRUD functions diff --git a/client-sdks/usage-examples.mdx b/client-sdks/usage-examples.mdx index 09c4863b..ac7a4669 100644 --- a/client-sdks/usage-examples.mdx +++ b/client-sdks/usage-examples.mdx @@ -17,7 +17,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call Read and write transactions present a context where multiple changes can be made then finally committed to the DB or rolled back. This ensures that either all the changes get persisted, or no change is made to the DB (in the case of a rollback or exception). - The [writeTransaction(callback)](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/writeTransaction.html) method combines all writes into a single transaction, only committing to persistent storage once. + The [writeTransaction(callback)](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/writeTransaction.html) method combines all writes into a single transaction, only committing to persistent storage once. ```dart deleteList(SqliteDatabase db, String id) async { @@ -30,7 +30,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call } ``` - Also see [readTransaction(callback)](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/readTransaction.html) + Also see [readTransaction(callback)](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/readTransaction.html) @@ -233,7 +233,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call - Use [watch](https://pub.dev/documentation/powersync/latest/sqlite_async/SqliteQueries/watch.html) to watch for changes to the dependent tables of any SQL query. + Use [watch](https://pub.dev/documentation/powersync/latest/powersync/PowerSyncDatabase/watch.html) to watch for changes to the dependent tables of any SQL query. @@ -342,7 +342,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call - Use [execute](https://pub.dev/documentation/powersync/latest/powersync/PowerSyncDatabase/execute.html) to run INSERT, UPDATE or DELETE queries. + Use [execute](https://pub.dev/documentation/sqlite_async/latest/sqlite_async/SqliteConnection/execute.html) to run INSERT, UPDATE or DELETE queries. ```dart FloatingActionButton( @@ -559,7 +559,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call - Override `uploadData` to send local updates to your backend service. If you are using Supabase, see [SupabaseConnector.kt](https://github.com/powersync-ja/powersync-kotlin/blob/main/connectors/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt) for a complete implementation. + Override `uploadData` to send local updates to your backend service. If you are using Supabase, see [SupabaseConnector.kt](https://github.com/powersync-ja/powersync-kotlin/blob/main/integrations/supabase/src/commonMain/kotlin/com/powersync/connector/supabase/SupabaseConnector.kt) for a complete implementation. ```kotlin /** @@ -1380,7 +1380,7 @@ import JavaScriptCallbackWatch from '/snippets/basic-watch-query-javascript-call ``` Also see: - - [SyncDownloadProgress API](https://powersync-ja.github.io/powersync-kotlin/core/com.powersync.sync/-sync-download-progress/index.html) + - [SyncDownloadProgress API](https://powersync-ja.github.io/powersync-kotlin/common/com.powersync.sync/-sync-download-progress/index.html) - [Demo component](https://github.com/powersync-ja/powersync-kotlin/blob/main/demos/supabase-todolist/shared/src/commonMain/kotlin/com/powersync/demos/components/GuardBySync.kt) diff --git a/configuration/source-db/setup.mdx b/configuration/source-db/setup.mdx index 113f496e..05892920 100644 --- a/configuration/source-db/setup.mdx +++ b/configuration/source-db/setup.mdx @@ -340,7 +340,7 @@ Post-images can be configured for PowerSync instances as follows: Configure `post_images` in the `service.yaml` file. diff --git a/handling-writes/custom-write-checkpoints.mdx b/handling-writes/custom-write-checkpoints.mdx index 95969a5c..1fcb775d 100644 --- a/handling-writes/custom-write-checkpoints.mdx +++ b/handling-writes/custom-write-checkpoints.mdx @@ -11,7 +11,7 @@ Custom Write Checkpoints are available for customers on our [Team and Enterprise To ensure [consistency](/architecture/consistency), PowerSync relies on Write Checkpoints. These checkpoints ensure that clients have uploaded their own local changes/mutations to the server before applying downloaded data from the server to the local database. -The essential requirement is that the client must get a Write Checkpoint after uploading its last write/mutation. Then, when downloading data from the server, the client checks whether the Write Checkpoint is part of the largest [sync checkpoint](https://github.com/powersync-ja/powersync-service/blob/main/docs/sync-protocol.md) received from the server (i.e. from the PowerSync Service). If it is, the client applies the server-side state to the local database. +The essential requirement is that the client must get a Write Checkpoint after uploading its last write/mutation. Then, when downloading data from the server, the client checks whether the Write Checkpoint is part of the largest [sync checkpoint](https://github.com/powersync-ja/powersync-service/blob/main/docs/specs/sync-protocol.md) received from the server (i.e. from the PowerSync Service). If it is, the client applies the server-side state to the local database. The default Write Checkpoints implementation relies on uploads being acknowledged _synchronously_, i.e. the change persists in the source database (to which PowerSync is connected) before the [`uploadData` call](/configuration/app-backend/client-side-integration) completes. diff --git a/integrations/serverpod.mdx b/integrations/serverpod.mdx index 69e4262e..05f404b9 100644 --- a/integrations/serverpod.mdx +++ b/integrations/serverpod.mdx @@ -268,7 +268,7 @@ For security, it is crucial each user only has access to their own bucket. This 3. In the `sync_rules` section, you reference properties of the created JWTs to control data visible to the connecting clients. In this guide, we will use a single virtual user for everything. For real projects, follow -[Serverpod documentation on authentication](https://docs.serverpod.dev/tutorials/guides/authentication). +[Serverpod documentation on authentication](https://docs.serverpod.dev/concepts/authentication/setup). PowerSync needs two endpoints, one to request a JWT and one to upload local writes from clients to the backend source database. In `notes_server/lib/src/powersync_endpoint.dart`, create those endpoints: diff --git a/intro/examples.mdx b/intro/examples.mdx index 6c9c15a4..eafe6358 100644 --- a/intro/examples.mdx +++ b/intro/examples.mdx @@ -235,8 +235,6 @@ This is a list of additional projects we've spotted from community members 🙌 - [Account Optional Apps with PowerSync](https://www.maxmntl.com/blog/optional-account-powersync/) - Tutorial for starting your new user app experience fully local (without sync,) and then to switch them to a synced experience -- [Building an Offline-First Chat App Using PowerSync and Supabase](https://bndkt.com/blog/2023/building-an-offline-first-chat-app-using-powersync-and-supabase) - - Postgres (Supabase) + React Native + Expo + Tamagui - [Building an Offline-First Mobile App with PowerSync](https://blog.stackademic.com/building-an-offline-first-mobile-app-with-powersync-40674d8b7ea1) - Postgres + Flutter + Nest.js + Prisma ORM + Firebase Auth - [Implementing Local-First Architecture: A Guide to MongoDB Cluster and PowerSync Integration](https://blog.stackademic.com/implementing-local-first-architecture-a-guide-to-mongodb-cluster-and-powersync-integration-6b21fa8059a1) diff --git a/maintenance-ops/compacting-buckets.mdx b/maintenance-ops/compacting-buckets.mdx index fb5c9672..ee896790 100644 --- a/maintenance-ops/compacting-buckets.mdx +++ b/maintenance-ops/compacting-buckets.mdx @@ -185,4 +185,4 @@ Soon, we will use [incremental reprocessing](https://github.com/orgs/powersync-j ## Technical Details -See the [documentation](https://github.com/powersync-ja/powersync-service/blob/main/docs/compacting-operations.md) in the `powersync-service` repo for more technical details on compacting. \ No newline at end of file +See the [documentation](https://github.com/powersync-ja/powersync-service/blob/main/docs/storage/compacting-operations.md) in the `powersync-service` repo for more technical details on compacting. \ No newline at end of file diff --git a/maintenance-ops/production-readiness-guide.mdx b/maintenance-ops/production-readiness-guide.mdx index 2dccf118..a34057b0 100644 --- a/maintenance-ops/production-readiness-guide.mdx +++ b/maintenance-ops/production-readiness-guide.mdx @@ -27,7 +27,7 @@ We recommend adding a view/screen in your application that offers diagnostic inf Each of the PowerSync Client SDKs have the `SyncStatus` class that can be used to access the fields mentioned above. - [Flutter](https://pub.dev/documentation/powersync/latest/powersync/SyncStatus-class.html) -- [Kotlin](https://powersync-ja.github.io/powersync-kotlin/core/com.powersync.sync/-sync-status/index.html?query=data%20class%20SyncStatus%20:%20SyncStatusData) +- [Kotlin](https://powersync-ja.github.io/powersync-kotlin/common/com.powersync.sync/-sync-status/index.html) - [Swift](https://powersync-ja.github.io/powersync-swift/documentation/powersync/syncstatusdata) - [Web](https://powersync-ja.github.io/powersync-js/web-sdk/classes/SyncStatus) - [React Native](https://powersync-ja.github.io/powersync-js/react-native-sdk/classes/SyncStatus) diff --git a/sync/advanced/prioritized-sync.mdx b/sync/advanced/prioritized-sync.mdx index c6d1d814..bc5a1340 100644 --- a/sync/advanced/prioritized-sync.mdx +++ b/sync/advanced/prioritized-sync.mdx @@ -258,5 +258,5 @@ Example implementations of prioritized sync are also available in the following - Flutter: [Supabase To-Do List](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) - Kotlin: - [Supabase To-Do List (KMP)](https://github.com/powersync-ja/powersync-kotlin/blob/main/demos/supabase-todolist/shared/src/commonMain/kotlin/com/powersync/demos/App.kt#L46) - - [Supabase To-Do List (Android)](https://github.com/powersync-ja/powersync-kotlin/blob/main/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt#L69) + - [Supabase To-Do List (Android)](https://github.com/powersync-ja/powersync-kotlin/blob/main/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt#L69) - Swift: [Supabase To-Do List](https://github.com/powersync-ja/powersync-swift/tree/main/Demos/PowerSyncExample) \ No newline at end of file