aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Blinkov <ivan@ydb.tech>2024-09-03 13:58:41 +0700
committerGitHub <noreply@github.com>2024-09-03 09:58:41 +0300
commitf759853866bc63ca460a17a8545182280c473f2b (patch)
tree02b9815cc2a0da411e708b620be040757ac0b279
parent9a0a109e36df81cefcd2abf4ed61f167b7519f07 (diff)
downloadydb-f759853866bc63ca460a17a8545182280c473f2b.tar.gz
[docs] some fixes for en/core/dev/example-app/ (#8648)
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/auxilary/addition.md2
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/auxilary/pragmatablepathprefix.md5
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/index.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/01_init.md9
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/02_create_table.md5
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/03_write_queries.md3
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/04_query_processing.md5
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/06_param_queries.md3
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/07_param_prep_queries.md5
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/08_scan_query.md3
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/09_multistep_transactions.md3
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/10_transaction_control.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/11_async_requests.md2
-rw-r--r--ydb/docs/en/core/dev/example-app/_includes/steps/50_error_handling.md2
-rw-r--r--ydb/docs/en/core/dev/example-app/go/_includes/run_custom.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/go/index.md20
-rw-r--r--ydb/docs/en/core/dev/example-app/java/_includes/run_custom.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/java/index.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/python/_includes/run_custom.md4
-rw-r--r--ydb/docs/en/core/dev/example-app/python/index.md4
20 files changed, 41 insertions, 54 deletions
diff --git a/ydb/docs/en/core/dev/example-app/_includes/auxilary/addition.md b/ydb/docs/en/core/dev/example-app/_includes/auxilary/addition.md
index 22977978e8..231e4424ad 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/auxilary/addition.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/auxilary/addition.md
@@ -1,6 +1,6 @@
{% note info %}
-The article is being updated.
+The article is currently being updated.
{% endnote %}
diff --git a/ydb/docs/en/core/dev/example-app/_includes/auxilary/pragmatablepathprefix.md b/ydb/docs/en/core/dev/example-app/_includes/auxilary/pragmatablepathprefix.md
index c7dd5232cc..ae5eeadd18 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/auxilary/pragmatablepathprefix.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/auxilary/pragmatablepathprefix.md
@@ -1,9 +1,8 @@
-`PRAGMA TablePathPrefix` adds a specified prefix to the database table paths. It uses standard file system path concatenation: i.e., it supports parent folder referencing and requires no trailing slash. For example:
+`PRAGMA TablePathPrefix` adds a specified prefix to the table paths. It uses standard filesystem path concatenation, meaning it supports parent folder referencing and does not require a trailing slash. For example:
```sql
PRAGMA TablePathPrefix = "/cluster/database";
SELECT * FROM episodes;
```
-For more information about PRAGMA in YQL, see the [YQL documentation](../../../../yql/reference/index.md).
-
+For more information about `PRAGMA` in YQL, refer to the [YQL documentation](../../../../yql/reference/index.md).
diff --git a/ydb/docs/en/core/dev/example-app/_includes/index.md b/ydb/docs/en/core/dev/example-app/_includes/index.md
index e5acab8b4a..40f6419f86 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/index.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/index.md
@@ -1,6 +1,6 @@
# Example applications working with {{ ydb-short-name }}
-This section describes the code of same-type test apps implemented using {{ ydb-short-name }} SDKs in different programming languages:
+This section outlines the implementation of example applications, all designed to perform similar functions, using the {{ ydb-short-name }} SDKs across various programming languages. Each app is developed to demonstrate how a respective SDK can be utilized in a specific language.
{% if oss %}
@@ -14,7 +14,7 @@ This section describes the code of same-type test apps implemented using {{ ydb-
{% node info %}
-Additional information on how these example applications work is available in [{{ ydb-short-name }} SDK reference documentation](../../../reference/ydb-sdk/index.md).
+Refer to [{{ ydb-short-name }} SDK reference documentation](../../../reference/ydb-sdk/index.md) for more details.
{% endnote %}
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/01_init.md b/ydb/docs/en/core/dev/example-app/_includes/steps/01_init.md
index b49aab5618..5f0fea31a3 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/01_init.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/01_init.md
@@ -1,8 +1,7 @@
## Initializing a database connection {#init}
-To interact with {{ ydb-short-name }}, create an instance of the driver, client, and session:
-
-* The {{ ydb-short-name }} driver lets the app and {{ ydb-short-name }} interact at the transport layer. The driver must exist throughout the {{ ydb-short-name }} access lifecycle and be initialized before creating a client or session.
-* The {{ ydb-short-name }} client runs on top of the {{ ydb-short-name }} driver and enables the handling of entities and transactions.
-* The {{ ydb-short-name }} session contains information about executed transactions and prepared queries, and is part of the {{ ydb-short-name }} client context.
+To interact with {{ ydb-short-name }}, create instances of the driver, client, and session:
+* The {{ ydb-short-name }} driver facilitates interaction between the app and {{ ydb-short-name }} nodes at the transport layer. It must be initialized before creating a client or session and must persist throughout the {{ ydb-short-name }} access lifecycle.
+* The {{ ydb-short-name }} client operates on top of the {{ ydb-short-name }} driver and enables the handling of entities and transactions.
+* The {{ ydb-short-name }} session, which is part of the {{ ydb-short-name }} client context, contains information about executed transactions and prepared queries. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/02_create_table.md b/ydb/docs/en/core/dev/example-app/_includes/steps/02_create_table.md
index e8771af94d..94f898b8ed 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/02_create_table.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/02_create_table.md
@@ -1,10 +1,9 @@
## Creating tables {#create-table}
-Creating tables to be used in operations on a test app. This step results in the creation of DB tables of the series directory data model:
+Create tables to be used in operations on a test app. This step results in the creation of database tables for the series directory data model:
- `Series`
- `Seasons`
- `Episodes`
-Once the tables are created, the method for getting information about data schema objects is called and the result of its execution is output.
-
+After the tables are created, a method for retrieving information about data schema objects is called, and the result of its execution is displayed. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/03_write_queries.md b/ydb/docs/en/core/dev/example-app/_includes/steps/03_write_queries.md
index 7133d6ee93..8fe26b5713 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/03_write_queries.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/03_write_queries.md
@@ -1,4 +1,3 @@
## Adding data {#write-queries}
-Adding data to the created tables using an [`UPSERT`](../../../../yql/reference/syntax/upsert_into.md) statement of [YQL](../../../../yql/reference/index.md). A data update request is sent within a single request to the server with transaction auto-commit mode enabled.
-
+Add data to the created tables using the [`UPSERT`](../../../../yql/reference/syntax/upsert_into.md) statement in [YQL](../../../../yql/reference/index.md). A data update request is sent to the server as a single request with transaction auto-commit mode enabled. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/04_query_processing.md b/ydb/docs/en/core/dev/example-app/_includes/steps/04_query_processing.md
index 2a20b353b6..8f46c12b9c 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/04_query_processing.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/04_query_processing.md
@@ -1,4 +1,3 @@
-## Retrieving data with a Select {#query-processing}
-
-Retrieving data using a [`SELECT`](../../../../yql/reference/syntax/select/index.md) statement in [YQL](../../../../yql/reference/index.md). Handling the retrieved data selection in the app.
+## Retrieving data {#query-processing}
+Retrieve data using a [`SELECT`](../../../../yql/reference/syntax/select/index.md) statement in [YQL](../../../../yql/reference/index.md). Handle the retrieved data selection in the app. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/06_param_queries.md b/ydb/docs/en/core/dev/example-app/_includes/steps/06_param_queries.md
index 3875d2bfcb..4d192247d6 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/06_param_queries.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/06_param_queries.md
@@ -1,4 +1,3 @@
## Parameterized queries {#param-queries}
-Querying data using parameters. This query execution option is preferable as it allows the server to reuse the query execution plan for subsequent calls and also protects from such vulnerabilities as [SQL Injection](https://en.wikipedia.org/wiki/SQL_injection).
-
+Query data using parameters. This query execution method is preferable because it allows the server to reuse the query execution plan for subsequent calls and protects against vulnerabilities such as [SQL injection](https://en.wikipedia.org/wiki/SQL_injection). \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/07_param_prep_queries.md b/ydb/docs/en/core/dev/example-app/_includes/steps/07_param_prep_queries.md
index 4b2a1abeb5..d6edc0472e 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/07_param_prep_queries.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/07_param_prep_queries.md
@@ -1,6 +1,5 @@
## Parameterized prepared queries {#param-prepared-queries}
-Parameterized prepared queries are saved as templates where specially formatted names are replaced by relevant parameter values each time you execute the query. Use parameterized queries to improve performance by reducing how often queries that only differ in parameter values are compiled and recompiled. The prepared query is stored in the session context.
-
-Code snippet for parameterized prepared queries:
+Parameterized prepared queries are saved as templates, where specially formatted placeholders are replaced with relevant parameter values each time the query is executed. Use parameterized queries to improve performance by reducing the need for frequent compilation and recompilation of queries that differ only in parameter values. The prepared query is stored in the session context.
+Code snippet for parameterized prepared queries: \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/08_scan_query.md b/ydb/docs/en/core/dev/example-app/_includes/steps/08_scan_query.md
index 63b8a9c01f..a2cb85f71c 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/08_scan_query.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/08_scan_query.md
@@ -1,4 +1,3 @@
## Scan queries {#scan-query}
-Making a [scan query](../../../../concepts/scan_query.md) that results in a data stream. Streaming lets you read an unlimited number of rows and amount of data.
-
+Execute a [scan query](../../../../concepts/scan_query.md) to produce a data stream. Streaming allows to read an unlimited number of rows and an unlimited amount of data. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/09_multistep_transactions.md b/ydb/docs/en/core/dev/example-app/_includes/steps/09_multistep_transactions.md
index c5a94abc43..626f7fe603 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/09_multistep_transactions.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/09_multistep_transactions.md
@@ -1,4 +1,3 @@
## Multistep transactions {#multistep-transactions}
-Multiple commands are executed within a single multistep transaction. The client-side code can be run between query executions. Using a transaction ensures that select queries made in its context are consistent with each other.
-
+Multiple statements can be executed within a single multistep transaction. Client-side code can run between query steps. Using a transaction ensures that queries executed in its context are consistent with each other. \ No newline at end of file
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/10_transaction_control.md b/ydb/docs/en/core/dev/example-app/_includes/steps/10_transaction_control.md
index 279e84005c..37a102b76a 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/10_transaction_control.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/10_transaction_control.md
@@ -1,6 +1,6 @@
## Managing transactions {#tcl}
-Transactions are managed through [TCL](../../../../concepts/transactions.md) Begin and Commit calls.
+Transactions are managed through [TCL](../../../../concepts/transactions.md) `Begin` and `Commit` calls.
-In most cases, instead of explicitly using Begin and Commit calls, it's better to use transaction control parameters in execute calls. This helps you avoid unnecessary requests to {{ ydb-short-name }} and run your queries more efficiently.
+In most cases, instead of explicitly using `Begin` and `Commit` calls, it's better to use transaction control parameters in execute calls. This allows to avoid additional requests to {{ ydb-short-name }} server and thus run queries more efficiently.
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/11_async_requests.md b/ydb/docs/en/core/dev/example-app/_includes/steps/11_async_requests.md
index 705f2d29c9..c7308d99d2 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/11_async_requests.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/11_async_requests.md
@@ -1 +1 @@
-## Streaming reading {#async-requests}
+## Streaming data reads {#async-requests}
diff --git a/ydb/docs/en/core/dev/example-app/_includes/steps/50_error_handling.md b/ydb/docs/en/core/dev/example-app/_includes/steps/50_error_handling.md
index 724a42ae91..fe61b5520a 100644
--- a/ydb/docs/en/core/dev/example-app/_includes/steps/50_error_handling.md
+++ b/ydb/docs/en/core/dev/example-app/_includes/steps/50_error_handling.md
@@ -1,4 +1,4 @@
-## Handling errors {#error-handling}
+## Error handling {#error-handling}
For more information about error handling, see [Error handling in the API](../../../../reference/ydb-sdk/error_handling.md).
diff --git a/ydb/docs/en/core/dev/example-app/go/_includes/run_custom.md b/ydb/docs/en/core/dev/example-app/go/_includes/run_custom.md
index a69862db01..8b07e52541 100644
--- a/ydb/docs/en/core/dev/example-app/go/_includes/run_custom.md
+++ b/ydb/docs/en/core/dev/example-app/go/_includes/run_custom.md
@@ -1,6 +1,6 @@
-To run the example against any available YDB database, you need to know the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database).
+To run the example against any available {{ ydb-short-name }} database, the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database) need to be provide.
-If authentication is enabled in the database, you also need to select the [authentication mode](../../../../concepts/auth.md) and get secrets (a token or username/password pair).
+If authentication is enabled for the database, the [authentication mode](../../../../concepts/auth.md) needs to be chosen and credentials (a token or a username/password pair) need to be provided.
Run the command as follows:
diff --git a/ydb/docs/en/core/dev/example-app/go/index.md b/ydb/docs/en/core/dev/example-app/go/index.md
index 17dbed3f95..74a8c1a48d 100644
--- a/ydb/docs/en/core/dev/example-app/go/index.md
+++ b/ydb/docs/en/core/dev/example-app/go/index.md
@@ -1,23 +1,21 @@
-# App in Go
+# Example app in Go
-This page contains a detailed description of the code of a [test app](https://github.com/ydb-platform/ydb-go-examples/tree/master/basic) that uses the {{ ydb-short-name }} [Go SDK](https://github.com/ydb-platform/ydb-go-sdk/v3).
+This page provides a detailed description of the code for a [test app](https://github.com/ydb-platform/ydb-go-examples/tree/master/basic) that uses the {{ ydb-short-name }} [Go SDK](https://github.com/ydb-platform/ydb-go-sdk/v3).
## Downloading and starting {#download}
-The following execution scenario is based on [git](https://git-scm.com/downloads) and [Go](https://go.dev/doc/install). Be sure to install the [YDB Go SDK](../../../reference/ydb-sdk/install.md).
+The following execution scenario is based on [Git](https://git-scm.com/downloads) and [Go](https://go.dev/doc/install). Make sure to install the [YDB Go SDK](../../../reference/ydb-sdk/install.md).
-Create a working directory and use it to run from the command line the command to clone the GitHub repository:
+Create a working directory and use it to run the following command from the command line to clone the GitHub repository:
```bash
git clone https://github.com/ydb-platform/ydb-go-examples/
```
-Next, from the same working directory, run the command to start the test app. The command will differ depending on the database to connect to.
+Next, from the same working directory, run the following command to start the test app:
{% include [run_options.md](_includes/run_options.md) %}
-
-
{% include [init.md](../_includes/steps/01_init.md) %}
To work with `YDB` in `Go`, import the `ydb-go-sdk` driver package:
@@ -65,11 +63,9 @@ if err != nil {
defer db.Close(ctx)
```
-The `db` object is an input point for working with `YDB` services.
-To work with the table service, use the `db.Table()` client.
-The client of the table service provides an `API` for making queries to tables.
-The most popular method is `db.Table().Do(ctx, op)`. It implements session creation in the background and the repeat attempts to execute the custom `op` operation where the created session is passed to the user's code.
-The session has an exhaustive `API` that lets you perform `DDL`, `DML`, `DQL`, and `TCL` requests.
+The `db` object serves as the entry point for working with {{ ydb-short-name }} services. To interact with the table service, use the `db.Table()` client. This client provides an `API` for making queries to tables. The most commonly used method is `db.Table().Do(ctx, op)`, which handles session creation in the background and retries executing the specified `op` operation, passing the created session to the user's code.
+
+The session has a comprehensive `API` that allows you to perform `DDL`, `DML`, `DQL`, and `TCL` requests.
{% include [steps/02_create_table.md](../_includes/steps/02_create_table.md) %}
diff --git a/ydb/docs/en/core/dev/example-app/java/_includes/run_custom.md b/ydb/docs/en/core/dev/example-app/java/_includes/run_custom.md
index bfa716348a..eb4566b28d 100644
--- a/ydb/docs/en/core/dev/example-app/java/_includes/run_custom.md
+++ b/ydb/docs/en/core/dev/example-app/java/_includes/run_custom.md
@@ -1,6 +1,6 @@
-To run the example against any available YDB database, you need to know the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database).
+To run the example against any available {{ ydb-short-name }} database, the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database) need to be provide.
-If authentication is enabled in the database, you also need to select the [authentication mode](../../../../concepts/auth.md) and get secrets (a token or username/password pair).
+If authentication is enabled for the database, the [authentication mode](../../../../concepts/auth.md) needs to be chosen and credentials (a token or a username/password pair) need to be provided.
Run the command as follows:
diff --git a/ydb/docs/en/core/dev/example-app/java/index.md b/ydb/docs/en/core/dev/example-app/java/index.md
index d5aa0200ab..05348c06da 100644
--- a/ydb/docs/en/core/dev/example-app/java/index.md
+++ b/ydb/docs/en/core/dev/example-app/java/index.md
@@ -1,4 +1,4 @@
-# App in Java
+# Example app in Java
This page contains a detailed description of the code of a [test app](https://github.com/ydb-platform/ydb-java-examples/tree/master/query-example) that is available as part of the {{ ydb-short-name }} [Java SDK Examples](https://github.com/ydb-platform/ydb-java-examples).
@@ -18,7 +18,7 @@ Then build the SDK Examples
mvn package -f ./ydb-java-examples
```
-Next, from the same working directory, run the command to start the test app. The command will differ depending on the database to connect to.
+Next, from the same working directory, run the following command to start the test app:
{% include [run_options.md](_includes/run_options.md) %}
diff --git a/ydb/docs/en/core/dev/example-app/python/_includes/run_custom.md b/ydb/docs/en/core/dev/example-app/python/_includes/run_custom.md
index eb48e5f1f2..79bc50df97 100644
--- a/ydb/docs/en/core/dev/example-app/python/_includes/run_custom.md
+++ b/ydb/docs/en/core/dev/example-app/python/_includes/run_custom.md
@@ -1,6 +1,6 @@
-To run the example against any available YDB database, you need to know the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database).
+To run the example against any available {{ ydb-short-name }} database, the [endpoint](../../../../concepts/connect.md#endpoint) and the [database path](../../../../concepts/connect.md#database) need to be provide.
-If authentication is enabled in the database, you also need to select the [authentication mode](../../../../concepts/auth.md) and get secrets (a token or username/password pair).
+If authentication is enabled for the database, the [authentication mode](../../../../concepts/auth.md) needs to be chosen and credentials (a token or a username/password pair) need to be provided.
Run the command as follows:
diff --git a/ydb/docs/en/core/dev/example-app/python/index.md b/ydb/docs/en/core/dev/example-app/python/index.md
index 844fb06d4c..9db2f91f29 100644
--- a/ydb/docs/en/core/dev/example-app/python/index.md
+++ b/ydb/docs/en/core/dev/example-app/python/index.md
@@ -1,4 +1,4 @@
-# App in Python
+# Example app in Python
This page contains a detailed description of the code of a [test app](https://github.com/ydb-platform/ydb-python-sdk/tree/master/examples/basic_example_v2) that is available as part of the {{ ydb-short-name }} [Python SDK](https://github.com/ydb-platform/ydb-python-sdk).
@@ -13,7 +13,7 @@ git clone https://github.com/ydb-platform/ydb-python-sdk.git
python3 -m pip install iso8601
```
-Next, from the same working directory, run the command to start the test app. The command will differ depending on the database to connect to.
+Next, from the same working directory, run the following command to start the test app:
{% include [run_options.md](_includes/run_options.md) %}