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 ai/integrations/vector-search-auto-embedding-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Use this function in `GENERATED ALWAYS AS` clauses to automatically generate emb

### `VEC_EMBED_COSINE_DISTANCE()`

Calculates cosine similarity between a stored vector in the vector column and a text query:
Calculates cosine distance between a stored vector in the vector column and a text query:

```sql
VEC_EMBED_COSINE_DISTANCE(vector_column, "query_text")
Expand Down
6 changes: 3 additions & 3 deletions ai/integrations/vector-search-integrate-with-langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ For a {{{ .starter }}} or Essential instance, take the following steps to obtain
import os

# Copy your connection string from the TiDB Cloud console.
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DB>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DATABASE_NAME>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
tidb_connection_string = getpass.getpass("TiDB Connection String:")
os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")
```
Expand All @@ -118,7 +118,7 @@ To configure the environment variables, run the following code. You will be prom
import getpass
import os

# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DB>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DATABASE_NAME>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
tidb_connection_string = getpass.getpass("TiDB Connection String:")
os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")
```
Expand All @@ -138,7 +138,7 @@ The following are descriptions for each parameter:
- `<PASSWORD>`: The password to connect to TiDB.
- `<HOST>`: The host of the TiDB cluster.
- `<PORT>`: The port of the TiDB cluster.
- `<DATABASE>`: The name of the database you want to connect to.
- `<DATABASE_NAME>`: The name of the database you want to connect to.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

</div>

Expand Down
6 changes: 3 additions & 3 deletions ai/integrations/vector-search-integrate-with-llamaindex.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ For a {{{ .starter }}} or Essential instance, take the following steps to obtain
import os

# Copy your connection string from the TiDB Cloud console.
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DB>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DATABASE_NAME>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
tidb_connection_string = getpass.getpass("TiDB Connection String:")
os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")
```
Expand All @@ -117,7 +117,7 @@ To configure the environment variables, run the following code. You will be prom
import getpass
import os

# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DB>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
# Connection string format: "mysql+pymysql://<USER>:<PASSWORD>@<HOST>:4000/<DATABASE_NAME>?ssl_ca=/etc/ssl/cert.pem&ssl_verify_cert=true&ssl_verify_identity=true"
tidb_connection_string = getpass.getpass("TiDB Connection String:")
os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")
```
Expand All @@ -137,7 +137,7 @@ The following are descriptions for each parameter:
- `<PASSWORD>`: The password to connect to TiDB.
- `<HOST>`: The host of the TiDB cluster.
- `<PORT>`: The port of the TiDB cluster.
- `<DATABASE>`: The name of the database you want to connect to.
- `<DATABASE_NAME>`: The name of the database you want to connect to.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

</div>

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-create-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CREATE DATABASE IF NOT EXISTS `bookshop`;

For more information and examples of the `CREATE DATABASE` statement, see the [`CREATE DATABASE`](/sql-statements/sql-statement-create-database.md) document.

To execute the library build statement as the `root` user, run the following command:
To execute the database creation statement as the `root` user, run the following command:

```shell
mysql
Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-object-naming-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This document introduces the rules to name database objects, such as database, t

## Database naming convention

It is recommended to differentiate database names by business, product, or other metrics and use no more than 20 characters in a database name. For example, you can name a temporary library as `tmp_crm` or a test library as `test_crm`.
It is recommended to differentiate database names by business, product, or other criteria and use no more than 20 characters in a database name. For example, you can name a temporary database as `tmp_crm` or a test database as `test_crm`.

