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
2 changes: 1 addition & 1 deletion client-sdk-references/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class MyBackendConnector extends PowerSyncBackendConnector {
// Implement uploadData to send local changes to your backend service
// You can omit this method if you only want to sync data from the server to the client

// See example implementation here: https://docs.powersync.com/client-sdk-references/flutter#id-3.-integrate-with-your-backend
// See example implementation here: https://docs.powersync.com/client-sdk-references/flutter#3-integrate-with-your-backend
}
}

Expand Down
2 changes: 1 addition & 1 deletion client-sdk-references/javascript-web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class Connector {
// Implement uploadData to send local changes to your backend service.
// You can omit this method if you only want to sync data from the database to the client

// See example implementation here: https://docs.powersync.com/client-sdk-references/javascript-web#id-3.-integrate-with-your-backend
// See example implementation here: https://docs.powersync.com/client-sdk-references/javascript-web#3-integrate-with-your-backend
}
```

Expand Down
6 changes: 3 additions & 3 deletions client-sdk-references/kotlin-multiplatform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ Once the PowerSync instance is configured you can start using the SQLite DB func
The most commonly used CRUD functions to interact with your SQLite data are:

* [PowerSyncDatabase.get](/client-sdk-references/kotlin-multiplatform#fetching-a-single-item) \- get (SELECT) a single row from a table.
* [PowerSyncDatabase.getAll](/client-sdk-references/kotlin-multiplatform#querying-items-powersync.getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/kotlin-multiplatform#watching-queries-powersync.watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/kotlin-multiplatform#mutations-powersync.execute) \- execute a write (INSERT/UPDATE/DELETE) query.
* [PowerSyncDatabase.getAll](/client-sdk-references/kotlin-multiplatform#querying-items-powersync-getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/kotlin-multiplatform#watching-queries-powersync-watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/kotlin-multiplatform#mutations-powersync-execute) \- execute a write (INSERT/UPDATE/DELETE) query.

### Fetching a Single Item

Expand Down
8 changes: 4 additions & 4 deletions client-sdk-references/react-native-and-expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class Connector {
// Implement uploadData to send local changes to your backend service.
// You can omit this method if you only want to sync data from the database to the client

// See example implementation here:https://docs.powersync.com/client-sdk-references/react-native-and-expo#id-3.-integrate-with-your-backend
// See example implementation here:https://docs.powersync.com/client-sdk-references/react-native-and-expo#3-integrate-with-your-backend
}
```

Expand All @@ -227,9 +227,9 @@ Once the PowerSync instance is configured you can start using the SQLite DB func
The most commonly used CRUD functions to interact with your SQLite data are:

* [PowerSyncDatabase.get](/client-sdk-references/react-native-and-expo#fetching-a-single-item) \- get (SELECT) a single row from a table.
* [PowerSyncDatabase.getAll](/client-sdk-references/react-native-and-expo#querying-items-powersync.getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/react-native-and-expo#watching-queries-powersync.watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/react-native-and-expo#mutations-powersync.execute) \- execute a write (INSERT/UPDATE/DELETE) query.
* [PowerSyncDatabase.getAll](/client-sdk-references/react-native-and-expo#querying-items-powersync-getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/react-native-and-expo#watching-queries-powersync-watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/react-native-and-expo#mutations-powersync-execute) \- execute a write (INSERT/UPDATE/DELETE) query.

### Fetching a Single Item

Expand Down
6 changes: 3 additions & 3 deletions client-sdk-references/swift.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ The most commonly used CRUD functions to interact with your SQLite data are:

* [PowerSyncDatabase.get](/client-sdk-references/swift#fetching-a-single-item) \- get (SELECT) a single row from a table.
* [PowerSyncDatabase.getOptional](/client-sdk-references/swift#fetching-a-single-item) \- get (SELECT) a single row from a table and return `null` if not found.
* [PowerSyncDatabase.getAll](/client-sdk-references/swift#querying-items-powersync.getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/swift#watching-queries-powersync.watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/swift#mutations-powersync.execute) \- execute a write (INSERT/UPDATE/DELETE) query.
* [PowerSyncDatabase.getAll](/client-sdk-references/swift#querying-items-powersync-getall) \- get (SELECT) a set of rows from a table.
* [PowerSyncDatabase.watch](/client-sdk-references/swift#watching-queries-powersync-watch) \- execute a read query every time source tables are modified.
* [PowerSyncDatabase.execute](/client-sdk-references/swift#mutations-powersync-execute) \- execute a write (INSERT/UPDATE/DELETE) query.

### Fetching a Single Item ( PowerSync.get / PowerSync.getOptional)

Expand Down
10 changes: 5 additions & 5 deletions installation/client-side-setup/define-your-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ For an example implementation of the client-side schema, see the _Getting Starte

### <Icon icon="flutter" iconType="solid" size="24"/> Flutter

* [1\. Define the Schema](/client-sdk-references/flutter#id-1.-define-the-schema)
* [1\. Define the Schema](/client-sdk-references/flutter#1-define-the-schema)

### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo

* [1\. Define the Schema](/client-sdk-references/react-native-and-expo#id-1.-define-the-schema)
* [1\. Define the Schema](/client-sdk-references/react-native-and-expo#1-define-the-schema)

### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web

* [1\. Define the Schema](/client-sdk-references/javascript-web#id-1.-define-the-schema)
* [1\. Define the Schema](/client-sdk-references/javascript-web#1-define-the-schema)

### <Icon icon="flag" iconType="solid" size="24"/> Kotlin Multiplatform

* [1\. Define the Schema](/client-sdk-references/kotlin-multiplatform#id-1.-define-the-schema)
* [1\. Define the Schema](/client-sdk-references/kotlin-multiplatform#1-define-the-schema)

### <Icon icon="swift" iconType="solid" size="24"/> Swift

* [1\. Define the Schema](/client-sdk-references/swift#id-1.-define-the-schema)
* [1\. Define the Schema](/client-sdk-references/swift#1-define-the-schema)

## ORM Support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ For an example implementation of instantiating the client-side database, see the

### <Icon icon="flutter" iconType="solid" size="24"/> Flutter

* [2\. Instantiate the PowerSync Database](/client-sdk-references/flutter#id-2.-instantiate-the-powersync-database)
* [2\. Instantiate the PowerSync Database](/client-sdk-references/flutter#2-instantiate-the-powersync-database)

### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo

* [2\. Instantiate the PowerSync Database](/client-sdk-references/react-native-and-expo#id-2.-instantiate-the-powersync-database)
* [2\. Instantiate the PowerSync Database](/client-sdk-references/react-native-and-expo#2-instantiate-the-powersync-database)

### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web

* [2\. Instantiate the PowerSync Database](/client-sdk-references/javascript-web#id-2.-instantiate-the-powersync-database)
* [2\. Instantiate the PowerSync Database](/client-sdk-references/javascript-web#2-instantiate-the-powersync-database)

### <Icon icon="flag" iconType="solid" size="24"/> Kotlin Multiplatform

* [2\. Instantiate the PowerSync Database](/client-sdk-references/kotlin-multiplatform#id-2.-instantiate-the-powersync-database)
* [2\. Instantiate the PowerSync Database](/client-sdk-references/kotlin-multiplatform#2-instantiate-the-powersync-database)

### <Icon icon="swift" iconType="solid" size="24"/> Swift

* [2\. Instantiate the PowerSync Database](/client-sdk-references/swift#id-2.-instantiate-the-powersync-database)
* [2\. Instantiate the PowerSync Database](/client-sdk-references/swift#2-instantiate-the-powersync-database)

## Additional Examples

Expand Down
10 changes: 5 additions & 5 deletions installation/client-side-setup/integrating-with-your-backend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ For an example implementation of a PowerSync 'backend connector', see the _Getti

### <Icon icon="flutter" iconType="solid" size="24"/> Flutter

* [3\. Integrate with your Backend](/client-sdk-references/flutter#id-3.-integrate-with-your-backend)
* [3\. Integrate with your Backend](/client-sdk-references/flutter#3-integrate-with-your-backend)

### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo

* [3\. Integrate with your Backend](/client-sdk-references/react-native-and-expo#id-3.-integrate-with-your-backend)
* [3\. Integrate with your Backend](/client-sdk-references/react-native-and-expo#3-integrate-with-your-backend)

### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web

* [3\. Integrate with your Backend](/client-sdk-references/javascript-web#id-3.-integrate-with-your-backend)
* [3\. Integrate with your Backend](/client-sdk-references/javascript-web#3-integrate-with-your-backend)

### <Icon icon="flag" iconType="solid" size="24"/> Kotlin Multiplatform

* [3\. Integrate with your Backend](/client-sdk-references/kotlin-multiplatform#id-3.-integrate-with-your-backend)
* [3\. Integrate with your Backend](/client-sdk-references/kotlin-multiplatform#3-integrate-with-your-backend)

### <Icon icon="swift" iconType="solid" size="24"/> Swift

* [3\. Integrate with your Backend](/client-sdk-references/swift#id-3.-integrate-with-your-backend)
* [3\. Integrate with your Backend](/client-sdk-references/swift#3-integrate-with-your-backend)

## More Examples

Expand Down
8 changes: 4 additions & 4 deletions self-hosting/installation/client-side-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ title: "Client-Side Setup"
We recommend splitting up your client-side implementation into four phases:

<CardGroup>
<Card title="Generate development token" icon="key" href="/self-hosting/installation/client-side-setup#id-1.-generate-development-token" horizontal/> <Card title="Run Diagnostics app" icon="bug" href="/self-hosting/installation/client-side-setup#id-2.-run-the-diagnostics-app-using-a-development-token" horizontal/>
<Card title="Use client SDK with token" icon="code" href="/self-hosting/installation/client-side-setup#id-3.-use-the-client-sdk-with-development-token" horizontal/>
<Card title="Implement authentication" icon="lock" href="/self-hosting/installation/client-side-setup#id-4.-implement-authentication" horizontal/>
<Card title="Generate development token" icon="key" href="/self-hosting/installation/client-side-setup#1-generate-development-token" horizontal/> <Card title="Run Diagnostics app" icon="bug" href="/self-hosting/installation/client-side-setup#2-run-the-diagnostics-app-using-a-development-token" horizontal/>
<Card title="Use client SDK with token" icon="code" href="/self-hosting/installation/client-side-setup#3-use-the-client-sdk-with-development-token" horizontal/>
<Card title="Implement authentication" icon="lock" href="/self-hosting/installation/client-side-setup#4-implement-authentication" horizontal/>
</CardGroup>

## 1\. Generate Development Token
Expand Down Expand Up @@ -80,7 +80,7 @@ Enter your PowerSync Service endpoint (see the port number specified in your con
<Info>
**Checkpoint:**

Inspect your global bucket and synced table (from the [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup) section) in the diagnostics app — these should match the sync rules you [defined previously](/self-hosting/installation/powersync-service-setup#sync-rules).
Inspect your global bucket and synced table (from the [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup) section) in the diagnostics app — these should match the sync rules you [defined previously](/self-hosting/installation/powersync-service-setup#1.sync-rules).
</Info>

## 3\. Use the Client SDK with a development token
Expand Down
2 changes: 1 addition & 1 deletion usage/sync-rules/advanced-topics/client-parameters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Client parameters are parameters that are passed to the PowerSync Service instan

PowerSync already supports using **token parameters** in parameter queries. An example of a token parameter is a user ID, and this is commonly used to filter synced data by the user. These parameters are embedded in the JWT [authentication token](/installation/authentication-setup/custom), and therefore can be considered trusted and can be used for access control purposes.

**Client parameters** are specified directly by the client (i.e. not through the JWT authentication token). The advantage of client parameters is that they give client-side control over what data to sync, and can therefore be used to further filter or limit synced data. A common use case is [lazy-loading](/usage/use-case-examples/infinite-scrolling#id-2-control-data-sync-using-client-parameters), where data is split into pages and a client parameter can be used to specify which page(s) to sync to a user, and this can update dynamically as the user paginates (or reaches the end of an infinite-scrolling feed).
**Client parameters** are specified directly by the client (i.e. not through the JWT authentication token). The advantage of client parameters is that they give client-side control over what data to sync, and can therefore be used to further filter or limit synced data. A common use case is [lazy-loading](/usage/use-case-examples/infinite-scrolling#2-control-data-sync-using-client-parameters), where data is split into pages and a client parameter can be used to specify which page(s) to sync to a user, and this can update dynamically as the user paginates (or reaches the end of an infinite-scrolling feed).

### Usage

Expand Down