Skip to content

Commit

Permalink
restructure the description base on the review
Browse files Browse the repository at this point in the history
  • Loading branch information
daneshk committed Sep 9, 2024
1 parent f173c26 commit 5ca97b5
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions examples/persist-create/persist_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add the `Employee` entity with the following fields in the `model.bal` file insi
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, you can persist record/records to the data store with the `post` resource method.

Expand Down
5 changes: 3 additions & 2 deletions examples/persist-delete/persist_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.

#### Use the generated client API
Using the generated client API, you can delete records from the data store with the `delete` resource method.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-filtering/persist_filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, we can retrieve all records from the data store. The `get` resource method returns a stream of records. We can iterate through the stream and print the records.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-get-all/persist_get_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, we can retrieve all records from the data store. The `get` resource method returns a stream of records. We can iterate through the stream and print the records.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-get-by-key/persist_get_by_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, you can retrieve the record by key from the data store. The `get by key` resource method returns a record or error if no records are found for the given key.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-relation-queries/persist_relation_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add `Employee`, `Department`, `Workspace`, and `Building` entities with relation
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, you can retrieve the record with relations from the data store with both `get` and `get by key` resource methods.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-select-fields/persist_select_fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, you can retrieve the record with selected fields from the data store with both `get` and `get by key` resource methods.

Expand Down
4 changes: 2 additions & 2 deletions examples/persist-update/persist_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Add `Employee` entity with the following fields in the `model.bal` file inside t
::: code persist_model.bal :::

#### Generate client APIs
> **Note:** The client APIs can be generated using the `bal persist generate` command which is one time generation and the generated client code is a part of the project. We can also integrate the client code generation with the build process of the project by executing the `bal persist add` command. This will add the client code generation as a build task in the `Ballerina.toml` file. For more information, see [Persist CLI Commands](learn/persist-cli-tool/).
Execute the command below to generate the Ballerina client API.

::: out persist_generate.out :::

> **Note:** The `bal persist generate` command is a one-time generation task, and the generated client code is a part of the project. We can also integrate the client code generation with the project's build process by executing the `bal persist add` command. This command will add the client code generation as a build task in the `Ballerina.toml` file. See [Persist CLI Commands](learn/persist-cli-tool/) for more information.
#### Use the generated client API
Using the generated client API, you can update the record in the data store with the `put` resource method.

Expand Down

0 comments on commit 5ca97b5

Please sign in to comment.