## Table naming convention

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-third-party-tools-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ aliases: ['/tidb/stable/dev-guide-third-party-tools-compatibility/','/tidb/dev/d
>
> The preceding unsupported features are expected behavior and are not listed in this document. For more details, see [MySQL Compatibility](/mysql-compatibility.md).

The incompatibility issues listed in this document are found in some [third-party tools supported by TiDB](/develop/dev-guide-third-party-tools-compatibility.md).
The incompatibility issues listed in this document are found in some [third-party tools supported by TiDB](/develop/dev-guide-third-party-support.md).

## General incompatibility

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-use-temporary-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public List<Author> getTop50EldestAuthorInfo() throws SQLException {
<SimpleTab groupId="language">
<div label="SQL" value="sql">

To create a global temporary table, you can add the `GLOBAL` keyword and end with `ON COMMIT DELETE ROWS`, which means the table will be deleted after the current transaction ends.
To create a global temporary table, you can add the `GLOBAL` keyword and end with `ON COMMIT DELETE ROWS`, which means the data in the table will be deleted after the current transaction ends.

```sql
CREATE GLOBAL TEMPORARY TABLE IF NOT EXISTS top_50_eldest_authors_global (
Expand Down
4 changes: 2 additions & 2 deletions develop/serverless-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const tx = await conn.begin({isolation:"READ COMMITTED"})

**decoders**

To customize the format of returned column values, you can configure the `decoder` option in the `connect()` method as follows:
To customize the format of returned column values, you can configure the `decoders` option in the `connect()` method as follows:

@qiancai qiancai Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript example just below this sentence still contains a code comment reading "You can also configure the decoder option at the SQL level to override the decoders with the same keys at the connection level." — since the option is decoders, consider updating that comment to "the decoders option" for consistency.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 70a1650 (this PR)


```ts
import { connect, ColumnType } from '@tidbcloud/serverless';
Expand All @@ -248,7 +248,7 @@ const conn = connect({
}
})

// You can also configure the decoder option at the SQL level to override the decoders with the same keys at the connection level.
// You can also configure the decoders option at the SQL level to override the decoders with the same keys at the connection level.
conn.execute(`select ...`, [], {
decoders: {
// ...
Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-analyze-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SELECT * FROM information_schema.analyze_status;
| test | t | p0 | analyze columns | 0 | 2022-05-27 11:29:46 | 2022-05-27 11:29:46 | finished | NULL | 127.0.0.1:4000 | NULL | NULL | NULL | NULL |
| test | t | p1 | analyze table all columns with 256 buckets, 500 topn, 1 samplerate | 1000000 | 2022-05-27 11:30:12 | 2022-05-27 11:40:12 | running | NULL | 127.0.0.1:4000 | 690208308 | 600s | 0.25 | 4000000 |
+--------------+------------+----------------+--------------------------------------------------------------------+----------------+---------------------+---------------------+----------+-------------+----------------+------------+----------------------+----------+-----------------------+
6 rows in set (0.00 sec)
7 rows in set (0.00 sec)
```

Fields in the `ANALYZE_STATUS` table are described as follows:
Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ SELECT * FROM engines;

The description of columns in the `ENGINES` table is as follows:

* `ENGINES`: The name of the storage engine.
* `ENGINE`: The name of the storage engine.
* `SUPPORT`: The level of support that the server has on the storage engine. In TiDB, the value is always `DEFAULT`.
* `COMMENT`: The brief comment on the storage engine.
* `TRANSACTIONS`: Whether the storage engine supports transactions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The columns in the `MEMORY_USAGE_OPS_HISTORY` table are described as follows:

* `TIME`: The timestamp when the session is terminated.
* `OPS`: "SessionKill"
* `MEMORY_LIMIT`: The memory usage limit of TiDB at the time of termination, in bytes. Its value is the same as that of the system variable `tidb_server_memory_limit`](/system-variables.md#tidb_server_memory_limit-new-in-v640).
* `MEMORY_LIMIT`: The memory usage limit of TiDB at the time of termination, in bytes. Its value is the same as that of the system variable [`tidb_server_memory_limit`](/system-variables.md#tidb_server_memory_limit-new-in-v640).
* `MEMORY_CURRENT`: The current memory usage of TiDB, in bytes.
* `PROCESSID`: The connection ID of the terminated session.
* `MEM`: The memory usage of the terminated session, in bytes.
Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Fields in the `STATISTICS` table are described as follows:
* `COMMENT`: Other information related to the index.
* `INDEX_COMMENT`: Any comment with comment attribute provided for the index when creating the index.
* `IS_VISIBLE`: Whether this index is visible or not. See also [Invisible index](/sql-statements/sql-statement-create-index.md#invisible-index).
* `Expression` For the index key of the non-expression part, this value is `NULL`; for the index key of the expression part, this value is the expression itself. Refer to [Expression Index](/sql-statements/sql-statement-create-index.md#expression-index).
* `Expression`: For the index key of the non-expression part, this value is `NULL`; for the index key of the expression part, this value is the expression itself. Refer to [Expression Index](/sql-statements/sql-statement-create-index.md#expression-index).

The following statements are equivalent:

Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The description of columns in the `TABLES` table is as follows:
* `CHECK_TIME`: The time at which the table is checked.
* `TABLE_COLLATION`: The collation of strings in the table.
* `CHECKSUM`: Checksum.
* `CREATE_OPTIONS`: Creates options.
* `CREATE_OPTIONS`: Extra options used with `CREATE TABLE`.
* `TABLE_COMMENT`: The comments and notes of the table.

Most of the information in the table is the same as MySQL. The following columns are newly defined by TiDB:
Expand Down
2 changes: 1 addition & 1 deletion information-schema/information-schema-tidb-hot-regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: Learn the `TIDB_HOT_REGIONS` information_schema table.

# TIDB_HOT_REGIONS

The `TIDB_HOT_REGIONS` table provides information about the current hot Regions. For information about history hot Regions, see `[TIDB_HOT_REGIONS_HISTORY](/information-schema/information-schema-tidb-hot-regions-history.md)`.
The `TIDB_HOT_REGIONS` table provides information about the current hot Regions. For information about history hot Regions, see [`TIDB_HOT_REGIONS_HISTORY`](/information-schema/information-schema-tidb-hot-regions-history.md).

> **Note:**
>
Expand Down
Loading