diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84db54b81e70b..5d6ef82fc76ca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,15 @@ concurrency: cancel-in-progress: true jobs: - tidb-check: + duplicated-file-names: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Verify duplicated file names + run: ./scripts/verify-duplicated-file-name.sh + + internal-links-files: runs-on: ubuntu-latest steps: - name: Check out @@ -15,20 +23,14 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "18" - - name: Verify duplicated file names - run: ./scripts/verify-duplicated-file-name.sh - - name: Verify internal links and anchors - tidb only - run: | - npm i - node ./scripts/filterNonCloudDoc.js - cp -r ./scripts ./tmp - cp -r ./media ./tmp - cp .gitignore ./tmp/ - cd ./tmp - ./scripts/verify-links.sh - ./scripts/verify-link-anchors.sh + cache: npm + cache-dependency-path: package-lock.json + - name: Install Node dependencies + run: npm ci + - name: Verify internal links (full repo) - files + run: ./scripts/verify-links.sh - tidb-cloud-check: + internal-links-anchors: runs-on: ubuntu-latest steps: - name: Check out @@ -36,22 +38,27 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "18" - - name: Check TOC-tidb-cloud.md existence - id: check_cloud_toc - uses: andstor/file-existence-action@v2 + cache: npm + cache-dependency-path: package-lock.json + - name: Install Node dependencies + run: npm ci + - name: Verify internal links (full repo) - anchors + run: ./scripts/verify-link-anchors.sh + + internal-links-toc: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - files: "TOC-tidb-cloud.md" - - name: Verify internal links - cloud only - if: steps.check_cloud_toc.outputs.files_exists == 'true' - run: | - npm i - node ./scripts/filterCloudDoc.js - cp -r ./scripts ./tmp - cp -r ./media ./tmp - cp .gitignore ./tmp/ - cd ./tmp - ./scripts/verify-links.sh - ./scripts/verify-link-anchors.sh + node-version: "18" + cache: npm + cache-dependency-path: package-lock.json + - name: Install Node dependencies + run: npm ci + - name: Verify internal links (full repo) - TOC membership + run: node ./scripts/verify-internal-links-in-toc.js vale: runs-on: ubuntu-latest diff --git a/.github/workflows/dispatch-nextgen.yml b/.github/workflows/dispatch-nextgen.yml new file mode 100644 index 0000000000000..b60469c1343bb --- /dev/null +++ b/.github/workflows/dispatch-nextgen.yml @@ -0,0 +1,31 @@ +name: Trigger docs-staging nextgen update + +on: + push: + paths-ignore: + - ".github/**" + branches: + - feature/preview-top-navigation + +jobs: + trigger: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: trigger docs-staging update-nextgen workflow + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.DOCS_STAGING }} + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: 'pingcap', + repo: 'docs-staging', + workflow_id: 'update-nextgen.yml', + ref: 'nextgen', + inputs: { + repo: 'pingcap/docs', + branch: 'feature/preview-top-navigation' + } + }) diff --git a/TOC-ai.md b/TOC-ai.md new file mode 100644 index 0000000000000..e79d9a34cc2be --- /dev/null +++ b/TOC-ai.md @@ -0,0 +1,86 @@ + + + +# Table of Contents + +## QUICK START + +- [Get Started via Python](/ai/quickstart-via-python.md) +- [Get Started via SQL](/ai/quickstart-via-sql.md) + +## CONCEPTS + +- [Vector Search](/ai/concepts/vector-search-overview.md) + +## GUIDES + +- [Connect to TiDB](/ai/guides/connect.md) +- [Working with Tables](/ai/guides/tables.md) +- Search Features + - [Vector Search](/ai/guides/vector-search.md) + - Full-Text Search + - [Full-Text Search via Python](/ai/guides/vector-search-full-text-search-python.md) + - [Full-Text Search via SQL](/ai/guides/vector-search-full-text-search-sql.md) + - [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) + - [Image Search](/ai/guides/image-search.md) +- Advanced Features + - [Auto Embedding](/ai/guides/auto-embedding.md) + - [Filtering](/ai/guides/filtering.md) + - [Reranking](/ai/guides/reranking.md) + - [Join Queries](/ai/guides/join-queries.md) + - [Raw SQL Queries](/ai/guides/raw-queries.md) + - [Transactions](/ai/guides/transactions.md) + +## EXAMPLES + +- [Basic CRUD Operations](/ai/examples/basic-with-pytidb.md) +- [Auto Embedding](/ai/examples/auto-embedding-with-pytidb.md) +- Search & Retrieval + - [Vector Search](/ai/examples/vector-search-with-pytidb.md) + - [Full-Text Search](/ai/examples/fulltext-search-with-pytidb.md) + - [Hybrid Search](/ai/examples/hybrid-search-with-pytidb.md) + - [Image Search](/ai/examples/image-search-with-pytidb.md) +- AI Applications + - [RAG Application](/ai/examples/rag-with-pytidb.md) + - [Conversational Memory](/ai/examples/memory-with-pytidb.md) + - [Text-to-SQL](/ai/examples/text2sql-with-pytidb.md) + +## INTEGRATIONS + +- [Integration Overview](/ai/integrations/vector-search-integration-overview.md) +- Auto Embedding + - [Overview](/ai/integrations/vector-search-auto-embedding-overview.md) + - [OpenAI](/ai/integrations/vector-search-auto-embedding-openai.md) + - [OpenAI Compatible](/ai/integrations/embedding-openai-compatible.md) + - [Jina AI](/ai/integrations/vector-search-auto-embedding-jina-ai.md) + - [Cohere](/ai/integrations/vector-search-auto-embedding-cohere.md) + - [Google Gemini](/ai/integrations/vector-search-auto-embedding-gemini.md) + - [Hugging Face](/ai/integrations/vector-search-auto-embedding-huggingface.md) + - [NVIDIA NIM](/ai/integrations/vector-search-auto-embedding-nvidia-nim.md) + - [Amazon Titan](/ai/integrations/vector-search-auto-embedding-amazon-titan.md) +- AI Frameworks + - [LangChain](/ai/integrations/vector-search-integrate-with-langchain.md) + - [LlamaIndex](/ai/integrations/vector-search-integrate-with-llamaindex.md) +- ORM Libraries + - [SQLAlchemy](/ai/integrations/vector-search-integrate-with-sqlalchemy.md) + - [Django ORM](/ai/integrations/vector-search-integrate-with-django-orm.md) + - [Peewee](/ai/integrations/vector-search-integrate-with-peewee.md) +- Cloud Services + - [Jina AI Embedding](/ai/integrations/vector-search-integrate-with-jinaai-embedding.md) + - [Amazon Bedrock](/ai/integrations/vector-search-integrate-with-amazon-bedrock.md) +- MCP Server + - [Overview](/ai/integrations/tidb-mcp-server.md) + - [Claude Code](/ai/integrations/tidb-mcp-claude-code.md) + - [Claude Desktop](/ai/integrations/tidb-mcp-claude-desktop.md) + - [Cursor](/ai/integrations/tidb-mcp-cursor.md) + - [VS Code](/ai/integrations/tidb-mcp-vscode.md) + - [Windsurf](/ai/integrations/tidb-mcp-windsurf.md) + +## REFERENCE + +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) +- [Performance Tuning](/ai/reference/vector-search-improve-performance.md) +- [Limitations](/ai/reference/vector-search-limitations.md) +- [Changelogs](/ai/reference/vector-search-changelogs.md) diff --git a/TOC-api.md b/TOC-api.md new file mode 100644 index 0000000000000..b31833afb27c3 --- /dev/null +++ b/TOC-api.md @@ -0,0 +1,18 @@ + + + +# Table of Contents + +## TIDB CLOUD + +- [API Overview](/api/tidb-cloud-api-overview.md) +- [API v1beta1](/api/tidb-cloud-api-v1beta1.md) +- [API v1beta](/api/tidb-cloud-api-v1beta.md) + +## TIDB SELF-MANAGED + +- [TiProxy API](/api/tiproxy-api-overview.md) +- [Data Migration API](/api/dm-api-overview.md) +- [Monitoring API](/api/monitoring-api-overview.md) +- [TiCDC API](/api/ticdc-api-overview.md) +- [TiDB Operator API](/api/tidb-operator-api-overview.md) diff --git a/TOC-best-practices.md b/TOC-best-practices.md new file mode 100644 index 0000000000000..aa9299436e768 --- /dev/null +++ b/TOC-best-practices.md @@ -0,0 +1,35 @@ + + + +# Table of Contents + +## Overview + +- [Use TiDB](/best-practices/tidb-best-practices.md) + +## Schema Design + +- [Manage DDL](/best-practices/ddl-introduction.md) +- [Use UUIDs as Primary Keys](/best-practices/uuid.md) +- [Use TiDB Partitioned Tables](/best-practices/tidb-partitioned-tables-best-practices.md) +- [Optimize Multi-Column Indexes](/best-practices/multi-column-index-best-practices.md) +- [Manage Indexes and Identify Unused Indexes](/best-practices/index-management-best-practices.md) + +## Deployment + +- [Deploy TiDB on Public Cloud](/best-practices/best-practices-on-public-cloud.md) +- [Three-Node Hybrid Deployment](/best-practices/three-nodes-hybrid-deployment.md) +- [Local Reads in Three-Data-Center Deployments](/best-practices/three-dc-local-read.md) + +## Operations + +- [Use HAProxy for Load Balancing](/best-practices/haproxy-best-practices.md) +- [Use Read-Only Storage Nodes](/best-practices/readonly-nodes.md) +- [Monitor TiDB Using Grafana](/best-practices/grafana-monitor-best-practices.md) + +## Performance Tuning + +- [Handle Millions of Tables in SaaS Multi-Tenant Scenarios](/best-practices/saas-best-practices.md) +- [Handle High-Concurrency Writes](/best-practices/high-concurrency-best-practices.md) +- [Tune TiKV Performance with Massive Regions](/best-practices/massive-regions-best-practices.md) +- [Tune PD Scheduling](/best-practices/pd-scheduling-best-practices.md) diff --git a/TOC-develop.md b/TOC-develop.md new file mode 100644 index 0000000000000..9300837095adb --- /dev/null +++ b/TOC-develop.md @@ -0,0 +1,119 @@ + + + +# Table of Contents + +## QUICK START + +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) +- [TiDB Basics](/develop/dev-guide-tidb-basics.md) +- [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) + +## GUIDES + +- Connect to TiDB + - [Overview](/develop/dev-guide-connect-to-tidb.md) + - CLI & GUI Tools + - [MySQL CLI Tools](/develop/dev-guide-mysql-tools.md) + - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) + - [DBeaver](/develop/dev-guide-gui-dbeaver.md) + - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) + - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) + - [Navicat](/develop/dev-guide-gui-navicat.md) + - Drivers & ORMs + - [Choose a Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) + - Java + - [JDBC](/develop/dev-guide-sample-application-java-jdbc.md) + - [MyBatis](/develop/dev-guide-sample-application-java-mybatis.md) + - [Hibernate](/develop/dev-guide-sample-application-java-hibernate.md) + - [Spring Boot](/develop/dev-guide-sample-application-java-spring-boot.md) + - [Configure Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) + - [Best Practices for Developing Java Applications](/develop/java-app-best-practices.md) + - Go + - [Go-MySQL-Driver](/develop/dev-guide-sample-application-golang-sql-driver.md) + - [GORM](/develop/dev-guide-sample-application-golang-gorm.md) + - Python + - [mysqlclient](/develop/dev-guide-sample-application-python-mysqlclient.md) + - [MySQL Connector/Python](/develop/dev-guide-sample-application-python-mysql-connector.md) + - [PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) + - [SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) + - [peewee](/develop/dev-guide-sample-application-python-peewee.md) + - [Django](/develop/dev-guide-sample-application-python-django.md) + - Node.js + - [node-mysql2](/develop/dev-guide-sample-application-nodejs-mysql2.md) + - [mysql.js](/develop/dev-guide-sample-application-nodejs-mysqljs.md) + - [Prisma](/develop/dev-guide-sample-application-nodejs-prisma.md) + - [Sequelize](/develop/dev-guide-sample-application-nodejs-sequelize.md) + - [TypeORM](/develop/dev-guide-sample-application-nodejs-typeorm.md) + - [Next.js](/develop/dev-guide-sample-application-nextjs.md) + - [AWS Lambda](/develop/dev-guide-sample-application-aws-lambda.md) + - Ruby + - [mysql2](/develop/dev-guide-sample-application-ruby-mysql2.md) + - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) + - C# + - [C#](/develop/dev-guide-sample-application-cs.md) + - TiDB Cloud Serverless Driver ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) + - [Overview](/develop/serverless-driver.md) + - [Node.js Example](/develop/serverless-driver-node-example.md) + - [Prisma Example](/develop/serverless-driver-prisma-example.md) + - [Kysely Example](/develop/serverless-driver-kysely-example.md) + - [Drizzle Example](/develop/serverless-driver-drizzle-example.md) +- Design Database Schema + - [Overview](/develop/dev-guide-schema-design-overview.md) + - [Create a Database](/develop/dev-guide-create-database.md) + - [Create a Table](/develop/dev-guide-create-table.md) + - [Create a Secondary Index](/develop/dev-guide-create-secondary-indexes.md) +- Write Data + - [Insert Data](/develop/dev-guide-insert-data.md) + - [Update Data](/develop/dev-guide-update-data.md) + - [Delete Data](/develop/dev-guide-delete-data.md) + - [Periodically Delete Expired Data Using TTL (Time to Live)](/time-to-live.md) + - [Prepared Statements](/develop/dev-guide-prepared-statement.md) +- Read Data + - [Query Data from a Single Table](/develop/dev-guide-get-data-from-single-table.md) + - [Multi-table Join Queries](/develop/dev-guide-join-tables.md) + - [Subquery](/develop/dev-guide-use-subqueries.md) + - [Paginate Results](/develop/dev-guide-paginate-results.md) + - [Views](/develop/dev-guide-use-views.md) + - [Temporary Tables](/develop/dev-guide-use-temporary-tables.md) + - [Common Table Expression](/develop/dev-guide-use-common-table-expression.md) + - Read Replica Data + - [Follower Read](/develop/dev-guide-use-follower-read.md) + - [Stale Read](/develop/dev-guide-use-stale-read.md) + - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) +- [Vector Search](/develop/dev-guide-vector-search.md) ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) +- Manage Transactions + - [Overview](/develop/dev-guide-transaction-overview.md) + - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) + - [Transaction Restraints](/develop/dev-guide-transaction-restraints.md) + - [Handle Transaction Errors](/develop/dev-guide-transaction-troubleshoot.md) +- Optimize + - [Overview](/develop/dev-guide-optimize-sql-overview.md) + - [SQL Performance Tuning](/develop/dev-guide-optimize-sql.md) + - [Best Practices for Performance Tuning](/develop/dev-guide-optimize-sql-best-practices.md) + - [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md) + - Additional Optimization Methods + - [Avoid Implicit Type Conversions](/develop/dev-guide-implicit-type-conversion.md) + - [Unique Serial Number Generation](/develop/dev-guide-unique-serial-number-generation.md) +- Troubleshoot + - [SQL or Transaction Issues](/develop/dev-guide-troubleshoot-overview.md) + - [Unstable Result Set](/develop/dev-guide-unstable-result-set.md) + - [Timeouts](/develop/dev-guide-timeouts-in-tidb.md) + +## INTEGRATIONS + +- Third-Party Support + - [Third-Party Tools Supported by TiDB](/develop/dev-guide-third-party-support.md) + - [Known Incompatibility Issues with Third-Party Tools](/develop/dev-guide-third-party-tools-compatibility.md) +- [ProxySQL](/develop/dev-guide-proxysql-integration.md) +- [Amazon AppFlow](/develop/dev-guide-aws-appflow-integration.md) +- [WordPress](/develop/dev-guide-wordpress.md) + +## REFERENCE + +- Development Guidelines + - [Object Naming Convention](/develop/dev-guide-object-naming-guidelines.md) + - [SQL Development Specifications](/develop/dev-guide-sql-development-specification.md) +- [Bookshop Example Application](/develop/dev-guide-bookshop-schema-design.md) +- Cloud Native Development Environment + - [Gitpod](/develop/dev-guide-playground-gitpod.md) \ No newline at end of file diff --git a/TOC-tidb-cloud-essential.md b/TOC-tidb-cloud-essential.md index 2333156f37fa3..3a6c8d77f054c 100644 --- a/TOC-tidb-cloud-essential.md +++ b/TOC-tidb-cloud-essential.md @@ -11,7 +11,6 @@ - [MySQL Compatibility](/mysql-compatibility.md) - Get Started - [Try Out TiDB Cloud](/tidb-cloud/tidb-cloud-quickstart.md) - - [Try Out TiDB + AI](/vector-search/vector-search-get-started-using-python.md) - [Try Out HTAP](/tidb-cloud/tidb-cloud-htap-quickstart.md) - [Try Out TiDB Cloud CLI](/tidb-cloud/get-started-with-cli.md) - Key Concepts @@ -27,104 +26,6 @@ - [Backup & Restore](/tidb-cloud/backup-and-restore-concepts.md) - [Security](/tidb-cloud/security-concepts.md) -## DEVELOP - -- Development Quick Start - - [Developer Guide Overview](/develop/dev-guide-overview.md) - - [Build a TiDB Cloud Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - - [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) -- Connect to TiDB Cloud - - GUI Database Tools - - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) - - [DBeaver](/develop/dev-guide-gui-dbeaver.md) - - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) - - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) - - [Navicat](/develop/dev-guide-gui-navicat.md) - - [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) - - Java - - [JDBC](/develop/dev-guide-sample-application-java-jdbc.md) - - [MyBatis](/develop/dev-guide-sample-application-java-mybatis.md) - - [Hibernate](/develop/dev-guide-sample-application-java-hibernate.md) - - [Spring Boot](/develop/dev-guide-sample-application-java-spring-boot.md) - - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - - Go - - [Go-MySQL-Driver](/develop/dev-guide-sample-application-golang-sql-driver.md) - - [GORM](/develop/dev-guide-sample-application-golang-gorm.md) - - Python - - [mysqlclient](/develop/dev-guide-sample-application-python-mysqlclient.md) - - [MySQL Connector/Python](/develop/dev-guide-sample-application-python-mysql-connector.md) - - [PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) - - [SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) - - [peewee](/develop/dev-guide-sample-application-python-peewee.md) - - [Django](/develop/dev-guide-sample-application-python-django.md) - - Node.js - - [node-mysql2](/develop/dev-guide-sample-application-nodejs-mysql2.md) - - [mysql.js](/develop/dev-guide-sample-application-nodejs-mysqljs.md) - - [Prisma](/develop/dev-guide-sample-application-nodejs-prisma.md) - - [Sequelize](/develop/dev-guide-sample-application-nodejs-sequelize.md) - - [TypeORM](/develop/dev-guide-sample-application-nodejs-typeorm.md) - - [Next.js](/develop/dev-guide-sample-application-nextjs.md) - - Ruby - - [mysql2](/develop/dev-guide-sample-application-ruby-mysql2.md) - - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) - - C# - - [C#](/develop/dev-guide-sample-application-cs.md) - - [WordPress](/tidb-cloud/dev-guide-wordpress.md) - - Serverless Driver ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [TiDB Cloud Serverless Driver](/tidb-cloud/serverless-driver.md) - - [Node.js Example](/tidb-cloud/serverless-driver-node-example.md) - - [Prisma Example](/tidb-cloud/serverless-driver-prisma-example.md) - - [Kysely Example](/tidb-cloud/serverless-driver-kysely-example.md) - - [Drizzle Example](/tidb-cloud/serverless-driver-drizzle-example.md) -- Development Reference - - Design Database Schema - - [Overview](/develop/dev-guide-schema-design-overview.md) - - [Create a Database](/develop/dev-guide-create-database.md) - - [Create a Table](/develop/dev-guide-create-table.md) - - [Create a Secondary Index](/develop/dev-guide-create-secondary-indexes.md) - - Write Data - - [Insert Data](/develop/dev-guide-insert-data.md) - - [Update Data](/develop/dev-guide-update-data.md) - - [Delete Data](/develop/dev-guide-delete-data.md) - - [Periodically Delete Expired Data Using TTL (Time to Live)](/time-to-live.md) - - [Prepared Statements](/develop/dev-guide-prepared-statement.md) - - Read Data - - [Query Data from a Single Table](/develop/dev-guide-get-data-from-single-table.md) - - [Multi-table Join Queries](/develop/dev-guide-join-tables.md) - - [Subquery](/develop/dev-guide-use-subqueries.md) - - [Paginate Results](/develop/dev-guide-paginate-results.md) - - [Views](/develop/dev-guide-use-views.md) - - [Temporary Tables](/develop/dev-guide-use-temporary-tables.md) - - [Common Table Expression](/develop/dev-guide-use-common-table-expression.md) - - Read Replica Data - - [Follower Read](/develop/dev-guide-use-follower-read.md) - - [Stale Read](/develop/dev-guide-use-stale-read.md) - - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) - - Transaction - - [Overview](/develop/dev-guide-transaction-overview.md) - - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) - - [Transaction Restraints](/develop/dev-guide-transaction-restraints.md) - - [Handle Transaction Errors](/develop/dev-guide-transaction-troubleshoot.md) - - Optimize - - [Overview](/develop/dev-guide-optimize-sql-overview.md) - - [SQL Performance Tuning](/develop/dev-guide-optimize-sql.md) - - [Best Practices for Performance Tuning](/develop/dev-guide-optimize-sql-best-practices.md) - - [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md) - - Other Optimization Methods - - [Avoid Implicit Type Conversions](/develop/dev-guide-implicit-type-conversion.md) - - [Unique Serial Number Generation](/develop/dev-guide-unique-serial-number-generation.md) - - Troubleshoot - - [SQL or Transaction Issues](/develop/dev-guide-troubleshoot-overview.md) - - [Unstable Result Set](/develop/dev-guide-unstable-result-set.md) - - [Timeouts](/develop/dev-guide-timeouts-in-tidb.md) - - Development Guidelines - - [Object Naming Convention](/develop/dev-guide-object-naming-guidelines.md) - - [SQL Development Specifications](/develop/dev-guide-sql-development-specification.md) - - [Bookshop Example Application](/develop/dev-guide-bookshop-schema-design.md) - - Third-Party Support - - [Third-Party Tools Supported by TiDB](/develop/dev-guide-third-party-support.md) - - [Known Incompatibility Issues with Third-Party Tools](/develop/dev-guide-third-party-tools-compatibility.md) - ## GUIDES - Manage Cluster @@ -132,7 +33,7 @@ - Manage TiDB Cloud Clusters - [Create a TiDB Cloud Cluster](/tidb-cloud/create-tidb-cluster-serverless.md) - Connect to Your TiDB Cloud Cluster - - [Connection Overview](/tidb-cloud/connect-to-tidb-cluster-serverless.md) + - [Network Connection Overview](/tidb-cloud/connect-to-tidb-cluster-serverless.md) - [Connect via Public Endpoint](/tidb-cloud/connect-via-standard-connection-serverless.md) - [Connect via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections-serverless.md) - [Connect via Private Endpoint with Alibaba Cloud](/tidb-cloud/set-up-private-endpoint-connections-on-alibaba-cloud.md) @@ -232,38 +133,6 @@ - [CSV Configurations for Importing Data](/tidb-cloud/csv-config-for-import-data.md) - [Troubleshoot Access Denied Errors during Data Import from Amazon S3](/tidb-cloud/troubleshoot-import-access-denied-error.md) - [Connect AWS DMS to TiDB Cloud clusters](/tidb-cloud/tidb-cloud-connect-aws-dms.md) -- Vector Search ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/vector-search/vector-search-overview.md) - - Get Started - - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - - Integrations - - [Overview](/vector-search/vector-search-integration-overview.md) - - AI Frameworks - - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) - - [LangChain](/vector-search/vector-search-integrate-with-langchain.md) - - AI Services - - [Amazon Bedrock](/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md) - - Embedding Models/Services - - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - - ORM Libraries - - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search/vector-search-integrate-with-peewee.md) - - [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md) - - Text Search - - [Full-Text Search with SQL](/tidb-cloud/vector-search-full-text-search-sql.md) - - [Full-Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md) - - [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) - - Reference - - [Vector Data Types](/vector-search/vector-search-data-types.md) - - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) - - [Vector Index](/vector-search/vector-search-index.md) - - [Improve Performance](/vector-search/vector-search-improve-performance.md) - - [Limitations](/vector-search/vector-search-limitations.md) -- Stream Data ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Changefeed Overview](/tidb-cloud/essential-changefeed-overview.md) - - [Sink to MySQL](/tidb-cloud/essential-changefeed-sink-to-mysql.md) - - [Sink to Apache Kafka](/tidb-cloud/essential-changefeed-sink-to-kafka.md) - Security - [Security Overview](/tidb-cloud/security-overview.md) - Identity Access Control @@ -575,15 +444,7 @@ - [Overview](/sys-schema/sys-schema.md) - [`schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md) - [Metadata Lock](/metadata-lock.md) - - [Use UUIDs](/best-practices/uuid.md) - [TiDB Accelerated Table Creation](/accelerated-table-creation.md) -- API Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/tidb-cloud/api-overview.md) - - v1beta1 - - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing) - - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam) - - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) - - [v1beta](https://docs.pingcap.com/tidbcloud/api/v1beta) - CLI Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [Overview](/tidb-cloud/cli-reference.md) - auth @@ -678,7 +539,6 @@ - [Server Status Variables](/status-variables.md) - [Table Filter](/table-filter.md) - [URI Formats of External Storage Services](/external-storage-uri.md) - - [DDL Execution Principles and Best Practices](/ddl-introduction.md) - [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md) - [Notifications](/tidb-cloud/notifications.md) - Support Plan @@ -696,9 +556,3 @@ - FAQs - [TiDB Cloud FAQs](/tidb-cloud/tidb-cloud-faq.md) - [Glossary](/tidb-cloud/tidb-cloud-glossary.md) - -## RELEASES - -- Release Notes - - [2026](/tidb-cloud/tidb-cloud-release-notes.md) - - [2025](/tidb-cloud/release-notes-2025.md) \ No newline at end of file diff --git a/TOC-tidb-cloud-premium.md b/TOC-tidb-cloud-premium.md index 725692caf0235..8aa553f1a7085 100644 --- a/TOC-tidb-cloud-premium.md +++ b/TOC-tidb-cloud-premium.md @@ -10,7 +10,6 @@ - [MySQL Compatibility](/mysql-compatibility.md) - Get Started with TiDB Cloud - [Try Out TiDB Cloud](/tidb-cloud/tidb-cloud-quickstart.md) - - [Try Out TiDB + AI](/vector-search/vector-search-get-started-using-python.md) - [Try Out HTAP](/tidb-cloud/tidb-cloud-htap-quickstart.md) - [Try Out TiDB Cloud CLI](/tidb-cloud/get-started-with-cli.md) - Key Concepts @@ -29,7 +28,7 @@ ## DEVELOP - Development Quick Start - - [Developer Guide Overview](/develop/dev-guide-overview.md) + - [Developer Guide Overview](https://docs.pingcap.com/developer/) - [Build a TiDB Cloud Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) - Connect to TiDB Cloud @@ -68,13 +67,13 @@ - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) - C# - [C#](/develop/dev-guide-sample-application-cs.md) - - [WordPress](/tidb-cloud/dev-guide-wordpress.md) + - [WordPress](/develop/dev-guide-wordpress.md) - Serverless Driver ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [TiDB Cloud Serverless Driver](/tidb-cloud/serverless-driver.md) - - [Node.js Example](/tidb-cloud/serverless-driver-node-example.md) - - [Prisma Example](/tidb-cloud/serverless-driver-prisma-example.md) - - [Kysely Example](/tidb-cloud/serverless-driver-kysely-example.md) - - [Drizzle Example](/tidb-cloud/serverless-driver-drizzle-example.md) + - [TiDB Cloud Serverless Driver](/develop/serverless-driver.md) + - [Node.js Example](/develop/serverless-driver-node-example.md) + - [Prisma Example](/develop/serverless-driver-prisma-example.md) + - [Kysely Example](/develop/serverless-driver-kysely-example.md) + - [Drizzle Example](/develop/serverless-driver-drizzle-example.md) - Development Reference - Design Database Schema - [Overview](/develop/dev-guide-schema-design-overview.md) @@ -534,15 +533,7 @@ - [Overview](/sys-schema/sys-schema.md) - [`schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md) - [Metadata Lock](/metadata-lock.md) - - [Use UUIDs](/best-practices/uuid.md) - [TiDB Accelerated Table Creation](/accelerated-table-creation.md) -- API Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/tidb-cloud/api-overview.md) - - v1beta1 - - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing) - - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam) - - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) - - [v1beta](https://docs.pingcap.com/tidbcloud/api/v1beta) - CLI Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [Overview](/tidb-cloud/cli-reference.md) - auth @@ -624,7 +615,6 @@ - [Server Status Variables](/status-variables.md) - [Table Filter](/table-filter.md) - [URI Formats of External Storage Services](/external-storage-uri.md) - - [DDL Execution Principles and Best Practices](/ddl-introduction.md) - [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md) - [Notifications](/tidb-cloud/notifications.md) - Support Plan @@ -642,9 +632,3 @@ - FAQs - [TiDB Cloud FAQs](/tidb-cloud/tidb-cloud-faq.md) - [Glossary](/tidb-cloud/tidb-cloud-glossary.md) - -## RELEASES - -- Release Notes - - [2026](/tidb-cloud/tidb-cloud-release-notes.md) - - [2025](/tidb-cloud/release-notes-2025.md) diff --git a/TOC-tidb-cloud-releases.md b/TOC-tidb-cloud-releases.md new file mode 100644 index 0000000000000..0c1e2ce823e75 --- /dev/null +++ b/TOC-tidb-cloud-releases.md @@ -0,0 +1,27 @@ + + + +# Table of Contents + +## RELEASE NOTES + +- [2026](/tidb-cloud/releases/tidb-cloud-release-notes.md) +- [2025](/tidb-cloud/releases/release-notes-2025.md) +- [2024](/tidb-cloud/releases/release-notes-2024.md) +- Earlier Releases + - [2023](/tidb-cloud/releases/release-notes-2023.md) + - [2022](/tidb-cloud/releases/release-notes-2022.md) + - [2021](/tidb-cloud/releases/release-notes-2021.md) + - [2020](/tidb-cloud/releases/release-notes-2020.md) + +## MAINTENANCE NOTIFICATIONS + +- [[2024-09-15] TiDB Cloud Console Maintenance Notification](/tidb-cloud/releases/notification-2024-09-15-console-maintenance.md) +- [[2024-04-18] TiDB Cloud Data Migration (DM) Feature Maintenance Notification](/tidb-cloud/releases/notification-2024-04-18-dm-feature-maintenance.md) +- [[2024-04-16] TiDB Cloud Monitoring Features Maintenance Notification](/tidb-cloud/releases/notification-2024-04-16-monitoring-features-maintenance.md) +- [[2024-04-11] TiDB Cloud Data Migration (DM) Feature Maintenance Notification](/tidb-cloud/releases/notification-2024-04-11-dm-feature-maintenance.md) +- [[2024-04-09] TiDB Cloud Monitoring Features Maintenance Notification](/tidb-cloud/releases/notification-2024-04-09-monitoring-features-maintenance.md) +- Earlier Notifications + - [[2023-11-14] TiDB Cloud Dedicated Scale Feature Maintenance Notification](/tidb-cloud/releases/notification-2023-11-14-scale-feature-maintenance.md) + - [[2023-09-26] TiDB Cloud Console Maintenance Notification](/tidb-cloud/releases/notification-2023-09-26-console-maintenance.md) + - [[2023-08-31] TiDB Cloud Console Maintenance Notification](/tidb-cloud/releases/notification-2023-08-31-console-maintenance.md) diff --git a/TOC-tidb-cloud-starter.md b/TOC-tidb-cloud-starter.md index 85873ade17fa5..d8fa6020884bd 100644 --- a/TOC-tidb-cloud-starter.md +++ b/TOC-tidb-cloud-starter.md @@ -12,7 +12,6 @@ - Get Started - [Try Out TiDB Cloud](/tidb-cloud/tidb-cloud-quickstart.md) - [Try Out TiDB + AI Tools](/tidb-cloud/use-tidb-cloud-with-ai-tools.md) - - [Try Out TiDB + Vector Search](/vector-search/vector-search-get-started-using-python.md) - [Try Out HTAP](/tidb-cloud/tidb-cloud-htap-quickstart.md) - [Try Out TiDB Cloud CLI](/tidb-cloud/get-started-with-cli.md) - Key Concepts @@ -29,105 +28,6 @@ - [Backup & Restore](/tidb-cloud/backup-and-restore-concepts.md) - [Security](/tidb-cloud/security-concepts.md) -## DEVELOP - -- Development Quick Start - - [Developer Guide Overview](/develop/dev-guide-overview.md) - - [Build a TiDB Cloud Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - - [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) -- Connect to TiDB Cloud - - GUI Database Tools - - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) - - [DBeaver](/develop/dev-guide-gui-dbeaver.md) - - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) - - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) - - [Navicat](/develop/dev-guide-gui-navicat.md) - - [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) - - Java - - [JDBC](/develop/dev-guide-sample-application-java-jdbc.md) - - [MyBatis](/develop/dev-guide-sample-application-java-mybatis.md) - - [Hibernate](/develop/dev-guide-sample-application-java-hibernate.md) - - [Spring Boot](/develop/dev-guide-sample-application-java-spring-boot.md) - - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - - Go - - [Go-MySQL-Driver](/develop/dev-guide-sample-application-golang-sql-driver.md) - - [GORM](/develop/dev-guide-sample-application-golang-gorm.md) - - Python - - [mysqlclient](/develop/dev-guide-sample-application-python-mysqlclient.md) - - [MySQL Connector/Python](/develop/dev-guide-sample-application-python-mysql-connector.md) - - [PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) - - [SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) - - [peewee](/develop/dev-guide-sample-application-python-peewee.md) - - [Django](/develop/dev-guide-sample-application-python-django.md) - - Node.js - - [node-mysql2](/develop/dev-guide-sample-application-nodejs-mysql2.md) - - [mysql.js](/develop/dev-guide-sample-application-nodejs-mysqljs.md) - - [Prisma](/develop/dev-guide-sample-application-nodejs-prisma.md) - - [Sequelize](/develop/dev-guide-sample-application-nodejs-sequelize.md) - - [TypeORM](/develop/dev-guide-sample-application-nodejs-typeorm.md) - - [Next.js](/develop/dev-guide-sample-application-nextjs.md) - - [AWS Lambda](/develop/dev-guide-sample-application-aws-lambda.md) - - Ruby - - [mysql2](/develop/dev-guide-sample-application-ruby-mysql2.md) - - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) - - C# - - [C#](/develop/dev-guide-sample-application-cs.md) - - [WordPress](/tidb-cloud/dev-guide-wordpress.md) - - Serverless Driver ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [TiDB Cloud Serverless Driver](/tidb-cloud/serverless-driver.md) - - [Node.js Example](/tidb-cloud/serverless-driver-node-example.md) - - [Prisma Example](/tidb-cloud/serverless-driver-prisma-example.md) - - [Kysely Example](/tidb-cloud/serverless-driver-kysely-example.md) - - [Drizzle Example](/tidb-cloud/serverless-driver-drizzle-example.md) -- Development Reference - - Design Database Schema - - [Overview](/develop/dev-guide-schema-design-overview.md) - - [Create a Database](/develop/dev-guide-create-database.md) - - [Create a Table](/develop/dev-guide-create-table.md) - - [Create a Secondary Index](/develop/dev-guide-create-secondary-indexes.md) - - Write Data - - [Insert Data](/develop/dev-guide-insert-data.md) - - [Update Data](/develop/dev-guide-update-data.md) - - [Delete Data](/develop/dev-guide-delete-data.md) - - [Periodically Delete Expired Data Using TTL (Time to Live)](/time-to-live.md) - - [Prepared Statements](/develop/dev-guide-prepared-statement.md) - - Read Data - - [Query Data from a Single Table](/develop/dev-guide-get-data-from-single-table.md) - - [Multi-table Join Queries](/develop/dev-guide-join-tables.md) - - [Subquery](/develop/dev-guide-use-subqueries.md) - - [Paginate Results](/develop/dev-guide-paginate-results.md) - - [Views](/develop/dev-guide-use-views.md) - - [Temporary Tables](/develop/dev-guide-use-temporary-tables.md) - - [Common Table Expression](/develop/dev-guide-use-common-table-expression.md) - - Read Replica Data - - [Follower Read](/develop/dev-guide-use-follower-read.md) - - [Stale Read](/develop/dev-guide-use-stale-read.md) - - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) - - Transaction - - [Overview](/develop/dev-guide-transaction-overview.md) - - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) - - [Transaction Restraints](/develop/dev-guide-transaction-restraints.md) - - [Handle Transaction Errors](/develop/dev-guide-transaction-troubleshoot.md) - - Optimize - - [Overview](/develop/dev-guide-optimize-sql-overview.md) - - [SQL Performance Tuning](/develop/dev-guide-optimize-sql.md) - - [Best Practices for Performance Tuning](/develop/dev-guide-optimize-sql-best-practices.md) - - [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md) - - Other Optimization Methods - - [Avoid Implicit Type Conversions](/develop/dev-guide-implicit-type-conversion.md) - - [Unique Serial Number Generation](/develop/dev-guide-unique-serial-number-generation.md) - - Troubleshoot - - [SQL or Transaction Issues](/develop/dev-guide-troubleshoot-overview.md) - - [Unstable Result Set](/develop/dev-guide-unstable-result-set.md) - - [Timeouts](/develop/dev-guide-timeouts-in-tidb.md) - - Development Guidelines - - [Object Naming Convention](/develop/dev-guide-object-naming-guidelines.md) - - [SQL Development Specifications](/develop/dev-guide-sql-development-specification.md) - - [Bookshop Example Application](/develop/dev-guide-bookshop-schema-design.md) - - Third-Party Support - - [Third-Party Tools Supported by TiDB](/develop/dev-guide-third-party-support.md) - - [Known Incompatibility Issues with Third-Party Tools](/develop/dev-guide-third-party-tools-compatibility.md) - ## GUIDES - Manage Cluster @@ -135,7 +35,7 @@ - Manage TiDB Cloud Clusters - [Create a TiDB Cloud Cluster](/tidb-cloud/create-tidb-cluster-serverless.md) - Connect to Your TiDB Cloud Cluster - - [Connection Overview](/tidb-cloud/connect-to-tidb-cluster-serverless.md) + - [Network Connection Overview](/tidb-cloud/connect-to-tidb-cluster-serverless.md) - [Connect via Public Endpoint](/tidb-cloud/connect-via-standard-connection-serverless.md) - [Connect via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections-serverless.md) - [Connect via Private Endpoint with Alibaba Cloud](/tidb-cloud/set-up-private-endpoint-connections-on-alibaba-cloud.md) @@ -237,43 +137,6 @@ - Explore Data - [Chat2Query in SQL Editor](/tidb-cloud/explore-data-with-chat2query.md) ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [SQL Proxy Account](/tidb-cloud/sql-proxy-account.md) -- Vector Search ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/vector-search/vector-search-overview.md) - - Get Started - - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - - Auto Embedding - - [Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) - - [Amazon Titan Embeddings](/tidb-cloud/vector-search-auto-embedding-amazon-titan.md) - - [Cohere Embeddings](/tidb-cloud/vector-search-auto-embedding-cohere.md) - - [Jina AI Embeddings](/tidb-cloud/vector-search-auto-embedding-jina-ai.md) - - [OpenAI Embeddings](/tidb-cloud/vector-search-auto-embedding-openai.md) - - [Gemini Embeddings](/tidb-cloud/vector-search-auto-embedding-gemini.md) - - [HuggingFace Embeddings](/tidb-cloud/vector-search-auto-embedding-huggingface.md) - - [NVIDIA NIM Embeddings](/tidb-cloud/vector-search-auto-embedding-nvidia-nim.md) - - Integrations - - [Overview](/vector-search/vector-search-integration-overview.md) - - AI Frameworks - - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) - - [LangChain](/vector-search/vector-search-integrate-with-langchain.md) - - AI Services - - [Amazon Bedrock](/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md) - - Embedding Models/Services - - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - - ORM Libraries - - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search/vector-search-integrate-with-peewee.md) - - [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md) - - Text Search - - [Full-Text Search with SQL](/tidb-cloud/vector-search-full-text-search-sql.md) - - [Full-Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md) - - [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) - - Reference - - [Vector Data Types](/vector-search/vector-search-data-types.md) - - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) - - [Vector Index](/vector-search/vector-search-index.md) - - [Improve Performance](/vector-search/vector-search-improve-performance.md) - - [Limitations](/vector-search/vector-search-limitations.md) - Data Service ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [Overview](/tidb-cloud/data-service-overview.md) - [Get Started](/tidb-cloud/data-service-get-started.md) @@ -596,15 +459,7 @@ - [Overview](/sys-schema/sys-schema.md) - [`schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md) - [Metadata Lock](/metadata-lock.md) - - [Use UUIDs](/best-practices/uuid.md) - [TiDB Accelerated Table Creation](/accelerated-table-creation.md) -- API Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/tidb-cloud/api-overview.md) - - v1beta1 - - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing) - - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam) - - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) - - [v1beta](https://docs.pingcap.com/tidbcloud/api/v1beta) - CLI Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [Overview](/tidb-cloud/cli-reference.md) - auth @@ -687,7 +542,6 @@ - [Server Status Variables](/status-variables.md) - [Table Filter](/table-filter.md) - [URI Formats of External Storage Services](/external-storage-uri.md) - - [DDL Execution Principles and Best Practices](/ddl-introduction.md) - [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md) - [Notifications](/tidb-cloud/notifications.md) - Support Plan @@ -706,9 +560,3 @@ - [TiDB Cloud FAQs](/tidb-cloud/tidb-cloud-faq.md) - [{{{ .starter }}} FAQs](/tidb-cloud/serverless-faqs.md) - [Glossary](/tidb-cloud/tidb-cloud-glossary.md) - -## RELEASES - -- Release Notes - - [2026](/tidb-cloud/tidb-cloud-release-notes.md) - - [2025](/tidb-cloud/release-notes-2025.md) diff --git a/TOC-tidb-cloud.md b/TOC-tidb-cloud.md index 943cfd24d5048..2c0959c954a6b 100644 --- a/TOC-tidb-cloud.md +++ b/TOC-tidb-cloud.md @@ -11,7 +11,6 @@ - [MySQL Compatibility](/mysql-compatibility.md) - Get Started - [Try Out TiDB Cloud](/tidb-cloud/tidb-cloud-quickstart.md) - - [Try Out TiDB + AI](/vector-search/vector-search-get-started-using-python.md) - [Try Out HTAP](/tidb-cloud/tidb-cloud-htap-quickstart.md) - [Perform a PoC](/tidb-cloud/tidb-cloud-poc.md) - Key Concepts @@ -29,97 +28,6 @@ - [Backup & Restore](/tidb-cloud/backup-and-restore-concepts.md) - [Security](/tidb-cloud/security-concepts.md) -## DEVELOP - -- Development Quick Start - - [Developer Guide Overview](/develop/dev-guide-overview.md) - - [Build a TiDB Cloud Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - - [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) -- Connect to TiDB Cloud - - GUI Database Tools - - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) - - [DBeaver](/develop/dev-guide-gui-dbeaver.md) - - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) - - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) - - [Navicat](/develop/dev-guide-gui-navicat.md) - - [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) - - Java - - [JDBC](/develop/dev-guide-sample-application-java-jdbc.md) - - [MyBatis](/develop/dev-guide-sample-application-java-mybatis.md) - - [Hibernate](/develop/dev-guide-sample-application-java-hibernate.md) - - [Spring Boot](/develop/dev-guide-sample-application-java-spring-boot.md) - - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - - Go - - [Go-MySQL-Driver](/develop/dev-guide-sample-application-golang-sql-driver.md) - - [GORM](/develop/dev-guide-sample-application-golang-gorm.md) - - Python - - [mysqlclient](/develop/dev-guide-sample-application-python-mysqlclient.md) - - [MySQL Connector/Python](/develop/dev-guide-sample-application-python-mysql-connector.md) - - [PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) - - [SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) - - [peewee](/develop/dev-guide-sample-application-python-peewee.md) - - [Django](/develop/dev-guide-sample-application-python-django.md) - - Node.js - - [node-mysql2](/develop/dev-guide-sample-application-nodejs-mysql2.md) - - [mysql.js](/develop/dev-guide-sample-application-nodejs-mysqljs.md) - - [Prisma](/develop/dev-guide-sample-application-nodejs-prisma.md) - - [Sequelize](/develop/dev-guide-sample-application-nodejs-sequelize.md) - - [TypeORM](/develop/dev-guide-sample-application-nodejs-typeorm.md) - - Ruby - - [mysql2](/develop/dev-guide-sample-application-ruby-mysql2.md) - - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) - - C# - - [C#](/develop/dev-guide-sample-application-cs.md) - - [WordPress](/tidb-cloud/dev-guide-wordpress.md) -- Development Reference - - Design Database Schema - - [Overview](/develop/dev-guide-schema-design-overview.md) - - [Create a Database](/develop/dev-guide-create-database.md) - - [Create a Table](/develop/dev-guide-create-table.md) - - [Create a Secondary Index](/develop/dev-guide-create-secondary-indexes.md) - - Write Data - - [Insert Data](/develop/dev-guide-insert-data.md) - - [Update Data](/develop/dev-guide-update-data.md) - - [Delete Data](/develop/dev-guide-delete-data.md) - - [Periodically Delete Expired Data Using TTL (Time to Live)](/time-to-live.md) - - [Prepared Statements](/develop/dev-guide-prepared-statement.md) - - Read Data - - [Query Data from a Single Table](/develop/dev-guide-get-data-from-single-table.md) - - [Multi-table Join Queries](/develop/dev-guide-join-tables.md) - - [Subquery](/develop/dev-guide-use-subqueries.md) - - [Paginate Results](/develop/dev-guide-paginate-results.md) - - [Views](/develop/dev-guide-use-views.md) - - [Temporary Tables](/develop/dev-guide-use-temporary-tables.md) - - [Common Table Expression](/develop/dev-guide-use-common-table-expression.md) - - Read Replica Data - - [Follower Read](/develop/dev-guide-use-follower-read.md) - - [Stale Read](/develop/dev-guide-use-stale-read.md) - - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) - - Transaction - - [Overview](/develop/dev-guide-transaction-overview.md) - - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) - - [Transaction Restraints](/develop/dev-guide-transaction-restraints.md) - - [Handle Transaction Errors](/develop/dev-guide-transaction-troubleshoot.md) - - Optimize - - [Overview](/develop/dev-guide-optimize-sql-overview.md) - - [SQL Performance Tuning](/develop/dev-guide-optimize-sql.md) - - [Best Practices for Performance Tuning](/develop/dev-guide-optimize-sql-best-practices.md) - - [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md) - - Other Optimization Methods - - [Avoid Implicit Type Conversions](/develop/dev-guide-implicit-type-conversion.md) - - [Unique Serial Number Generation](/develop/dev-guide-unique-serial-number-generation.md) - - Troubleshoot - - [SQL or Transaction Issues](/develop/dev-guide-troubleshoot-overview.md) - - [Unstable Result Set](/develop/dev-guide-unstable-result-set.md) - - [Timeouts](/develop/dev-guide-timeouts-in-tidb.md) - - Development Guidelines - - [Object Naming Convention](/develop/dev-guide-object-naming-guidelines.md) - - [SQL Development Specifications](/develop/dev-guide-sql-development-specification.md) - - [Bookshop Example Application](/develop/dev-guide-bookshop-schema-design.md) - - Third-Party Support - - [Third-Party Tools Supported by TiDB](/develop/dev-guide-third-party-support.md) - - [Known Incompatibility Issues with Third-Party Tools](/develop/dev-guide-third-party-tools-compatibility.md) - ## GUIDES - Manage Cluster @@ -129,7 +37,7 @@ - [TiDB Cloud Performance Reference](/tidb-cloud/tidb-cloud-performance-reference.md) - [Create a TiDB Cloud Dedicated Cluster](/tidb-cloud/create-tidb-cluster.md) - Connect to Your TiDB Cloud Dedicated Cluster - - [Connection Method Overview](/tidb-cloud/connect-to-tidb-cluster.md) + - [Network Connection Overview](/tidb-cloud/connect-to-tidb-cluster.md) - [Connect via Public Connection](/tidb-cloud/connect-via-standard-connection.md) - [Connect via Private Endpoint with AWS](/tidb-cloud/set-up-private-endpoint-connections.md) - [Connect via Private Endpoint with Azure](/tidb-cloud/set-up-private-endpoint-connections-on-azure.md) @@ -259,31 +167,6 @@ - Explore Data - [Chat2Query in SQL Editor](/tidb-cloud/explore-data-with-chat2query.md) ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [SQL Proxy Account](/tidb-cloud/sql-proxy-account.md) -- Vector Search ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/vector-search/vector-search-overview.md) - - Get Started - - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - - Integrations - - [Overview](/vector-search/vector-search-integration-overview.md) - - AI Frameworks - - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) - - [LangChain](/vector-search/vector-search-integrate-with-langchain.md) - - AI Services - - [Amazon Bedrock](/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md) - - Embedding Models/Services - - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - - ORM Libraries - - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search/vector-search-integrate-with-peewee.md) - - [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md) - - Reference - - [Vector Data Types](/vector-search/vector-search-data-types.md) - - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) - - [Vector Index](/vector-search/vector-search-index.md) - - [Improve Performance](/vector-search/vector-search-improve-performance.md) - - [Limitations](/vector-search/vector-search-limitations.md) - - [Changelogs](/tidb-cloud/vector-search-changelogs.md) - Data Service ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - [Overview](/tidb-cloud/data-service-overview.md) - [Get Started](/tidb-cloud/data-service-get-started.md) @@ -679,19 +562,8 @@ - [Overview](/sys-schema/sys-schema.md) - [`schema_unused_indexes`](/sys-schema/sys-schema-unused-indexes.md) - [Metadata Lock](/metadata-lock.md) - - [Use UUIDs](/best-practices/uuid.md) - [TiDB Accelerated Table Creation](/accelerated-table-creation.md) - [Schema Cache](/schema-cache.md) -- API Reference ![BETA](/media/tidb-cloud/blank_transparent_placeholder.png) - - [Overview](/tidb-cloud/api-overview.md) - - v1beta1 - - [TiDB Cloud Starter and Essential](https://docs.pingcap.com/tidbcloud/api/v1beta1/serverless) - - [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/api/v1beta1/dedicated) - - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing) - - [Data Service](https://docs.pingcap.com/tidbcloud/api/v1beta1/dataservice) - - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam) - - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) - - [v1beta](https://docs.pingcap.com/tidbcloud/api/v1beta) - General Reference - TiDB Classic Architecture - [Overview](/tidb-architecture.md) @@ -738,7 +610,6 @@ - [Server Status Variables](/status-variables.md) - [Table Filter](/table-filter.md) - [URI Formats of External Storage Services](/external-storage-uri.md) - - [DDL Execution Principles and Best Practices](/ddl-introduction.md) - [`ANALYZE` Embedded in DDL Statements](/ddl_embedded_analyze.md) - [Batch Processing](/batch-processing.md) - [Troubleshoot Inconsistency Between Data and Indexes](/troubleshoot-data-inconsistency-errors.md) @@ -765,26 +636,6 @@ - [TiDB Cloud FAQs](/tidb-cloud/tidb-cloud-faq.md) - [Glossary](/tidb-cloud/tidb-cloud-glossary.md) -## RELEASES - -- Release Notes - - [2026](/tidb-cloud/tidb-cloud-release-notes.md) - - [2025](/tidb-cloud/release-notes-2025.md) - - [2024](/tidb-cloud/release-notes-2024.md) - - [2023](/tidb-cloud/release-notes-2023.md) - - [2022](/tidb-cloud/release-notes-2022.md) - - [2021](/tidb-cloud/release-notes-2021.md) - - [2020](/tidb-cloud/release-notes-2020.md) -- Maintenance Notification - - [[2024-09-15] TiDB Cloud Console Maintenance Notification](/tidb-cloud/notification-2024-09-15-console-maintenance.md) - - [[2024-04-18] TiDB Cloud Data Migration (DM) Feature Maintenance Notification](/tidb-cloud/notification-2024-04-18-dm-feature-maintenance.md) - - [[2024-04-16] TiDB Cloud Monitoring Features Maintenance Notification](/tidb-cloud/notification-2024-04-16-monitoring-features-maintenance.md) - - [[2024-04-11] TiDB Cloud Data Migration (DM) Feature Maintenance Notification](/tidb-cloud/notification-2024-04-11-dm-feature-maintenance.md) - - [[2024-04-09] TiDB Cloud Monitoring Features Maintenance Notification](/tidb-cloud/notification-2024-04-09-monitoring-features-maintenance.md) - - [[2023-11-14] TiDB Cloud Dedicated Scale Feature Maintenance Notification](/tidb-cloud/notification-2023-11-14-scale-feature-maintenance.md) - - [[2023-09-26] TiDB Cloud Console Maintenance Notification](/tidb-cloud/notification-2023-09-26-console-maintenance.md) - - [[2023-08-31] TiDB Cloud Console Maintenance Notification](/tidb-cloud/notification-2023-08-31-console-maintenance.md) - ## _BUILD_ALLOWLIST - [Manage Database Users and Roles](/tidb-cloud/configure-sql-users.md) diff --git a/TOC-tidb-releases.md b/TOC-tidb-releases.md new file mode 100644 index 0000000000000..6a6f2f5708e4d --- /dev/null +++ b/TOC-tidb-releases.md @@ -0,0 +1,246 @@ + + + +# Table of Contents + +## OVERVIEW + +- [Release Timeline](/releases/release-timeline.md) +- [TiDB Versioning](/releases/versioning.md) +- [Release Support Policy](https://www.pingcap.com/tidb-release-support-policy/) + +## RELEASE NOTES + +- v8.5 + - [8.5.5](/releases/release-8.5.5.md) + - [8.5.4](/releases/release-8.5.4.md) + - [8.5.3](/releases/release-8.5.3.md) + - [8.5.2](/releases/release-8.5.2.md) + - [8.5.1](/releases/release-8.5.1.md) + - [8.5.0](/releases/release-8.5.0.md) +- v8.4 + - [8.4.0-DMR](/releases/release-8.4.0.md) +- v8.3 + - [8.3.0-DMR](/releases/release-8.3.0.md) +- v8.2 + - [8.2.0-DMR](/releases/release-8.2.0.md) +- v8.1 + - [8.1.2](/releases/release-8.1.2.md) + - [8.1.1](/releases/release-8.1.1.md) + - [8.1.0](/releases/release-8.1.0.md) +- v8.0 + - [8.0.0-DMR](/releases/release-8.0.0.md) +- v7.6 + - [7.6.0-DMR](/releases/release-7.6.0.md) +- v7.5 + - [7.5.7](/releases/release-7.5.7.md) + - [7.5.6](/releases/release-7.5.6.md) + - [7.5.5](/releases/release-7.5.5.md) + - [7.5.4](/releases/release-7.5.4.md) + - [7.5.3](/releases/release-7.5.3.md) + - [7.5.2](/releases/release-7.5.2.md) + - [7.5.1](/releases/release-7.5.1.md) + - [7.5.0](/releases/release-7.5.0.md) +- v7.4 + - [7.4.0-DMR](/releases/release-7.4.0.md) +- v7.3 + - [7.3.0-DMR](/releases/release-7.3.0.md) +- v7.2 + - [7.2.0-DMR](/releases/release-7.2.0.md) +- v7.1 + - [7.1.6](/releases/release-7.1.6.md) + - [7.1.5](/releases/release-7.1.5.md) + - [7.1.4](/releases/release-7.1.4.md) + - [7.1.3](/releases/release-7.1.3.md) + - [7.1.2](/releases/release-7.1.2.md) + - [7.1.1](/releases/release-7.1.1.md) + - [7.1.0](/releases/release-7.1.0.md) +- v7.0 + - [7.0.0-DMR](/releases/release-7.0.0.md) +- v6.6 + - [6.6.0-DMR](/releases/release-6.6.0.md) +- v6.5 + - [6.5.12](/releases/release-6.5.12.md) + - [6.5.11](/releases/release-6.5.11.md) + - [6.5.10](/releases/release-6.5.10.md) + - [6.5.9](/releases/release-6.5.9.md) + - [6.5.8](/releases/release-6.5.8.md) + - [6.5.7](/releases/release-6.5.7.md) + - [6.5.6](/releases/release-6.5.6.md) + - [6.5.5](/releases/release-6.5.5.md) + - [6.5.4](/releases/release-6.5.4.md) + - [6.5.3](/releases/release-6.5.3.md) + - [6.5.2](/releases/release-6.5.2.md) + - [6.5.1](/releases/release-6.5.1.md) + - [6.5.0](/releases/release-6.5.0.md) +- v6.4 + - [6.4.0-DMR](/releases/release-6.4.0.md) +- v6.3 + - [6.3.0-DMR](/releases/release-6.3.0.md) +- v6.2 + - [6.2.0-DMR](/releases/release-6.2.0.md) +- v6.1 + - [6.1.7](/releases/release-6.1.7.md) + - [6.1.6](/releases/release-6.1.6.md) + - [6.1.5](/releases/release-6.1.5.md) + - [6.1.4](/releases/release-6.1.4.md) + - [6.1.3](/releases/release-6.1.3.md) + - [6.1.2](/releases/release-6.1.2.md) + - [6.1.1](/releases/release-6.1.1.md) + - [6.1.0](/releases/release-6.1.0.md) +- v6.0 + - [6.0.0-DMR](/releases/release-6.0.0-dmr.md) +- v5.4 + - [5.4.3](/releases/release-5.4.3.md) + - [5.4.2](/releases/release-5.4.2.md) + - [5.4.1](/releases/release-5.4.1.md) + - [5.4.0](/releases/release-5.4.0.md) +- End of Life Releases + - v5.3 + - [5.3.4](/releases/release-5.3.4.md) + - [5.3.3](/releases/release-5.3.3.md) + - [5.3.2](/releases/release-5.3.2.md) + - [5.3.1](/releases/release-5.3.1.md) + - [5.3.0](/releases/release-5.3.0.md) + - v5.2 + - [5.2.4](/releases/release-5.2.4.md) + - [5.2.3](/releases/release-5.2.3.md) + - [5.2.2](/releases/release-5.2.2.md) + - [5.2.1](/releases/release-5.2.1.md) + - [5.2.0](/releases/release-5.2.0.md) + - v5.1 + - [5.1.5](/releases/release-5.1.5.md) + - [5.1.4](/releases/release-5.1.4.md) + - [5.1.3](/releases/release-5.1.3.md) + - [5.1.2](/releases/release-5.1.2.md) + - [5.1.1](/releases/release-5.1.1.md) + - [5.1.0](/releases/release-5.1.0.md) + - v5.0 + - [5.0.6](/releases/release-5.0.6.md) + - [5.0.5](/releases/release-5.0.5.md) + - [5.0.4](/releases/release-5.0.4.md) + - [5.0.3](/releases/release-5.0.3.md) + - [5.0.2](/releases/release-5.0.2.md) + - [5.0.1](/releases/release-5.0.1.md) + - [5.0 GA](/releases/release-5.0.0.md) + - [5.0.0-rc](/releases/release-5.0.0-rc.md) + - v4.0 + - [4.0.16](/releases/release-4.0.16.md) + - [4.0.15](/releases/release-4.0.15.md) + - [4.0.14](/releases/release-4.0.14.md) + - [4.0.13](/releases/release-4.0.13.md) + - [4.0.12](/releases/release-4.0.12.md) + - [4.0.11](/releases/release-4.0.11.md) + - [4.0.10](/releases/release-4.0.10.md) + - [4.0.9](/releases/release-4.0.9.md) + - [4.0.8](/releases/release-4.0.8.md) + - [4.0.7](/releases/release-4.0.7.md) + - [4.0.6](/releases/release-4.0.6.md) + - [4.0.5](/releases/release-4.0.5.md) + - [4.0.4](/releases/release-4.0.4.md) + - [4.0.3](/releases/release-4.0.3.md) + - [4.0.2](/releases/release-4.0.2.md) + - [4.0.1](/releases/release-4.0.1.md) + - [4.0 GA](/releases/release-4.0-ga.md) + - [4.0.0-rc.2](/releases/release-4.0.0-rc.2.md) + - [4.0.0-rc.1](/releases/release-4.0.0-rc.1.md) + - [4.0.0-rc](/releases/release-4.0.0-rc.md) + - [4.0.0-beta.2](/releases/release-4.0.0-beta.2.md) + - [4.0.0-beta.1](/releases/release-4.0.0-beta.1.md) + - [4.0.0-beta](/releases/release-4.0.0-beta.md) + - v3.1 + - [3.1.2](/releases/release-3.1.2.md) + - [3.1.1](/releases/release-3.1.1.md) + - [3.1.0 GA](/releases/release-3.1.0-ga.md) + - [3.1.0-rc](/releases/release-3.1.0-rc.md) + - [3.1.0-beta.2](/releases/release-3.1.0-beta.2.md) + - [3.1.0-beta.1](/releases/release-3.1.0-beta.1.md) + - [3.1.0-beta](/releases/release-3.1.0-beta.md) + - v3.0 + - [3.0.20](/releases/release-3.0.20.md) + - [3.0.19](/releases/release-3.0.19.md) + - [3.0.18](/releases/release-3.0.18.md) + - [3.0.17](/releases/release-3.0.17.md) + - [3.0.16](/releases/release-3.0.16.md) + - [3.0.15](/releases/release-3.0.15.md) + - [3.0.14](/releases/release-3.0.14.md) + - [3.0.13](/releases/release-3.0.13.md) + - [3.0.12](/releases/release-3.0.12.md) + - [3.0.11](/releases/release-3.0.11.md) + - [3.0.10](/releases/release-3.0.10.md) + - [3.0.9](/releases/release-3.0.9.md) + - [3.0.8](/releases/release-3.0.8.md) + - [3.0.7](/releases/release-3.0.7.md) + - [3.0.6](/releases/release-3.0.6.md) + - [3.0.5](/releases/release-3.0.5.md) + - [3.0.4](/releases/release-3.0.4.md) + - [3.0.3](/releases/release-3.0.3.md) + - [3.0.2](/releases/release-3.0.2.md) + - [3.0.1](/releases/release-3.0.1.md) + - [3.0 GA](/releases/release-3.0-ga.md) + - [3.0.0-rc.3](/releases/release-3.0.0-rc.3.md) + - [3.0.0-rc.2](/releases/release-3.0.0-rc.2.md) + - [3.0.0-rc.1](/releases/release-3.0.0-rc.1.md) + - [3.0.0-beta.1](/releases/release-3.0.0-beta.1.md) + - [3.0.0-beta](/releases/release-3.0-beta.md) + - v2.1 + - [2.1.19](/releases/release-2.1.19.md) + - [2.1.18](/releases/release-2.1.18.md) + - [2.1.17](/releases/release-2.1.17.md) + - [2.1.16](/releases/release-2.1.16.md) + - [2.1.15](/releases/release-2.1.15.md) + - [2.1.14](/releases/release-2.1.14.md) + - [2.1.13](/releases/release-2.1.13.md) + - [2.1.12](/releases/release-2.1.12.md) + - [2.1.11](/releases/release-2.1.11.md) + - [2.1.10](/releases/release-2.1.10.md) + - [2.1.9](/releases/release-2.1.9.md) + - [2.1.8](/releases/release-2.1.8.md) + - [2.1.7](/releases/release-2.1.7.md) + - [2.1.6](/releases/release-2.1.6.md) + - [2.1.5](/releases/release-2.1.5.md) + - [2.1.4](/releases/release-2.1.4.md) + - [2.1.3](/releases/release-2.1.3.md) + - [2.1.2](/releases/release-2.1.2.md) + - [2.1.1](/releases/release-2.1.1.md) + - [2.1 GA](/releases/release-2.1-ga.md) + - [2.1 RC5](/releases/release-2.1-rc.5.md) + - [2.1 RC4](/releases/release-2.1-rc.4.md) + - [2.1 RC3](/releases/release-2.1-rc.3.md) + - [2.1 RC2](/releases/release-2.1-rc.2.md) + - [2.1 RC1](/releases/release-2.1-rc.1.md) + - [2.1 Beta](/releases/release-2.1-beta.md) + - v2.0 + - [2.0.11](/releases/release-2.0.11.md) + - [2.0.10](/releases/release-2.0.10.md) + - [2.0.9](/releases/release-2.0.9.md) + - [2.0.8](/releases/release-2.0.8.md) + - [2.0.7](/releases/release-2.0.7.md) + - [2.0.6](/releases/release-2.0.6.md) + - [2.0.5](/releases/release-2.0.5.md) + - [2.0.4](/releases/release-2.0.4.md) + - [2.0.3](/releases/release-2.0.3.md) + - [2.0.2](/releases/release-2.0.2.md) + - [2.0.1](/releases/release-2.0.1.md) + - [2.0](/releases/release-2.0-ga.md) + - [2.0 RC5](/releases/release-2.0-rc.5.md) + - [2.0 RC4](/releases/release-2.0-rc.4.md) + - [2.0 RC3](/releases/release-2.0-rc.3.md) + - [2.0 RC1](/releases/release-2.0-rc.1.md) + - [1.1 Beta](/releases/release-1.1-beta.md) + - [1.1 Alpha](/releases/release-1.1-alpha.md) + - v1.0 + - [1.0.8](/releases/release-1.0.8.md) + - [1.0.7](/releases/release-1.0.7.md) + - [1.0.6](/releases/release-1.0.6.md) + - [1.0.5](/releases/release-1.0.5.md) + - [1.0.4](/releases/release-1.0.4.md) + - [1.0.3](/releases/release-1.0.3.md) + - [1.0.2](/releases/release-1.0.2.md) + - [1.0.1](/releases/release-1.0.1.md) + - [1.0](/releases/release-1.0-ga.md) + - [Pre-GA](/releases/release-pre-ga.md) + - [RC4](/releases/release-rc.4.md) + - [RC3](/releases/release-rc.3.md) + - [RC2](/releases/release-rc.2.md) + - [RC1](/releases/release-rc.1.md) diff --git a/TOC.md b/TOC.md index 984b58757c871..f110a6c9f0b3e 100644 --- a/TOC.md +++ b/TOC.md @@ -14,120 +14,6 @@ - [Explore SQL with TiDB](/basic-sql-operations.md) - [Explore HTAP](/explore-htap.md) - [Import Example Database](/import-example-data.md) -- Develop - - [Overview](/develop/dev-guide-overview.md) - - Quick Start - - [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - - [CRUD SQL in TiDB](/develop/dev-guide-tidb-crud-sql.md) - - Example Applications - - Java - - [JDBC](/develop/dev-guide-sample-application-java-jdbc.md) - - [MyBatis](/develop/dev-guide-sample-application-java-mybatis.md) - - [Hibernate](/develop/dev-guide-sample-application-java-hibernate.md) - - [Spring Boot](/develop/dev-guide-sample-application-java-spring-boot.md) - - Go - - [Go-MySQL-Driver](/develop/dev-guide-sample-application-golang-sql-driver.md) - - [GORM](/develop/dev-guide-sample-application-golang-gorm.md) - - Python - - [mysqlclient](/develop/dev-guide-sample-application-python-mysqlclient.md) - - [MySQL Connector/Python](/develop/dev-guide-sample-application-python-mysql-connector.md) - - [PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) - - [SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) - - [peewee](/develop/dev-guide-sample-application-python-peewee.md) - - [Django](/develop/dev-guide-sample-application-python-django.md) - - Node.js - - [node-mysql2](/develop/dev-guide-sample-application-nodejs-mysql2.md) - - [mysql.js](/develop/dev-guide-sample-application-nodejs-mysqljs.md) - - [Prisma](/develop/dev-guide-sample-application-nodejs-prisma.md) - - [Sequelize](/develop/dev-guide-sample-application-nodejs-sequelize.md) - - [TypeORM](/develop/dev-guide-sample-application-nodejs-typeorm.md) - - [Next.js](/develop/dev-guide-sample-application-nextjs.md) - - [AWS Lambda](/develop/dev-guide-sample-application-aws-lambda.md) - - Ruby - - [mysql2](/develop/dev-guide-sample-application-ruby-mysql2.md) - - [Rails](/develop/dev-guide-sample-application-ruby-rails.md) - - C# - - [C#](/develop/dev-guide-sample-application-cs.md) - - Connect to TiDB - - GUI Database Tools - - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) - - [DBeaver](/develop/dev-guide-gui-dbeaver.md) - - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) - - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) - - [Navicat](/develop/dev-guide-gui-navicat.md) - - [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) - - [Connect to TiDB](/develop/dev-guide-connect-to-tidb.md) - - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - - Design Database Schema - - [Overview](/develop/dev-guide-schema-design-overview.md) - - [Create a Database](/develop/dev-guide-create-database.md) - - [Create a Table](/develop/dev-guide-create-table.md) - - [Create a Secondary Index](/develop/dev-guide-create-secondary-indexes.md) - - Write Data - - [Insert Data](/develop/dev-guide-insert-data.md) - - [Update Data](/develop/dev-guide-update-data.md) - - [Delete Data](/develop/dev-guide-delete-data.md) - - [Periodically Delete Data Using Time to Live](/time-to-live.md) - - [Prepared Statements](/develop/dev-guide-prepared-statement.md) - - Read Data - - [Query Data from a Single Table](/develop/dev-guide-get-data-from-single-table.md) - - [Multi-table Join Queries](/develop/dev-guide-join-tables.md) - - [Subquery](/develop/dev-guide-use-subqueries.md) - - [Paginate Results](/develop/dev-guide-paginate-results.md) - - [Views](/develop/dev-guide-use-views.md) - - [Temporary Tables](/develop/dev-guide-use-temporary-tables.md) - - [Common Table Expression](/develop/dev-guide-use-common-table-expression.md) - - Read Replica Data - - [Follower Read](/develop/dev-guide-use-follower-read.md) - - [Stale Read](/develop/dev-guide-use-stale-read.md) - - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) - - Vector Search - - [Overview](/vector-search/vector-search-overview.md) - - Get Started - - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - - Integrations - - [Overview](/vector-search/vector-search-integration-overview.md) - - AI Frameworks - - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) - - [Langchain](/vector-search/vector-search-integrate-with-langchain.md) - - Embedding Models/Services - - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - - ORM Libraries - - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search/vector-search-integrate-with-peewee.md) - - [Django](/vector-search/vector-search-integrate-with-django-orm.md) - - [Improve Performance](/vector-search/vector-search-improve-performance.md) - - [Limitations](/vector-search/vector-search-limitations.md) - - Transaction - - [Overview](/develop/dev-guide-transaction-overview.md) - - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) - - [Transaction Restraints](/develop/dev-guide-transaction-restraints.md) - - [Handle Transaction Errors](/develop/dev-guide-transaction-troubleshoot.md) - - Optimize - - [Overview](/develop/dev-guide-optimize-sql-overview.md) - - [SQL Performance Tuning](/develop/dev-guide-optimize-sql.md) - - [Best Practices for Performance Tuning](/develop/dev-guide-optimize-sql-best-practices.md) - - [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md) - - Other Optimization Methods - - [Avoid Implicit Type Conversions](/develop/dev-guide-implicit-type-conversion.md) - - [Unique Serial Number Generation](/develop/dev-guide-unique-serial-number-generation.md) - - Troubleshoot - - [SQL or Transaction Issues](/develop/dev-guide-troubleshoot-overview.md) - - [Unstable Result Set](/develop/dev-guide-unstable-result-set.md) - - [Timeouts](/develop/dev-guide-timeouts-in-tidb.md) - - Reference - - [Bookshop Example Application](/develop/dev-guide-bookshop-schema-design.md) - - Guidelines - - [Object Naming Convention](/develop/dev-guide-object-naming-guidelines.md) - - [SQL Development Specifications](/develop/dev-guide-sql-development-specification.md) - - Cloud Native Development Environment - - [Gitpod](/develop/dev-guide-playground-gitpod.md) - - Third-Party Support - - [Third-Party Tools Supported by TiDB](/develop/dev-guide-third-party-support.md) - - [Known Incompatibility Issues with Third-Party Tools](/develop/dev-guide-third-party-tools-compatibility.md) - - [ProxySQL Integration Guide](/develop/dev-guide-proxysql-integration.md) - - [Amazon AppFlow Integration Guide](/develop/dev-guide-aws-appflow-integration.md) - Deploy - [Software and Hardware Requirements](/hardware-and-software-requirements.md) - [Environment Configuration Checklist](/check-before-deployment.md) @@ -354,7 +240,6 @@ - [TiFlash Performance Analysis Methods](/tiflash-performance-tuning-methods.md) - [TiCDC Performance Analysis Methods](/ticdc-performance-tuning-methods.md) - [Latency Breakdown](/latency-breakdown.md) - - [TiDB Best Practices on Public Cloud](/best-practices-on-public-cloud.md) - Configuration Tuning - [Tune Operating System Performance](/tune-operating-system.md) - [Tune TiDB Memory](/configure-memory-usage.md) @@ -434,23 +319,6 @@ - [TSO Configuration Flags](/command-line-flags-for-tso-configuration.md) - [Scheduling Configuration File](/scheduling-configuration-file.md) - [Scheduling Configuration Flags](/command-line-flags-for-scheduling-configuration.md) -- Best Practices - - [Use TiDB](/best-practices/tidb-best-practices.md) - - [Manage DDL](/ddl-introduction.md) - - [Optimize Multi-Column Indexes](/best-practices/multi-column-index-best-practices.md) - - [Manage Indexes and Identify Unused Indexes](/best-practices/index-management-best-practices.md) - - [Handle Millions of Tables in SaaS Multi-Tenant Scenarios](/best-practices/saas-best-practices.md) - - [Use TiDB Partitioned Tables](/best-practices/tidb-partitioned-tables-best-practices.md) - - [Use UUIDs as Primary Keys](/best-practices/uuid.md) - - [Develop Java Applications](/best-practices/java-app-best-practices.md) - - [Handle High-Concurrency Writes](/best-practices/high-concurrency-best-practices.md) - - [Tune TiKV Performance with Massive Regions](/best-practices/massive-regions-best-practices.md) - - [Tune PD Scheduling](/best-practices/pd-scheduling-best-practices.md) - - [Use Read-Only Storage Nodes](/best-practices/readonly-nodes.md) - - [Use HAProxy for Load Balancing](/best-practices/haproxy-best-practices.md) - - [Monitor TiDB Using Grafana](/best-practices/grafana-monitor-best-practices.md) - - [Three-Node Hybrid Deployment](/best-practices/three-nodes-hybrid-deployment.md) - - [Local Reads in Three-Data-Center Deployments](/best-practices/three-dc-local-read.md) - TiDB Tools - [Overview](/ecosystem-tool-user-guide.md) - [Use Cases](/ecosystem-tool-user-case.md) @@ -946,7 +814,7 @@ - [Date and Time Types](/data-type-date-and-time.md) - [String Types](/data-type-string.md) - [JSON Type](/data-type-json.md) - - [Vector Types](/vector-search/vector-search-data-types.md) + - [Vector Types](/ai/reference/vector-search-data-types.md) - Functions and Operators - [Overview](/functions-and-operators/functions-and-operators-overview.md) - [Type Conversion in Expression Evaluation](/functions-and-operators/type-conversion-in-expression-evaluation.md) @@ -960,7 +828,7 @@ - [Encryption and Compression Functions](/functions-and-operators/encryption-and-compression-functions.md) - [Locking Functions](/functions-and-operators/locking-functions.md) - [Information Functions](/functions-and-operators/information-functions.md) - - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) + - [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) - JSON Functions - [Overview](/functions-and-operators/json-functions.md) - [Functions That Create JSON](/functions-and-operators/json-functions/json-functions-create.md) @@ -983,7 +851,7 @@ - [Comparisons between Functions and Syntax of Oracle and TiDB](/oracle-functions-to-tidb.md) - [Clustered Indexes](/clustered-indexes.md) - [Global Indexes](/global-indexes.md) - - [Vector Index](/vector-search/vector-search-index.md) + - [Vector Index](/ai/reference/vector-search-index.md) - [Constraints](/constraints.md) - [Generated Columns](/generated-columns.md) - [SQL Mode](/sql-mode.md) @@ -1085,6 +953,7 @@ - [Telemetry](/telemetry.md) - [Error Codes](/error-codes.md) - [Table Filter](/table-filter.md) + - [TiDB Installation Packages](/binary-package.md) - [Schedule Replicas by Topology Labels](/schedule-replicas-by-topology-labels.md) - [URI Formats of External Storage Services](/external-storage-uri.md) - [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/online-workloads-and-add-index-operations.md) @@ -1101,242 +970,4 @@ - [High Availability FAQs](/faq/high-availability-faq.md) - [High Reliability FAQs](/faq/high-reliability-faq.md) - [Backup and Restore FAQs](/faq/backup-and-restore-faq.md) -- Release Notes - - [All Releases](/releases/release-notes.md) - - [Release Timeline](/releases/release-timeline.md) - - [TiDB Versioning](/releases/versioning.md) - - [Release Support Policy](https://www.pingcap.com/tidb-release-support-policy/) - - [TiDB Installation Packages](/binary-package.md) - - v8.5 - - [8.5.5](/releases/release-8.5.5.md) - - [8.5.4](/releases/release-8.5.4.md) - - [8.5.3](/releases/release-8.5.3.md) - - [8.5.2](/releases/release-8.5.2.md) - - [8.5.1](/releases/release-8.5.1.md) - - [8.5.0](/releases/release-8.5.0.md) - - v8.4 - - [8.4.0-DMR](/releases/release-8.4.0.md) - - v8.3 - - [8.3.0-DMR](/releases/release-8.3.0.md) - - v8.2 - - [8.2.0-DMR](/releases/release-8.2.0.md) - - v8.1 - - [8.1.2](/releases/release-8.1.2.md) - - [8.1.1](/releases/release-8.1.1.md) - - [8.1.0](/releases/release-8.1.0.md) - - v8.0 - - [8.0.0-DMR](/releases/release-8.0.0.md) - - v7.6 - - [7.6.0-DMR](/releases/release-7.6.0.md) - - v7.5 - - [7.5.7](/releases/release-7.5.7.md) - - [7.5.6](/releases/release-7.5.6.md) - - [7.5.5](/releases/release-7.5.5.md) - - [7.5.4](/releases/release-7.5.4.md) - - [7.5.3](/releases/release-7.5.3.md) - - [7.5.2](/releases/release-7.5.2.md) - - [7.5.1](/releases/release-7.5.1.md) - - [7.5.0](/releases/release-7.5.0.md) - - v7.4 - - [7.4.0-DMR](/releases/release-7.4.0.md) - - v7.3 - - [7.3.0-DMR](/releases/release-7.3.0.md) - - v7.2 - - [7.2.0-DMR](/releases/release-7.2.0.md) - - v7.1 - - [7.1.6](/releases/release-7.1.6.md) - - [7.1.5](/releases/release-7.1.5.md) - - [7.1.4](/releases/release-7.1.4.md) - - [7.1.3](/releases/release-7.1.3.md) - - [7.1.2](/releases/release-7.1.2.md) - - [7.1.1](/releases/release-7.1.1.md) - - [7.1.0](/releases/release-7.1.0.md) - - v7.0 - - [7.0.0-DMR](/releases/release-7.0.0.md) - - v6.6 - - [6.6.0-DMR](/releases/release-6.6.0.md) - - v6.5 - - [6.5.12](/releases/release-6.5.12.md) - - [6.5.11](/releases/release-6.5.11.md) - - [6.5.10](/releases/release-6.5.10.md) - - [6.5.9](/releases/release-6.5.9.md) - - [6.5.8](/releases/release-6.5.8.md) - - [6.5.7](/releases/release-6.5.7.md) - - [6.5.6](/releases/release-6.5.6.md) - - [6.5.5](/releases/release-6.5.5.md) - - [6.5.4](/releases/release-6.5.4.md) - - [6.5.3](/releases/release-6.5.3.md) - - [6.5.2](/releases/release-6.5.2.md) - - [6.5.1](/releases/release-6.5.1.md) - - [6.5.0](/releases/release-6.5.0.md) - - v6.4 - - [6.4.0-DMR](/releases/release-6.4.0.md) - - v6.3 - - [6.3.0-DMR](/releases/release-6.3.0.md) - - v6.2 - - [6.2.0-DMR](/releases/release-6.2.0.md) - - v6.1 - - [6.1.7](/releases/release-6.1.7.md) - - [6.1.6](/releases/release-6.1.6.md) - - [6.1.5](/releases/release-6.1.5.md) - - [6.1.4](/releases/release-6.1.4.md) - - [6.1.3](/releases/release-6.1.3.md) - - [6.1.2](/releases/release-6.1.2.md) - - [6.1.1](/releases/release-6.1.1.md) - - [6.1.0](/releases/release-6.1.0.md) - - v6.0 - - [6.0.0-DMR](/releases/release-6.0.0-dmr.md) - - v5.4 - - [5.4.3](/releases/release-5.4.3.md) - - [5.4.2](/releases/release-5.4.2.md) - - [5.4.1](/releases/release-5.4.1.md) - - [5.4.0](/releases/release-5.4.0.md) - - v5.3 - - [5.3.4](/releases/release-5.3.4.md) - - [5.3.3](/releases/release-5.3.3.md) - - [5.3.2](/releases/release-5.3.2.md) - - [5.3.1](/releases/release-5.3.1.md) - - [5.3.0](/releases/release-5.3.0.md) - - v5.2 - - [5.2.4](/releases/release-5.2.4.md) - - [5.2.3](/releases/release-5.2.3.md) - - [5.2.2](/releases/release-5.2.2.md) - - [5.2.1](/releases/release-5.2.1.md) - - [5.2.0](/releases/release-5.2.0.md) - - v5.1 - - [5.1.5](/releases/release-5.1.5.md) - - [5.1.4](/releases/release-5.1.4.md) - - [5.1.3](/releases/release-5.1.3.md) - - [5.1.2](/releases/release-5.1.2.md) - - [5.1.1](/releases/release-5.1.1.md) - - [5.1.0](/releases/release-5.1.0.md) - - v5.0 - - [5.0.6](/releases/release-5.0.6.md) - - [5.0.5](/releases/release-5.0.5.md) - - [5.0.4](/releases/release-5.0.4.md) - - [5.0.3](/releases/release-5.0.3.md) - - [5.0.2](/releases/release-5.0.2.md) - - [5.0.1](/releases/release-5.0.1.md) - - [5.0 GA](/releases/release-5.0.0.md) - - [5.0.0-rc](/releases/release-5.0.0-rc.md) - - v4.0 - - [4.0.16](/releases/release-4.0.16.md) - - [4.0.15](/releases/release-4.0.15.md) - - [4.0.14](/releases/release-4.0.14.md) - - [4.0.13](/releases/release-4.0.13.md) - - [4.0.12](/releases/release-4.0.12.md) - - [4.0.11](/releases/release-4.0.11.md) - - [4.0.10](/releases/release-4.0.10.md) - - [4.0.9](/releases/release-4.0.9.md) - - [4.0.8](/releases/release-4.0.8.md) - - [4.0.7](/releases/release-4.0.7.md) - - [4.0.6](/releases/release-4.0.6.md) - - [4.0.5](/releases/release-4.0.5.md) - - [4.0.4](/releases/release-4.0.4.md) - - [4.0.3](/releases/release-4.0.3.md) - - [4.0.2](/releases/release-4.0.2.md) - - [4.0.1](/releases/release-4.0.1.md) - - [4.0 GA](/releases/release-4.0-ga.md) - - [4.0.0-rc.2](/releases/release-4.0.0-rc.2.md) - - [4.0.0-rc.1](/releases/release-4.0.0-rc.1.md) - - [4.0.0-rc](/releases/release-4.0.0-rc.md) - - [4.0.0-beta.2](/releases/release-4.0.0-beta.2.md) - - [4.0.0-beta.1](/releases/release-4.0.0-beta.1.md) - - [4.0.0-beta](/releases/release-4.0.0-beta.md) - - v3.1 - - [3.1.2](/releases/release-3.1.2.md) - - [3.1.1](/releases/release-3.1.1.md) - - [3.1.0 GA](/releases/release-3.1.0-ga.md) - - [3.1.0-rc](/releases/release-3.1.0-rc.md) - - [3.1.0-beta.2](/releases/release-3.1.0-beta.2.md) - - [3.1.0-beta.1](/releases/release-3.1.0-beta.1.md) - - [3.1.0-beta](/releases/release-3.1.0-beta.md) - - v3.0 - - [3.0.20](/releases/release-3.0.20.md) - - [3.0.19](/releases/release-3.0.19.md) - - [3.0.18](/releases/release-3.0.18.md) - - [3.0.17](/releases/release-3.0.17.md) - - [3.0.16](/releases/release-3.0.16.md) - - [3.0.15](/releases/release-3.0.15.md) - - [3.0.14](/releases/release-3.0.14.md) - - [3.0.13](/releases/release-3.0.13.md) - - [3.0.12](/releases/release-3.0.12.md) - - [3.0.11](/releases/release-3.0.11.md) - - [3.0.10](/releases/release-3.0.10.md) - - [3.0.9](/releases/release-3.0.9.md) - - [3.0.8](/releases/release-3.0.8.md) - - [3.0.7](/releases/release-3.0.7.md) - - [3.0.6](/releases/release-3.0.6.md) - - [3.0.5](/releases/release-3.0.5.md) - - [3.0.4](/releases/release-3.0.4.md) - - [3.0.3](/releases/release-3.0.3.md) - - [3.0.2](/releases/release-3.0.2.md) - - [3.0.1](/releases/release-3.0.1.md) - - [3.0 GA](/releases/release-3.0-ga.md) - - [3.0.0-rc.3](/releases/release-3.0.0-rc.3.md) - - [3.0.0-rc.2](/releases/release-3.0.0-rc.2.md) - - [3.0.0-rc.1](/releases/release-3.0.0-rc.1.md) - - [3.0.0-beta.1](/releases/release-3.0.0-beta.1.md) - - [3.0.0-beta](/releases/release-3.0-beta.md) - - v2.1 - - [2.1.19](/releases/release-2.1.19.md) - - [2.1.18](/releases/release-2.1.18.md) - - [2.1.17](/releases/release-2.1.17.md) - - [2.1.16](/releases/release-2.1.16.md) - - [2.1.15](/releases/release-2.1.15.md) - - [2.1.14](/releases/release-2.1.14.md) - - [2.1.13](/releases/release-2.1.13.md) - - [2.1.12](/releases/release-2.1.12.md) - - [2.1.11](/releases/release-2.1.11.md) - - [2.1.10](/releases/release-2.1.10.md) - - [2.1.9](/releases/release-2.1.9.md) - - [2.1.8](/releases/release-2.1.8.md) - - [2.1.7](/releases/release-2.1.7.md) - - [2.1.6](/releases/release-2.1.6.md) - - [2.1.5](/releases/release-2.1.5.md) - - [2.1.4](/releases/release-2.1.4.md) - - [2.1.3](/releases/release-2.1.3.md) - - [2.1.2](/releases/release-2.1.2.md) - - [2.1.1](/releases/release-2.1.1.md) - - [2.1 GA](/releases/release-2.1-ga.md) - - [2.1 RC5](/releases/release-2.1-rc.5.md) - - [2.1 RC4](/releases/release-2.1-rc.4.md) - - [2.1 RC3](/releases/release-2.1-rc.3.md) - - [2.1 RC2](/releases/release-2.1-rc.2.md) - - [2.1 RC1](/releases/release-2.1-rc.1.md) - - [2.1 Beta](/releases/release-2.1-beta.md) - - v2.0 - - [2.0.11](/releases/release-2.0.11.md) - - [2.0.10](/releases/release-2.0.10.md) - - [2.0.9](/releases/release-2.0.9.md) - - [2.0.8](/releases/release-2.0.8.md) - - [2.0.7](/releases/release-2.0.7.md) - - [2.0.6](/releases/release-2.0.6.md) - - [2.0.5](/releases/release-2.0.5.md) - - [2.0.4](/releases/release-2.0.4.md) - - [2.0.3](/releases/release-2.0.3.md) - - [2.0.2](/releases/release-2.0.2.md) - - [2.0.1](/releases/release-2.0.1.md) - - [2.0](/releases/release-2.0-ga.md) - - [2.0 RC5](/releases/release-2.0-rc.5.md) - - [2.0 RC4](/releases/release-2.0-rc.4.md) - - [2.0 RC3](/releases/release-2.0-rc.3.md) - - [2.0 RC1](/releases/release-2.0-rc.1.md) - - [1.1 Beta](/releases/release-1.1-beta.md) - - [1.1 Alpha](/releases/release-1.1-alpha.md) - - v1.0 - - [1.0.8](/releases/release-1.0.8.md) - - [1.0.7](/releases/release-1.0.7.md) - - [1.0.6](/releases/release-1.0.6.md) - - [1.0.5](/releases/release-1.0.5.md) - - [1.0.4](/releases/release-1.0.4.md) - - [1.0.3](/releases/release-1.0.3.md) - - [1.0.2](/releases/release-1.0.2.md) - - [1.0.1](/releases/release-1.0.1.md) - - [1.0](/releases/release-1.0-ga.md) - - [Pre-GA](/releases/release-pre-ga.md) - - [RC4](/releases/release-rc.4.md) - - [RC3](/releases/release-rc.3.md) - - [RC2](/releases/release-rc.2.md) - - [RC1](/releases/release-rc.1.md) - [Glossary](/glossary.md) diff --git a/ai/_index.md b/ai/_index.md new file mode 100644 index 0000000000000..c2d36b2690fb7 --- /dev/null +++ b/ai/_index.md @@ -0,0 +1,77 @@ +--- +title: TiDB for AI +summary: Build modern AI applications with TiDB's integrated vector search, full-text search, and seamless Python SDK. +--- + +# TiDB for AI + +TiDB is a distributed SQL database designed for modern AI applications, offering integrated vector search, full-text search, and hybrid search capabilities. This document provides an overview of the AI features and tools available for building AI-powered applications with TiDB. + +## Quick Start + +Get up and running quickly with TiDB's AI capabilities. + +| Document | Description | +| --- | --- | +| [Get Started with Python](/ai/quickstart-via-python.md) | Build your first AI application with TiDB in minutes using Python. | +| [Get Started with SQL](/ai/quickstart-via-sql.md) | Quick start guide for vector search using SQL. | + +## Concepts + +Understand the foundational concepts behind AI-powered search in TiDB. + +| Document | Description | +| --- | --- | +| [Vector Search](/ai/concepts/vector-search-overview.md) | Comprehensive overview of vector search, including concepts, how it works, and use cases. | + +## Guides + +Step-by-step guides for building AI applications with TiDB using the [`pytidb`](https://github.com/pingcap/pytidb) SDK or SQL. + +| Document | Description | +| --- | --- | +| [Connect to TiDB](/ai/guides/connect.md) | Connect to TiDB Cloud or self-managed clusters using `pytidb`. | +| [Working with Tables](/ai/guides/tables.md) | Create, query, and manage tables with vector fields. | +| [Vector Search](/ai/guides/vector-search.md) | Perform semantic similarity searches using `pytidb`. | +| [Full-Text Search](/ai/guides/vector-search-full-text-search-python.md) | Keyword-based text search with BM25 ranking. | +| [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) | Combine vector and full-text search for better results. | +| [Image Search](/ai/guides/image-search.md) | Search images using multimodal embeddings. | +| [Auto Embedding](/ai/guides/auto-embedding.md) | Automatically generate embeddings on data insertion. | +| [Filtering](/ai/guides/filtering.md) | Filter search results with metadata conditions. | + +## Examples + +Complete code examples and demos showcasing TiDB's AI capabilities. + +| Document | Description | +| --- | --- | +| [Basic CRUD Operations](/ai/examples/basic-with-pytidb.md) | Fundamental table operations with `pytidb`. | +| [Vector Search](/ai/examples/vector-search-with-pytidb.md) | Semantic similarity search example. | +| [RAG Application](/ai/examples/rag-with-pytidb.md) | Build a Retrieval-Augmented Generation application. | +| [Image Search](/ai/examples/image-search-with-pytidb.md) | Multimodal image search with Jina AI embeddings. | +| [Conversational Memory](/ai/examples/memory-with-pytidb.md) | Persistent memory for AI agents and chatbots. | +| [Text-to-SQL](/ai/examples/text2sql-with-pytidb.md) | Convert natural language to SQL queries. | + +## Integrations + +Integrate TiDB with popular AI frameworks, embedding providers, and development tools. + +| Document | Description | +| --- | --- | +| [Integration Overview](/ai/integrations/vector-search-integration-overview.md) | Overview of all available integrations. | +| [Embedding Providers](/ai/integrations/vector-search-auto-embedding-overview.md#available-text-embedding-models) | Unified interface for OpenAI, Cohere, Jina AI, and more. | +| [LangChain](/ai/integrations/vector-search-integrate-with-langchain.md) | Use TiDB as a vector store with LangChain. | +| [LlamaIndex](/ai/integrations/vector-search-integrate-with-llamaindex.md) | Use TiDB as a vector store with LlamaIndex. | +| [MCP Server](/ai/integrations/tidb-mcp-server.md) | Connect TiDB to Claude Code, Cursor, and other AI-powered IDEs. | + +## Reference + +Technical reference documentation for TiDB's AI and vector search features. + +| Document | Description | +| --- | --- | +| [Vector Data Types](/ai/reference/vector-search-data-types.md) | Vector column types and usage. | +| [Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) | Distance functions and vector operations. | +| [Vector Search Index](/ai/reference/vector-search-index.md) | Create and manage vector indexes for performance. | +| [Performance Tuning](/ai/reference/vector-search-improve-performance.md) | Optimize vector search performance. | +| [Limitations](/ai/reference/vector-search-limitations.md) | Current limitations and constraints. | diff --git a/vector-search/vector-search-overview.md b/ai/concepts/vector-search-overview.md similarity index 71% rename from vector-search/vector-search-overview.md rename to ai/concepts/vector-search-overview.md index f9e0bf3daf2fe..eaca016526a25 100644 --- a/vector-search/vector-search-overview.md +++ b/ai/concepts/vector-search-overview.md @@ -1,31 +1,17 @@ --- title: Vector Search Overview summary: Learn about Vector Search in TiDB. This feature provides an advanced search solution for performing semantic similarity searches across various data types, including documents, images, audio, and video. +aliases: ['/tidb/stable/vector-search-overview/','/tidb/dev/vector-search-overview/','/tidbcloud/vector-search-overview/'] --- # Vector Search Overview Vector search offers a powerful solution for semantic similarity searches across diverse data types, such as documents, images, audio, and video. It allows developers to leverage their MySQL expertise to build scalable applications enriched with generative AI capabilities, simplifying the integration of advanced search functionality. - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Concepts @@ -43,7 +29,7 @@ A vector embedding, also known as an embedding, is a sequence of numbers that re Vector embeddings are essential in machine learning and serve as the foundation for semantic similarity searches. -TiDB introduces [Vector data types](/vector-search/vector-search-data-types.md) and [Vector search index](/vector-search/vector-search-index.md) designed to optimize the storage and retrieval of vector embeddings, enhancing their use in AI applications. You can store vector embeddings in TiDB and perform vector search queries to find the most relevant data using these data types. +TiDB introduces [Vector data types](/ai/reference/vector-search-data-types.md) and [Vector search index](/ai/reference/vector-search-index.md) designed to optimize the storage and retrieval of vector embeddings, enhancing their use in AI applications. You can store vector embeddings in TiDB and perform vector search queries to find the most relevant data using these data types. ### Embedding model @@ -57,7 +43,7 @@ To learn how to generate vector embeddings for your specific data types, refer t After converting raw data into vector embeddings and storing them in TiDB, your application can execute vector search queries to find the data most semantically or contextually relevant to a user's query. -TiDB vector search identifies the top-k nearest neighbor (KNN) vectors by using a [distance function](/vector-search/vector-search-functions-and-operators.md) to calculate the distance between the given vector and vectors stored in the database. The vectors closest to the given vector in the query represent the most similar data in meaning. +TiDB vector search identifies the top-k nearest neighbor (KNN) vectors by using a [distance function](/ai/reference/vector-search-functions-and-operators.md) to calculate the distance between the given vector and vectors stored in the database. The vectors closest to the given vector in the query represent the most similar data in meaning. ![The Schematic TiDB Vector Search](/media/vector-search/embedding-search.png) @@ -84,5 +70,5 @@ A recommendation engine is a system that proactively suggests content, products, To get started with TiDB Vector Search, see the following documents: -- [Get started with vector search using Python](/vector-search/vector-search-get-started-using-python.md) -- [Get started with vector search using SQL](/vector-search/vector-search-get-started-using-sql.md) +- [Get started with vector search using Python](/ai/quickstart-via-python.md) +- [Get started with vector search using SQL](/ai/quickstart-via-sql.md) diff --git a/ai/examples/auto-embedding-with-pytidb.md b/ai/examples/auto-embedding-with-pytidb.md new file mode 100644 index 0000000000000..3f963ff0eac4c --- /dev/null +++ b/ai/examples/auto-embedding-with-pytidb.md @@ -0,0 +1,87 @@ +--- +title: Auto Embedding Example +summary: Automatically generate embeddings for your text data using built-in embedding models. +--- + +# Auto Embedding Example + +This example shows how to use the [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) feature with the [pytidb](https://github.com/pingcap/pytidb) client. + +1. Connect to TiDB using the `pytidb` client. +2. Define a table with a VectorField configured for automatic embedding. +3. Insert plain text data: embeddings are populated automatically in the background. +4. Run vector searches with natural-language queries: embeddings are generated transparently. + +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## How to run + +### Step 1. Clone the `pytidb` repository + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/auto_embedding/ +``` + +### Step 2. Install the required packages + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env <=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## How to run + +### Step 1. Clone the `pytidb` repository + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/basic/ +``` + +### Step 2. Install the required packages + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env < + E-commerce product search with full-text search +

E-commerce product search with full-text search

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## How to run + +### Step 1. Clone the `pytidb` repository + +[`pytidb`](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/fulltext_search/ +``` + +### Step 2. Install the required packages and set up the environment + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env < + TiDB Hybrid Search Demo +

TiDB Hybrid Search Demo

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **OpenAI API key**: Get an OpenAI API key from [OpenAI](https://platform.openai.com/api-keys). + +> **Note** +> +> Currently, full-text search is available only in the following product option and regions: +> +> - TiDB Cloud Starter: Frankfurt (`eu-central-1`), Singapore (`ap-southeast-1`) + +## How to run + +### Step 1. Clone the `pytidb` repository + +[pytidb](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/hybrid_search +``` + +### Step 2. Install the required packages and set up the environment + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env < +EOF +``` + +### Step 4. Run the demo + +### Option 1. Run the Streamlit app + +If you want to check the demo with a web UI, you can run the following command: + +```bash +streamlit run app.py +``` + +Open your browser and visit `http://localhost:8501`. + +### Option 2. Run the demo script + +If you want to check the demo with a script, you can run the following command: + +```bash +python example.py +``` + +Expected output: + +``` +=== CONNECT TO TIDB === +Connected to TiDB. + +=== CREATE TABLE === +Table created. + +=== INSERT SAMPLE DATA === +Inserted 3 rows. + +=== PERFORM HYBRID SEARCH === +Search results: +[ + { + "_distance": 0.4740166257687124, + "_match_score": 1.6804268, + "_score": 0.03278688524590164, + "id": 60013, + "text": "TiDB is a distributed database that supports OLTP, OLAP, HTAP and AI workloads." + }, + { + "_distance": 0.6428459116216618, + "_match_score": 0.78427225, + "_score": 0.03200204813108039, + "id": 60015, + "text": "LlamaIndex is a Python library for building AI-powered applications." + }, + { + "_distance": 0.641581407158715, + "_match_score": null, + "_score": 0.016129032258064516, + "id": 60014, + "text": "PyTiDB is a Python library for developers to connect to TiDB." + } +] +``` + +## Related resources + +- **Source Code**: [View on GitHub](https://github.com/pingcap/pytidb/tree/main/examples/hybrid_search) \ No newline at end of file diff --git a/ai/examples/image-search-with-pytidb.md b/ai/examples/image-search-with-pytidb.md new file mode 100644 index 0000000000000..ceb39b8c241a1 --- /dev/null +++ b/ai/examples/image-search-with-pytidb.md @@ -0,0 +1,102 @@ +--- +title: Image Search Example +summary: Build an image search application using multimodal embeddings for both text-to-image and image-to-image search. +--- + +# Image Search Example + +This example shows how to build an image search app by combining TiDB vector search capabilities with multimodal embedding models. + +With just a few lines of code, you can create a search system that understands both text and images. + +- **Text-to-image search**: Find pet photos by describing what you want in natural language, such as "fluffy orange cat" +- **Image-to-image search**: Upload a photo to find visually similar pets by breed, color, pose, and more + +

+ PyTiDB Image Search Demo +

Pet image search via multimodal embeddings

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **Jina AI API key**: You can get a free API key from [Jina AI Embeddings](https://jina.ai/embeddings/). + +## How to run + +### Step 1. Clone the `pytidb` repository + +[`pytidb`](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/image_search/ +``` + +### Step 2. Install the required packages + +```bash +python -m venv .venv +source .venv/bin/activate # Windows: .venv\Scripts\activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env < + AI Agent with memory powered by TiDB +

AI Agent with memory powered by TiDB

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **OpenAI API key**: Get an OpenAI API key from [OpenAI](https://platform.openai.com/api-keys). + +## How to run + +### Step 1. Clone the `pytidb` repository + +[`pytidb`](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/memory/ +``` + +### Step 2. Install the required packages + +```bash +python -m venv .venv +source .venv/bin/activate # Windows: .venv\Scripts\activate +pip install -r reqs.txt +``` + +### Step 3. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env < + RAG application built with PyTiDB +

RAG application built with PyTiDB

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **Ollama**: Install from [Ollama](https://ollama.com/download). + +## How to run + +### Step 1. Prepare the inference API + +Pull the embedding and LLM models with the Ollama CLI: + +```bash +ollama pull mxbai-embed-large +ollama pull gemma3:4b +ollama run gemma3:4b +``` + +Verify that the `/embed` and `/generate` endpoints are running: + +```bash +curl http://localhost:11434/api/embed -d '{ + "model": "mxbai-embed-large", + "input": "Llamas are members of the camelid family" +}' +``` + +```bash +curl http://localhost:11434/api/generate -d '{ + "model": "gemma3:4b", + "prompt": "Hello, Who are you?" +}' +``` + +### Step 2. Clone the repository + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/rag/ +``` + +### Step 3. Install the required packages and set up the environment + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 4. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + +```bash +cat > .env <=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **OpenAI API key**: Get an OpenAI API key from [OpenAI](https://platform.openai.com/api-keys). + +## How to run + +### Step 1. Clone the `pytidb` repository + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/text2sql/ +``` + +### Step 2. Install the required packages + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 3. Run the Streamlit app + +```bash +streamlit run app.py +``` + +### Step 4. Use the app + +Open your browser and visit `http://localhost:8501`. + +1. Enter your OpenAI API key in the left sidebar +2. Enter the TiDB connection string in the left sidebar, for example: `mysql+pymysql://root@localhost:4000/test` + +## Related resources + +- **Source Code**: [View on GitHub](https://github.com/pingcap/pytidb/tree/main/examples/text2sql) \ No newline at end of file diff --git a/ai/examples/vector-search-with-pytidb.md b/ai/examples/vector-search-with-pytidb.md new file mode 100644 index 0000000000000..01fe4c0c1bae1 --- /dev/null +++ b/ai/examples/vector-search-with-pytidb.md @@ -0,0 +1,85 @@ +--- +title: Vector Search Example +summary: Implement semantic search using vector embeddings to find similar content. +--- + +# Vector Search Example + +This example demonstrates how to build a semantic search application using TiDB and local embedding models. It uses vector search to find similar items by meaning (not just keywords). + +The application uses [Ollama](https://ollama.com/download) for local embedding generation, [Streamlit](https://streamlit.io/) for the web UI, and [`pytidb`](https://github.com/pingcap/pytidb) (the official Python SDK for TiDB) to build the RAG pipeline. + +

+ Semantic search with vector embeddings +

Semantic search with vector embeddings

+

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Python (>=3.10)**: Install [Python](https://www.python.org/downloads/) 3.10 or a later version. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). +- **Ollama**: Install from [Ollama](https://ollama.com/download). + +## How to run + +### Step 1. Start the embedding service with Ollama + +Pull the embedding model: + +```bash +ollama pull mxbai-embed-large +``` + +Verify that the embedding service is running: + +```bash +curl http://localhost:11434/api/embed -d '{ + "model": "mxbai-embed-large", + "input": "Llamas are members of the camelid family" +}' +``` + +### Step 2. Clone the repository + +```bash +git clone https://github.com/pingcap/pytidb.git +cd pytidb/examples/vector_search/ +``` + +### Step 3. Install the required packages and set up the environment + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r reqs.txt +``` + +### Step 4. Set environment variables + +1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**Clusters**](https://tidbcloud.com/clusters) page, and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Set environment variables according to the connection parameters as follows: + + ```bash + cat > .env < **Note:** +> +> For a complete example of auto embedding, see [Auto Embedding Example](/ai/examples/auto-embedding-with-pytidb.md). + +## Basic usage + +This document uses a TiDB Cloud hosted embedding model for demonstration. For a full list of supported providers, see [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md#available-text-embedding-models). + +### Step 1. Define an embedding function + +Define an embedding function to generate vector embeddings for your text data. + +```python +from pytidb.embeddings import EmbeddingFunction + +embed_func = EmbeddingFunction( + model_name="tidbcloud_free/amazon/titan-embed-text-v2", +) +``` + +### Step 2. Create a table and a vector field + +Use `embed_func.VectorField()` to create a vector field in the table schema. + +To enable auto embedding, set `source_field` to the field you want to embed. + +```python hl_lines="7" +from pytidb.schema import TableModel, Field +from pytidb.datatype import TEXT + +class Chunk(TableModel): + id: int = Field(primary_key=True) + text: str = Field(sa_type=TEXT) + text_vec: list[float] = embed_func.VectorField(source_field="text") + +table = client.create_table(schema=Chunk, if_exists="overwrite") +``` + +You don't need to specify the `dimensions` parameter, because the embedding model automatically determines it. + +However, you can set the `dimensions` parameter to override the default dimension. + +### Step 3. Insert some sample data + +Insert some sample data into the table. + +```python +table.bulk_insert([ + Chunk(text="TiDB is a distributed database that supports OLTP, OLAP, HTAP and AI workloads."), + Chunk(text="PyTiDB is a Python library for developers to connect to TiDB."), + Chunk(text="LlamaIndex is a Python library for building AI-powered applications."), +]) +``` + +When inserting data, the `text_vec` field is automatically populated with embeddings generated from `text`. + +### Step 4. Perform a vector search + +You can pass query text directly to the `search()` method. The query text will be embedded automatically and then used for vector search. + +```python +table.search("HTAP database").limit(3).to_list() +``` diff --git a/ai/guides/connect.md b/ai/guides/connect.md new file mode 100644 index 0000000000000..9d2e264f4ca16 --- /dev/null +++ b/ai/guides/connect.md @@ -0,0 +1,145 @@ +--- +title: Connect to TiDB +summary: Learn how to connect to a TiDB database using the `pytidb` client. +--- + +# Connect to TiDB + +This guide shows how to connect to a TiDB database using the `pytidb` client. + +## Install the dependencies + +[`pytidb`](https://github.com/pingcap/pytidb) is a Python client built on [SQLAlchemy](https://sqlalchemy.org/). It provides a series of high-level APIs to help you store and search vector embeddings without writing raw SQL. + +To install the Python client, run the following command: + +```bash +pip install pytidb +``` + +## Connect with connection parameters + +Choose the steps based on your TiDB deployment type: + + +
+ +You can [create a TiDB Cloud Starter cluster](https://tidbcloud.com/free-trial/), and then get the connection parameters from the web console as follows: + +1. Navigate to the [Clusters page](https://tidbcloud.com/clusters), and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. +3. Copy the connection parameters to your code or environment variables. + +Example code: + +```python title="main.py" +from pytidb import TiDBClient + +db = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="test", +) +``` + +> **Note:** +> +> For TiDB Cloud Starter, [TLS connection to the database](https://docs.pingcap.com/tidbcloud/secure-connections-to-starter-clusters/) is required when using a public endpoint. The `pytidb` client **automatically** enables TLS for TiDB Cloud Starter clusters. + +
+
+ +Follow [Quick Start with TiDB Self-Managed](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb/#deploy-a-local-test-cluster) to deploy a TiDB cluster for testing. + +Example code: + +```python title="main.py" +from pytidb import TiDBClient + +db = TiDBClient.connect( + host="{tidb_server_host}", + port=4000, + username="root", + password="{password}", + database="test", +) +``` + +> **Note:** +> +> If you are using `tiup playground` to deploy a TiDB cluster for testing, the default host is `127.0.0.1` and the default password is empty. + +
+
+ +Once connected, you can use the `db` object to operate tables, query data, and more. + +## Connect with connection string + +If you prefer to use a connection string (database URL), you can follow the format based on your deployment type: + + +
+ +You can [create a TiDB Cloud Starter cluster](https://tidbcloud.com/free-trial/), and then get the connection parameters from the web console as follows: + +1. Navigate to the [Clusters page](https://tidbcloud.com/clusters), and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with the connection parameters listed. +3. Copy the connection parameters and construct a connection string in the following format: + +```python title="main.py" +from pytidb import TiDBClient + +db = TiDBClient.connect( + database_url="mysql+pymysql://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}?ssl_verify_cert=true&ssl_verify_identity=true", +) +``` + +> **Note:** +> +> For TiDB Cloud Starter, [TLS connection to the database](https://docs.pingcap.com/tidbcloud/secure-connections-to-starter-clusters/) is required when using a public endpoint, so you need to set `ssl_verify_cert=true&ssl_verify_identity=true` in the connection string. + +
+
+ +You can follow the format below to construct the connection string: + +```python title="main.py" +from pytidb import TiDBClient + +db = TiDBClient.connect( + database_url="mysql+pymysql://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}", +) +``` + +> **Note:** +> +> If you are using `tiup playground` to deploy a TiDB cluster for testing, the connection string is: +> +> ``` +> mysql+pymysql://root:@127.0.0.1:4000/test +> ``` + +
+
+ +## Connect with SQLAlchemy DB engine + +If your application already has a SQLAlchemy database engine, you can reuse it via the `db_engine` parameter: + +```python title="main.py" +from pytidb import TiDBClient + +db = TiDBClient(db_engine=db_engine) +``` + +## Next steps + +After connecting to your TiDB database, you can explore the following guides to learn how to work with your data: + +- [Working with Tables](/ai/guides/tables.md): Learn how to define and manage tables in TiDB. +- [Vector Search](/ai/guides/vector-search.md): Perform semantic search using vector embeddings. +- [Full-Text Search](/ai/guides/vector-search-full-text-search-python.md): Retrieve documents using keyword-based search. +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md): Combine vector and full-text search for more relevant results. diff --git a/ai/guides/filtering.md b/ai/guides/filtering.md new file mode 100644 index 0000000000000..b33f2b47933f3 --- /dev/null +++ b/ai/guides/filtering.md @@ -0,0 +1,190 @@ +--- +title: Filtering +summary: Learn how to use filtering in your application. +--- + +# Filtering + +As a relational database, TiDB supports a rich set of [SQL operators](https://docs.pingcap.com/tidbcloud/operators/) and flexible combinations of filtering conditions for precise queries. + +## Overview + +You can filter on both scalar fields and JSON fields. Filtering on JSON fields is often used for [metadata filtering](/ai/guides/vector-search.md#metadata-filtering) in vector search. + +[`pytidb`](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +When using `pytidb`, you can apply filtering by passing the **filters** parameter to the `table.query()`, `table.delete()`, `table.update()`, and `table.search()` methods. + +The **filters** parameter supports two formats: [Dictionary filters](#dictionary-filters) and [SQL string filters](#sql-string-filters). + +## Dictionary filters + +`pytidb` lets you define filter conditions using a Python dictionary with operators as the **filters** parameter. + +The dictionary structure of **filters** is as follows: + +```python +{ + "": { + "": + }, + ... +} +``` + +- ``: The key can be a column name, a JSON path expression to access a JSON field (see [Metadata filtering](/ai/guides/vector-search.md#metadata-filtering)), or a [logical operator](#logical-operators). +- ``: The operator can be a [compare operator](#compare-operators) or an [inclusion operator](#inclusion-operators). +- ``: The value can be a scalar value or an array, depending on the operator. + +**Example: Filter records where `created_at` is greater than 2024-01-01** + +```python +table.query({ + # The `created_at` is a scalar field with DATETIME type + "created_at": { + "$gt": "2024-01-01" + } +}) +``` + +**Example: Filter records where `meta.category` is in the array ["tech", "science"]** + +```python +results = ( + table.search("some query", search_type="vector") + .filter({ + # The `meta` is a JSON field, and its value is a JSON object like {"category": "tech"} + "meta.category": { + "$in": ["tech", "science"] + } + }) + .limit(10) + .to_list() +) +``` + +### Compare operators + +You can use the following comparison operators to filter records: + +| Operator | Description | +|----------|-----------------------------------| +| `$eq` | Equal to value | +| `$ne` | Not equal to value | +| `$gt` | Greater than value | +| `$gte` | Greater than or equal to value | +| `$lt` | Less than value | +| `$lte` | Less than or equal to value | + +**Example: Filter records where `user_id` equals 1** + +```python +{ + "user_id": { + "$eq": 1 + } +} +``` + +You can omit the `$eq` operator. The following filter is equivalent to the preceding one: + +```python +{ + "user_id": 1 +} +``` + +### Inclusion operators + +You can use the following inclusion operators to filter records: + +| Operator | Description | +|----------|-----------------------------------| +| `$in` | In array (string, int, or float) | +| `$nin` | Not in array (string, int, float) | + +**Example: Filter records where `category` is in the array ["tech", "science"]** + +```python +{ + "category": { + "$in": ["tech", "science"] + } +} +``` + +### Logical operators + +You can use the logical operators `$and` and `$or` to combine multiple filters. + +| Operator | Description | +|----------|-----------------------------------------------------| +| `$and` | Returns results that match **all** filters in the list | +| `$or` | Returns results that match **any** filter in the list | + +**Syntax for `$and` or `$or`:** + +```python +{ + "$and|$or": [ + { + "field_name": { + : + } + }, + { + "field_name": { + : + } + } + ... + ] +} +``` + +**Example: using `$and` to combine multiple filters:** + +```python +{ + "$and": [ + { + "created_at": { + "$gt": "2024-01-01" + } + }, + { + "meta.category": { + "$in": ["tech", "science"] + } + } + ] +} +``` + +## SQL String Filters + +You can also use a SQL string as `filters`. The string must be a valid SQL `WHERE` clause (without the `WHERE` keyword) in the TiDB SQL syntax. + +**Example: Filter records where `created_at` is greater than 2024-01-01** + +```python +results = table.query( + filters="created_at > '2024-01-01'", + limit=10 +).to_list() +``` + +**Example: Filter records where the JSON field `meta.category` equals 'tech'** + +```python +results = table.query( + filters="meta->>'$.category' = 'tech'", + limit=10 +).to_list() +``` + +You can combine multiple conditions using `AND`, `OR`, and parentheses, and use any TiDB-supported [SQL operators](https://docs.pingcap.com/tidbcloud/operators/). + +> **Warning:** +> +> When using SQL string filters with dynamic user input, always validate the input to prevent [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) vulnerabilities. diff --git a/ai/guides/image-search.md b/ai/guides/image-search.md new file mode 100644 index 0000000000000..abe6518341e0c --- /dev/null +++ b/ai/guides/image-search.md @@ -0,0 +1,111 @@ +--- +title: Image Search +summary: Learn how to use image search in your application. +--- + +# Image Search + +**Image search** helps you find similar images by comparing their visual content, not just text or metadata. This feature is useful for e-commerce, content moderation, digital asset management, and any scenario where you need to search for or deduplicate images based on appearance. + +TiDB enables image search through **vector search**. With automatic embedding, you can generate image embeddings from image URLs, PIL images, or keyword text using a multimodal embedding model. TiDB then searches for similar vectors at scale. + +> **Note:** +> +> For a complete example of image search, see [Image Search Example](/ai/examples/image-search-with-pytidb.md). + +## Basic usage + +### Step 1. Define an embedding function + +To generate image embeddings, you need an embedding model that accepts image input. + +For demonstration, you can use the multimodal embedding model of Jina AI. + +Go to [Jina AI](https://jina.ai/embeddings) to create an API key, and then initialize the embedding function as follows: + +```python hl_lines="7" +from pytidb.embeddings import EmbeddingFunction + +image_embed = EmbeddingFunction( + # Or another provider/model that supports multimodal input + model_name="jina_ai/jina-embedding-v4", + api_key="{your-jina-api-key}", + multimodal=True, +) +``` + +### Step 2. Create a table and vector field + +Use `VectorField()` to define a vector field for storing image embeddings. Set the `source_field` parameter to specify the field that stores image URLs. + +```python +from pytidb.schema import TableModel, Field + +class ImageItem(TableModel): + __tablename__ = "image_items" + id: int = Field(primary_key=True) + image_uri: str = Field() + image_vec: list[float] = image_embed.VectorField( + source_field="image_uri" + ) + +table = client.create_table(schema=ImageItem, if_exists="overwrite") +``` + +### Step 3. Insert image data + +When you insert data, the `image_vec` field is automatically populated with an embedding generated from `image_uri`. + +```python +table.bulk_insert([ + ImageItem(image_uri="https://example.com/image1.jpg"), + ImageItem(image_uri="https://example.com/image2.jpg"), + ImageItem(image_uri="https://example.com/image3.jpg"), +]) +``` + +### Step 4. Perform image search + +Image search is a type of vector search. With automatic embedding, you can provide an image URL, a PIL image, or keyword text directly, and each input is converted into an embedding for similarity matching. + +#### Option 1: Search by image URL + +Search for similar images by providing an image URL: + +```python +results = table.search("https://example.com/query.jpg").limit(3).to_list() +``` + +The client converts the image URL into a vector. TiDB then returns the most similar images by comparing vectors. + +#### Option 2: Search by PIL image + +You can also search for similar images by providing an image file or bytes: + +```python +from PIL import Image + +image = Image.open("/path/to/query.jpg") + +results = table.search(image).limit(3).to_list() +``` + +The client converts the PIL image object to a Base64 string before sending it to the embedding model. + +#### Option 3: Search by keyword text + +You can also search for similar images by providing keyword text. + +For example, if you are working on a pet image dataset, you can search by keywords such as "orange tabby cat" or "golden retriever puppy" to find similar images. + +```python +results = table.search("orange tabby cat").limit(3).to_list() +``` + +Then, the multimodal embedding model converts the keyword text into an embedding that captures its semantic meaning, and TiDB performs a vector search to find images with embeddings most similar to that keyword embedding. + +## See also + +- [Automatic embedding guide](/ai/guides/auto-embedding.md) +- [Vector search guide](/ai/concepts/vector-search-overview.md) +- [Image Search Example](/ai/examples/image-search-with-pytidb.md) diff --git a/ai/guides/join-queries.md b/ai/guides/join-queries.md new file mode 100644 index 0000000000000..b95974e9dfd68 --- /dev/null +++ b/ai/guides/join-queries.md @@ -0,0 +1,124 @@ +--- +title: Multiple Table Joins +summary: Learn how to use multiple table joins in your application. +--- + +# Multiple Table Joins + +As a relational database, TiDB lets you store diverse data in tables with different structures (for example, `chunks`, `documents`, `users`, `chats`) in a single database. You can also use joins to combine data from multiple tables and perform complex queries. + +## Basic Usage + +### Step 1. Create tables and insert sample data + + +
+ +Assuming you have already [connected to TiDB](/ai/guides/connect.md) using `TiDBClient`: + +Create a `documents` table and insert some sample data: + +```python +from pytidb import Session +from pytidb.schema import TableModel, Field +from pytidb.sql import select + +class Document(TableModel): + __tablename__ = "documents" + id: int = Field(primary_key=True) + title: str = Field(max_length=255) + +client.create_table(schema=Document, if_exists="overwrite") +client.table("documents").truncate() +client.table("documents").bulk_insert([ + Document(id=1, title="The Power of Positive Thinking"), + Document(id=2, title="The Happiness Advantage"), + Document(id=3, title="The Art of Happiness"), +]) +``` + +Create a `chunks` table and insert some sample data: + +```python +class Chunk(TableModel): + __tablename__ = "chunks" + id: int = Field(primary_key=True) + text: str = Field(max_length=255) + document_id: int = Field(foreign_key="documents.id") + +client.create_table(schema=Chunk, if_exists="overwrite") +client.table("chunks").truncate() +client.table("chunks").bulk_insert([ + Chunk(id=1, text="Positive thinking can change your life", document_id=1), + Chunk(id=2, text="Happiness leads to success", document_id=2), + Chunk(id=3, text="Finding joy in everyday moments", document_id=3), +]) +``` + +
+
+ +Create a `documents` table and insert some sample data: + +```sql +CREATE TABLE documents ( + id INT PRIMARY KEY, + title VARCHAR(255) NOT NULL +); + +INSERT INTO documents (id, title) VALUES + (1, 'The Power of Positive Thinking'), + (2, 'The Happiness Advantage'), + (3, 'The Art of Happiness'); +``` + +Create a `chunks` table and insert some sample data: + +```sql +CREATE TABLE chunks ( + id INT PRIMARY KEY, + text VARCHAR(255) NOT NULL, + document_id INT NOT NULL, + FOREIGN KEY (document_id) REFERENCES documents(id) +); + +INSERT INTO chunks (id, text, document_id) VALUES + (1, 'Positive thinking can change your life', 1), + (2, 'Happiness leads to success', 2), + (3, 'Finding joy in everyday moments', 3); +``` + +
+
+ +### Step 2. Perform a join query + + +
+ +```python +with Session(client.db_engine) as db_session: + query = ( + select(Chunk) + .join(Document, Chunk.document_id == Document.id) + .where(Document.title == "The Power of Positive Thinking") + ) + chunks = db_session.exec(query).all() + +[(c.id, c.text, c.document_id) for c in chunks] +``` + +
+
+ +Perform a join query to combine data from the `chunks` and `documents` tables: + +```sql +SELECT c.id, c.text, c.document_id +FROM chunks c +JOIN documents d ON c.document_id = d.id +WHERE d.title = 'The Power of Positive Thinking'; +``` + +
+
\ No newline at end of file diff --git a/ai/guides/raw-queries.md b/ai/guides/raw-queries.md new file mode 100644 index 0000000000000..c8105073b7874 --- /dev/null +++ b/ai/guides/raw-queries.md @@ -0,0 +1,89 @@ +--- +title: Raw Queries +summary: Learn how to use raw queries in your application. +--- + +# Raw Queries + +This guide describes how to run raw SQL queries in your application. + +## Operate data with raw SQL + +Use the `client.execute()` method to execute `INSERT`, `UPDATE`, `DELETE`, and other data-manipulation statements. + +```python +client.execute("INSERT INTO chunks(text, user_id) VALUES ('sample text', 5)") +``` + +### SQL injection prevention + +Both the `execute()` and `query()` methods support the **Parameterized SQL** feature, which helps you avoid [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) while building dynamic SQL statements. + +```python +client.execute( + "INSERT INTO chunks(text, user_id) VALUES (:text, :user_id)", + { + "text": "sample text", + "user_id": 6, + }, +) +``` + +## Query data with raw SQL + +Use the `client.query()` method to execute `SELECT`, `SHOW`, and other query statements. + +### Output query result + +The `client.query()` method will return a `SQLQueryResult` instance with some helper methods: + +- `to_pydantic()` +- `to_list()` +- `to_pandas()` +- `to_rows()` +- `scalar()` + +#### As Pydantic model + +The `to_pydantic()` method returns a list of Pydantic models. + +```python +client.query("SELECT id, text, user_id FROM chunks").to_pydantic() +``` + +#### As SQLAlchemy result rows + +The `to_rows()` method returns a list of tuples, where each tuple represents one row. + +```python +client.query("SHOW TABLES;").to_rows() +``` + +#### As a list of dictionaries + +The `to_list()` method converts the query result to a list of dictionaries. + +```python +client.query( + "SELECT id, text, user_id FROM chunks WHERE user_id = :user_id", + { + "user_id": 3 + } +).to_list() +``` + +#### As pandas DataFrame + +The `to_pandas()` method converts the query result to a `pandas.DataFrame`, which is displayed in a human-friendly format within the notebook: + +```python +client.query("SELECT id, text, user_id FROM chunks").to_pandas() +``` + +#### As scalar value + +The `scalar()` method will return the first column of the first row of the result set. + +```python +client.query("SELECT COUNT(*) FROM chunks;").scalar() +``` \ No newline at end of file diff --git a/ai/guides/reranking.md b/ai/guides/reranking.md new file mode 100644 index 0000000000000..f4fa244e7f48c --- /dev/null +++ b/ai/guides/reranking.md @@ -0,0 +1,53 @@ +--- +title: Reranking +summary: Learn how to use reranking in your application. +--- + +# Reranking + +Reranking is a technique used to improve the relevance and accuracy of search results by re-evaluating and reordering them using a dedicated reranking model. + +The search process works in two stages: + +1. **Initial Retrieval**: Vector search identifies the top `k` most similar documents from the collection. +2. **Reranking**: A reranking model evaluates these `k` documents based on the relevance between the query and the documents and reorders them to produce the final top `n` results (where `n` ≤ `k`). + +This two-stage retrieval approach significantly improves both document relevance and accuracy. + +## Basic usage + +[`pytidb`](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +`pytidb` provides the `Reranker` class that lets you use reranking models from multiple third-party providers. + +1. Create a reranker instance: + + ```python + from pytidb.rerankers import Reranker + + reranker = Reranker(model_name="{provider}/{model_name}") + ``` + +2. Apply the reranker by using the `.rerank()` method: + + ```python + table.search("{query}").rerank(reranker, "{field_to_rerank}").limit(3) + ``` + +## Supported providers + +The following examples show how to use reranking models from third-party providers. + +### Jina AI + +To use the reranker from Jina AI, go to their [website](https://jina.ai/reranker) to create an API key. + +For example: + +```python +jinaai = Reranker( + # Using the `jina-reranker-m0` model + model_name="jina_ai/jina-reranker-m0", + api_key="{your-jinaai-api-key}" +) +``` diff --git a/ai/guides/tables.md b/ai/guides/tables.md new file mode 100644 index 0000000000000..dceda111b6fd6 --- /dev/null +++ b/ai/guides/tables.md @@ -0,0 +1,448 @@ +--- +title: Working with Tables +summary: Learn how to work with tables in TiDB. +--- + +# Working with Tables + +TiDB uses tables to organize and store collections of related data. It provides flexible schema definition capabilities, so you can design tables to meet your specific requirements. + +A table can contain multiple columns of different data types. Supported data types include text, numbers, vectors, binary data (`BLOB`), JSON, and more. + +This document shows how to work with tables using [`pytidb`](https://github.com/pingcap/pytidb). + +`pytidb` is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +> **Note:** +> +> For a complete working example, see the [basic example](https://github.com/pingcap/pytidb/tree/main/examples/basic) in our repository. + +## Create a table + +### Using TableModel + +`pytidb` provides a `TableModel` class that represents the schema of a table. The class is compatible with the [Pydantic model](https://docs.pydantic.dev/latest/concepts/models/) and enables you to define tables declaratively. + +In the following example, you create a table named `items` with these columns: + +- `id`: a primary key column with an integer type +- `content`: a text type column +- `embedding`: a vector type column with 3 dimensions +- `meta`: a JSON type column + + +
+ +After you [connect to the database](/ai/guides/connect.md) using `pytidb` and obtain a `client` instance, you can create a table with the `create_table` method. + +```python hl_lines="12" +from pytidb.schema import TableModel, Field, VectorField +from pytidb.datatype import TEXT, JSON + +class Item(TableModel): + __tablename__ = "items" + + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = VectorField(dimensions=3) + meta: dict = Field(sa_type=JSON, default_factory=dict) + +table = client.create_table(schema=Item, if_exists="overwrite") +``` + +The `create_table` method accepts these parameters: + +- `schema`: The `TableModel` class that defines your table structure. +- `if_exists`: The table creation mode. + - `raise` (default): Creates the table if it does not exist; raises an error if it already exists. + - `skip`: Creates the table if it does not exist; does nothing if it already exists. + - `overwrite`: Drops the existing table and creates a new one. This is useful for **testing and development**, but not recommended for production environments. + +Once the table is created, you can use the `table` object to insert, update, delete, and query data. + +
+
+ +Use the `CREATE TABLE` statement to create a table. + +```sql +CREATE TABLE items ( + id INT PRIMARY KEY, + content TEXT, + embedding VECTOR(3), + meta JSON +); +``` + +
+
+ +## Add data to a table + +### With TableModel + +You can use a `TableModel` instance to represent a row and insert it into the table. + +To insert a single record: + + +
+ +Use the `table.insert()` method to insert a single record into the table. + +```python +table.insert( + Item( + id=1, + content="TiDB is a distributed SQL database", + embedding=[0.1, 0.2, 0.3], + meta={"category": "database"}, + ) +) +``` + +
+
+ +Use the `INSERT INTO` statement to insert a single record into the table. + +```sql +INSERT INTO items(id, content, embedding, meta) +VALUES (1, 'TiDB is a distributed SQL database', '[0.1, 0.2, 0.3]', '{"category": "database"}'); +``` + +
+
+ +To insert multiple records: + + +
+ +Use the `table.bulk_insert()` method to insert multiple records into the table. + +```python +table.bulk_insert([ + Item( + id=2, + content="GPT-4 is a large language model", + embedding=[0.4, 0.5, 0.6], + meta={"category": "llm"}, + ), + Item( + id=3, + content="LlamaIndex is a Python library for building AI-powered applications", + embedding=[0.7, 0.8, 0.9], + meta={"category": "rag"}, + ), +]) +``` + +
+
+ +Use the `INSERT INTO` statement to insert multiple records into the table. + +```sql +INSERT INTO items(id, content, embedding, meta) +VALUES + (2, 'GPT-4 is a large language model', '[0.4, 0.5, 0.6]', '{"category": "llm"}'), + (3, 'LlamaIndex is a Python library for building AI-powered applications', '[0.7, 0.8, 0.9]', '{"category": "rag"}'); +``` + +
+
+ +### With Dict + +You can also use `dict` to represent rows and insert them into the table. This approach is more flexible and does not require a `TableModel` to insert data. + +To insert a single record: + + +
+ +Use the `table.insert()` method with a dictionary to insert a single record into the table. + +```python +table.insert({ + "id": 1, + "content": "TiDB is a distributed SQL database", + "embedding": [0.1, 0.2, 0.3], + "meta": {"category": "database"}, +}) +``` + +
+
+ +Use the `INSERT INTO` statement to insert a single record into the table. + +```sql +INSERT INTO items(id, content, embedding, meta) +VALUES (1, 'TiDB is a distributed SQL database', '[0.1, 0.2, 0.3]', '{"category": "database"}'); +``` + +
+
+ +## Save data to a table + +The `save` method provides a convenient way to insert or update a single row. For a row, if the primary key does not exist in the table, the method inserts it into the table as a new row. If the record already exists, the method overwrites the entire row. + +> **Note:** +> +> If a record ID already exists in the table, `table.save()` overwrites the entire record. To change only part of a record, use `table.update()`. + + +
+ +Use the `table.save()` method to save a single record to the table. + +**Example: Save a new record** + +```python +saved_record = table.save( + Item( + id=4, + content="Vector databases enable AI applications", + embedding=[1.0, 1.1, 1.2], + meta={"category": "vector-db"}, + ) +) +``` + +**Example: Save an existing record (overwrites the entire record)** + +```python +# This overwrites the entire record with id=1 +updated_record = table.save( + Item( + id=1, # Existing ID + content="Updated content for TiDB", + embedding=[0.2, 0.3, 0.4], + meta={"category": "updated"}, + ) +) +``` + +
+
+ +Use the `INSERT ... ON DUPLICATE KEY UPDATE` statement to save a record. + +**Example: Save a new record or update if it exists** + +```sql +INSERT INTO items(id, content, embedding, meta) +VALUES (4, 'Vector databases enable AI applications', '[1.0, 1.1, 1.2]', '{"category": "vector-db"}') +ON DUPLICATE KEY UPDATE + content = VALUES(content), + embedding = VALUES(embedding), + meta = VALUES(meta); +``` + +
+
+ +## Query data from a table + +To fetch records from a table: + + +
+ +Use the `table.query()` method to fetch records from the table. + +**Example: Fetch the first 10 records** + +```python +result = table.query(limit=10).to_list() +``` + +
+
+ +Use the `SELECT` statement to fetch the records from the table. + +**Example: Fetch the first 10 records** + +```sql +SELECT * FROM items LIMIT 10; +``` + +
+
+ +To fetch records based on query conditions: + + +
+ +Pass the `filters` parameter to the `table.query()` method. + +```python +result = table.query( + filters={"meta.category": "database"}, + limit=10 +).to_list() +``` + +
+
+ +Use the `WHERE` clause to filter records. + +**Example: Fetch the 10 records with category "database"** + +```sql +SELECT * FROM items WHERE meta->>'$.category' = 'database' LIMIT 10; +``` + +
+
+ +For a complete list of supported filter operations and examples, refer to the [Filtering](/ai/guides/filtering.md) guide. + +## Update data in a table + + +
+ +Use the `table.update()` method to update records with [filters](/ai/guides/filtering.md). + +**Example: Update the record whose `id` equals 1** + +```python +table.update( + values={ + "content": "TiDB Cloud Starter is a fully managed, auto-scaling cloud database service", + "embedding": [0.1, 0.2, 0.4], + "meta": {"category": "dbaas"}, + }, + filters={ + "id": 1 + }, +) +``` + +
+
+ +Use the `UPDATE` statement to update records with [filters](/ai/guides/filtering.md). + +**Example: Update the record whose `id` equals 1** + +```sql +UPDATE items +SET + content = 'TiDB Cloud Starter is a fully managed, auto-scaling cloud database service', + embedding = '[0.1, 0.2, 0.4]', + meta = '{"category": "dbaas"}' +WHERE + id = 1; +``` + +
+
+ +## Delete from a table + + +
+ +Use the `table.delete()` method to delete records with [filters](/ai/guides/filtering.md). + +**Example: Delete the record where `id` equals 2** + +```python +table.delete( + filters={ + "id": 2 + } +) +``` + +
+
+ +Use the `DELETE` statement to delete records with [filters](/ai/guides/filtering.md). + +**Example: Delete the record where `id` equals 2** + +```sql +DELETE FROM items WHERE id = 2; +``` + +
+
+ +## Truncate a table + + +
+ +To remove all data from the table but keep the table structure, use the `table.truncate()` method. + +```python +table.truncate() +``` + +To check that the table is truncated, verify that it contains 0 rows. + +```python +table.rows() +``` + +
+
+ +To remove all data from the table but keep the table structure, use the `TRUNCATE TABLE` statement. + +```sql +TRUNCATE TABLE items; +``` + +To check that the table is truncated, verify that it contains 0 rows. + +```sql +SELECT COUNT(*) FROM items; +``` + +
+
+ +## Drop a table + + +
+ +To permanently remove a table from the database, use the `client.drop_table()` method. + +```python +client.drop_table("items") +``` + +To check that the table is removed from the database: + +```python +client.table_names() +``` + +
+
+ +To permanently remove a table from the database, use the `DROP TABLE` statement. + +```sql +DROP TABLE items; +``` + +To check that the table is removed from the database: + +```sql +SHOW TABLES; +``` + +
+
\ No newline at end of file diff --git a/ai/guides/transactions.md b/ai/guides/transactions.md new file mode 100644 index 0000000000000..033e32021568d --- /dev/null +++ b/ai/guides/transactions.md @@ -0,0 +1,30 @@ +--- +title: Transactions +summary: Learn how to use transactions in your application. +--- + +# Transactions + +TiDB supports ACID transactions to ensure data consistency and reliability. + +## Basic usage + +```python +with client.session() as session: + initial_total_balance = session.query("SELECT SUM(balance) FROM players").scalar() + + # Transfer 10 coins from player 1 to player 2 + session.execute("UPDATE players SET balance = balance - 10 WHERE id = 1") + session.execute("UPDATE players SET balance = balance + 10 WHERE id = 2") + + session.commit() + # or session.rollback() + + final_total_balance = session.query("SELECT SUM(balance) FROM players").scalar() + assert final_total_balance == initial_total_balance +``` + +## See also + +- [TiDB Developer Guide - Transactions](/develop/dev-guide-transaction-overview.md) +- [TiDB Documentation - SQL Reference - Transactions](/transaction-overview.md) \ No newline at end of file diff --git a/tidb-cloud/vector-search-full-text-search-python.md b/ai/guides/vector-search-full-text-search-python.md similarity index 83% rename from tidb-cloud/vector-search-full-text-search-python.md rename to ai/guides/vector-search-full-text-search-python.md index e88157c182b29..38f38d6c191ca 100644 --- a/tidb-cloud/vector-search-full-text-search-python.md +++ b/ai/guides/vector-search-full-text-search-python.md @@ -1,12 +1,12 @@ --- title: Full-Text Search with Python summary: Full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. -aliases: ['/tidb/stable/vector-search-full-text-search-python'] +aliases: ['/tidb/stable/vector-search-full-text-search-python/','/tidbcloud/vector-search-full-text-search-python/'] --- # Full-Text Search with Python -Unlike [Vector Search](/vector-search/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. +Unlike [Vector Search](/ai/concepts/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. The full-text search feature in TiDB provides the following capabilities: @@ -20,13 +20,13 @@ The full-text search feature in TiDB provides the following capabilities: > **Tip:** > -> For SQL usage, see [Full-Text Search with SQL](/tidb-cloud/vector-search-full-text-search-sql.md). +> For SQL usage, see [Full-Text Search with SQL](/ai/guides/vector-search-full-text-search-sql.md). > -> To use full-text search and vector search together in your AI apps, see [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md). +> To use full-text search and vector search together in your AI apps, see [Hybrid Search](/ai/guides/vector-search-hybrid-search.md). ## Prerequisites -Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, Full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: +Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: - AWS: `Frankfurt (eu-central-1)` and `Singapore (ap-southeast-1)` @@ -64,7 +64,7 @@ db = TiDBClient.connect( ) ``` -You can get these connection parameters from the [TiDB Cloud console](https://tidbcloud.com): +You can get these connection parameters from the [TiDB Cloud console](https://tidbcloud.com) as follows: 1. Navigate to the [**Clusters**](https://tidbcloud.com/project/clusters) page, and then click the name of your target cluster to go to its overview page. @@ -153,21 +153,11 @@ For a complete example, see [pytidb full-text search demo](https://github.com/pi - [pytidb Python SDK Documentation](https://github.com/pingcap/pytidb) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) ## Feedback & Help Full-text search is still in the early stages with limited accessibility. If you would like to try full-text search in a region that is not yet available, or if you have feedback or need help, feel free to reach out to us: - - -- [Join our Discord](https://discord.gg/zcqexutz2R) - - - - - -- [Join our Discord](https://discord.gg/zcqexutz2R) -- [Visit our Support Portal](https://tidb.support.pingcap.com/) - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) diff --git a/tidb-cloud/vector-search-full-text-search-sql.md b/ai/guides/vector-search-full-text-search-sql.md similarity index 89% rename from tidb-cloud/vector-search-full-text-search-sql.md rename to ai/guides/vector-search-full-text-search-sql.md index fe56cd355c9a4..88ec66f57b5e8 100644 --- a/tidb-cloud/vector-search-full-text-search-sql.md +++ b/ai/guides/vector-search-full-text-search-sql.md @@ -1,12 +1,12 @@ --- title: Full-Text Search with SQL summary: Full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. -aliases: ['/tidb/stable/vector-search-full-text-search-sql'] +aliases: ['/tidb/stable/vector-search-full-text-search-sql/','/tidbcloud/vector-search-full-text-search-sql/'] --- # Full-Text Search with SQL -Unlike [Vector Search](/vector-search/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. +Unlike [Vector Search](/ai/concepts/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. The full-text search feature in TiDB provides the following capabilities: @@ -20,13 +20,13 @@ The full-text search feature in TiDB provides the following capabilities: > **Tip:** > -> For Python usage, see [Full-Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md). +> For Python usage, see [Full-Text Search with Python](/ai/guides/vector-search-full-text-search-python.md). > -> To use full-text search and vector search together in your AI apps, see [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md). +> To use full-text search and vector search together in your AI apps, see [Hybrid Search](/ai/guides/vector-search-hybrid-search.md). ## Get started -Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, Full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: +Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: - AWS: `Frankfurt (eu-central-1)` and `Singapore (ap-southeast-1)` @@ -70,7 +70,7 @@ ALTER TABLE stock_items ADD FULLTEXT INDEX (title) WITH PARSER MULTILINGUAL ADD_ The following parsers are accepted in the `WITH PARSER ` clause: -- `STANDARD`: fast, works for English contents, splitting words by spaces and punctuation. +- `STANDARD`: fast, works for English content, splitting words by spaces and punctuation. - `MULTILINGUAL`: supports multiple languages, including English, Chinese, Japanese, and Korean. @@ -200,21 +200,11 @@ WHERE t.author_id IN ## See also -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) ## Feedback & help Full-text search is still in the early stages with limited accessibility. If you would like to try full-text search in a region that is not yet available, or if you have feedback or need help, feel free to reach out to us: - - -- [Join our Discord](https://discord.gg/zcqexutz2R) - - - - - -- [Join our Discord](https://discord.gg/zcqexutz2R) -- [Visit our Support Portal](https://tidb.support.pingcap.com/) - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) diff --git a/tidb-cloud/vector-search-hybrid-search.md b/ai/guides/vector-search-hybrid-search.md similarity index 62% rename from tidb-cloud/vector-search-hybrid-search.md rename to ai/guides/vector-search-hybrid-search.md index 90c2885f51324..4058eec9ff56e 100644 --- a/tidb-cloud/vector-search-hybrid-search.md +++ b/ai/guides/vector-search-hybrid-search.md @@ -1,7 +1,7 @@ --- title: Hybrid Search summary: Use full-text search and vector search together to improve the retrieval quality. -aliases: ['/tidb/stable/vector-search-hybrid-search'] +aliases: ['/tidb/stable/vector-search-hybrid-search/','/tidbcloud/vector-search-hybrid-search/'] --- # Hybrid Search @@ -19,7 +19,7 @@ This tutorial demonstrates how to use hybrid search in TiDB with the [pytidb](ht ## Prerequisites -Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, Full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: +Full-text search is still in the early stages, and we are continuously rolling it out to more customers. Currently, full-text search is only available on {{{ .starter }}} and {{{ .essential }}} in the following regions: - AWS: `Frankfurt (eu-central-1)` and `Singapore (ap-southeast-1)` @@ -53,7 +53,7 @@ db = TiDBClient.connect( ) ``` -You can get these connection parameters from the [TiDB Cloud console](https://tidbcloud.com): +You can get these connection parameters from the [TiDB Cloud console](https://tidbcloud.com) as follows: 1. Navigate to the [**Clusters**](https://tidbcloud.com/project/clusters) page, and then click the name of your target cluster to go to its overview page. @@ -143,25 +143,105 @@ df = ( For a complete example, see [pytidb hybrid search demo](https://github.com/pingcap/pytidb/tree/main/examples/hybrid_search). -## See also +## Fusion methods -- [pytidb Python SDK Documentation](https://github.com/pingcap/pytidb) +Fusion methods combine results from vector (semantic) and full-text (keyword) searches into a single, unified ranking. This ensures that the final results leverage both semantic relevance and keyword matching. -- [Full-Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md) +`pytidb` supports two fusion methods: -## Feedback & help +- `rrf`: Reciprocal Rank Fusion (default) +- `weighted`: Weighted Score Fusion -Full-text search is still in the early stages with limited accessibility. If you would like to try full-text search in a region that is not yet available, or if you have feedback or need help, feel free to reach out to us: +You can select the fusion method that best fits your use case to optimize hybrid search results. + +### Reciprocal Rank Fusion (RRF) + +Reciprocal Rank Fusion (RRF) is an algorithm that evaluates search results by leveraging the rank of documents in multiple result sets. + +For more details, see the [RRF paper](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf). + +Enable reciprocal rank fusion by specifying the `method` parameter as `"rrf"` in the `.fusion()` method. + +```python +results = ( + table.search( + "AI database", search_type="hybrid" + ) + .fusion(method="rrf") + .limit(3) + .to_list() +) +``` + +Parameters: + +- `k`: A constant (default: 60) to prevent division by zero and control the impact of high-ranked documents. + +### Weighted Score Fusion + +Weighted Score Fusion combines vector search and full-text search scores using a weighted sum: + +```python +final_score = vs_weight * vector_score + fts_weight * fulltext_score +``` + +Enable weighted score fusion by specifying the `method` parameter as `"weighted"` in the `.fusion()` method. + +For example, to give more weight to vector search, set the `vs_weight` parameter to 0.7 and the `fts_weight` parameter to 0.3: - +```python +results = ( + table.search( + "AI database", search_type="hybrid" + ) + .fusion(method="weighted", vs_weight=0.7, fts_weight=0.3) + .limit(3) + .to_list() +) +``` + +Parameters: + +- `vs_weight`: The weight of the vector search score. +- `fts_weight`: The weight of the full-text search score. + +## Rerank method -- [Join our Discord](https://discord.gg/zcqexutz2R) +Hybrid search also supports reranking using reranker-specific models. - +Use the `rerank()` method to specify a reranker that sorts search results by relevance between the query and the documents. - +**Example: Using Jina AI Reranker to rerank the hybrid search results** -- [Join our Discord](https://discord.gg/zcqexutz2R) -- [Visit our Support Portal](https://tidb.support.pingcap.com/) +```python +reranker = Reranker( + # Use the `jina-reranker-m0` model + model_name="jina_ai/jina-reranker-m0", + api_key="{your-jinaai-api-key}" +) + +results = ( + table.search( + "AI database", search_type="hybrid" + ) + .fusion(method="rrf", k=60) + .rerank(reranker, "text") + .limit(3) + .to_list() +) +``` + +To check other reranker models, see [Reranking](/ai/guides/reranking.md). + +## See also + +- [pytidb Python SDK Documentation](https://github.com/pingcap/pytidb) + +- [Full-Text Search with Python](/ai/guides/vector-search-full-text-search-python.md) + +## Feedback & help + +Full-text search is still in the early stages with limited accessibility. If you would like to try full-text search in a region that is not yet available, or if you have feedback or need help, feel free to reach out to us: - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) diff --git a/ai/guides/vector-search.md b/ai/guides/vector-search.md new file mode 100644 index 0000000000000..2c14019a5e680 --- /dev/null +++ b/ai/guides/vector-search.md @@ -0,0 +1,506 @@ +--- +title: Vector Search +summary: Learn how to use vector search in your application. +--- + +# Vector Search + +Vector search uses semantic similarity to help you find the most relevant records, even if your query does not explicitly include all the keywords. + +> **Note:** +> +> For a complete example of vector search, see [Vector Search Example](/ai/examples/vector-search-with-pytidb.md). + +## Basic usage + +This section shows how to use vector search in your application in just a few steps. Before you start, you need to [connect to the database](/ai/guides/connect.md). + +### Step 1. Create a table with a vector field + + +
+ +You can use `client.create_table()` to create a table and `VectorField` to define a vector field. + +The following example creates a `documents` table with four columns: + +- `id`: The primary key of the table. +- `text`: The text content of the document. +- `text_vec`: The vector embedding of the text content. +- `meta`: The metadata of the document, which is a JSON object. + +```python hl_lines="9" +from pytidb.schema import TableModel, Field, VectorField +from pytidb.datatype import TEXT, JSON + +class Document(TableModel): + __tablename__ = "documents" + + id: int = Field(primary_key=True) + text: str = Field(sa_type=TEXT) + text_vec: list[float] = VectorField(dimensions=3) + meta: dict = Field(sa_type=JSON, default_factory=dict) + +table = client.create_table(schema=Document, if_exists="overwrite") +``` + +The `VectorField` class accepts the following parameters: + +- `dimensions`: The vector dimension. Once specified, only vectors with this exact dimension can be stored in this field. +- `index`: Whether to create a [vector index](https://docs.pingcap.com/tidbcloud/vector-search-index/) for the vector field. Defaults to `True`. +- `distance_metric`: The distance metric to use for the vector index. Supported values: + - `DistanceMetric.COSINE` (default): Cosine distance metric, suitable for measuring text similarity + - `DistanceMetric.L2`: L2 distance metric, suitable for capturing overall difference + +
+
+ +Use the `CREATE TABLE` statement to create a table and use the `VECTOR` type to define a vector column. + +```sql hl_lines="4 5" +CREATE TABLE documents ( + id INT PRIMARY KEY, + text TEXT, + text_vec VECTOR(3), + VECTOR INDEX `vec_idx_text_vec`((VEC_COSINE_DISTANCE(`text_vec`))) +); +``` + +In this example: + +- The `text_vec` column is defined as `VECTOR(3)`, so vectors stored in this column must have 3 dimensions. +- A vector index is created using the `VEC_COSINE_DISTANCE` function to optimize vector search performance. + +TiDB supports two distance functions for vector indexes: + +- `VEC_COSINE_DISTANCE`: Calculates the cosine distance between two vectors +- `VEC_L2_DISTANCE`: Calculates L2 distance (Euclidean distance) between two vectors + +
+
+ +### Step 2. Insert vector data into the table + +For demonstration, insert some text and their corresponding embeddings into the table. + +The following example inserts three documents, each with a simple 3-dimensional vector embedding: + +- `dog` with the vector embedding `[1, 2, 1]` +- `fish` with the vector embedding `[1, 2, 4]` +- `tree` with the vector embedding `[1, 0, 0]` + + +
+ +```python +table.bulk_insert([ + Document(text="dog", text_vec=[1,2,1], meta={"category": "animal"}), + Document(text="fish", text_vec=[1,2,4], meta={"category": "animal"}), + Document(text="tree", text_vec=[1,0,0], meta={"category": "plant"}), +]) +``` + +
+
+ +```sql +INSERT INTO documents (id, text, text_vec, meta) +VALUES + (1, 'dog', '[1,2,1]', '{"category": "animal"}'), + (2, 'fish', '[1,2,4]', '{"category": "animal"}'), + (3, 'tree', '[1,0,0]', '{"category": "plant"}'); +``` + +> **Note:** +> +> In real-world applications, embeddings are usually generated by an [embedding model](/ai/concepts/vector-search-overview.md#embedding-model). + +For convenience, pytidb provides an auto embedding feature that can automatically generate vector embeddings for your text fields when you insert, update, or search—no manual processing needed. + +For details, see the [Auto Embedding](/ai/guides/auto-embedding.md) guide. + +
+
+ +### Step 3. Perform vector search + +Vector search uses vector distance metrics to measure the similarity and relevance between vectors. The closer the distance, the more relevant the record. To find the most relevant documents in the table, you need to specify a query vector. + +The following example assumes the query is `A swimming animal` and its vector embedding is `[1, 2, 3]`. + + +
+ +Use the `table.search()` method to perform vector search. It uses `search_mode="vector"` by default. + +```python +table.search([1, 2, 3]).limit(3).to_list() +``` + +```python title="Execution result" +[ + {"id": 2, "text": "fish", "text_vec": [1,2,4], "_distance": 0.00853986601633272}, + {"id": 1, "text": "dog", "text_vec": [1,2,1], "_distance": 0.12712843905603044}, + {"id": 3, "text": "tree", "text_vec": [1,0,0], "_distance": 0.7327387580875756}, +] +``` + +The result shows that the most relevant document is `fish` with a distance of `0.00853986601633272`. + +
+
+ +Use the `ORDER BY (, ) LIMIT ` clause in a `SELECT` statement to get the `n` nearest neighbors of a query vector. + +The following example uses the `vec_cosine_distance` function to calculate the cosine distance between the vectors stored in the `text_vec` column and the provided query vector `[1, 2, 3]`. + +```sql +SELECT id, text, vec_cosine_distance(text_vec, '[1,2,3]') AS distance +FROM documents +ORDER BY distance +LIMIT 3; +``` + +```plain title="Execution result" ++----+----------+---------------------+ +| id | text | distance | ++----+----------+---------------------+ +| 2 | fish | 0.00853986601633272 | +| 1 | dog | 0.12712843905603044 | +| 3 | tree | 0.7327387580875756 | ++----+----------+---------------------+ +3 rows in set (0.15 sec) +``` + +The result shows that the most relevant document is `fish` with a distance of `0.00853986601633272`. + +
+
+ +## Distance metrics + +Distance metrics are a measure of the similarity between a pair of vectors. Currently, TiDB supports the following distance metrics: + + +
+ +The `table.search()` API supports the following distance metrics: + +| Metric Name | Description | Best For | +|--------------------------|----------------------------------------------------------------|----------| +| `DistanceMetric.COSINE` | Calculates the cosine distance between two vectors (default). Measures the angle between vectors. | Text embeddings, semantic search | +| `DistanceMetric.L2` | Calculates the L2 distance (Euclidean distance) between two vectors. Measures the straight-line distance. | Image features | + +To change the distance metric used for vector search, use the `.distance_metric()` method. + +**Example: Use the L2 distance metric** + +```python +from pytidb.schema import DistanceMetric + +results = ( + table.search([1, 2, 3]) + .distance_metric(DistanceMetric.L2) + .limit(10) + .to_list() +) +``` + +
+
+ +In SQL, you can use the following built-in functions to calculate vector distances directly in your queries: + +| Function Name | Description | +|-------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------| +| [`VEC_L2_DISTANCE`](https://docs.pingcap.com/tidbcloud/vector-search-functions-and-operators/#vec_l2_distance) | Calculates L2 distance (Euclidean distance) between two vectors | +| [`VEC_COSINE_DISTANCE`](https://docs.pingcap.com/tidbcloud/vector-search-functions-and-operators/#vec_cosine_distance) | Calculates the cosine distance between two vectors | +| [`VEC_NEGATIVE_INNER_PRODUCT`](https://docs.pingcap.com/tidbcloud/vector-search-functions-and-operators/#vec_negative_inner_product) | Calculates the negative of the inner product between two vectors| +| [`VEC_L1_DISTANCE`](https://docs.pingcap.com/tidbcloud/vector-search-functions-and-operators/#vec_l1_distance) | Calculates L1 distance (Manhattan distance) between two vectors | + +
+
+ +## Distance threshold + +The `table.search()` API allows you to set a distance threshold to control the similarity of the returned results. By specifying this threshold, you can exclude less similar vectors and return only those that meet your relevance criteria. + + +
+ +Use the `.distance_threshold()` method to set a maximum distance for search results. Only records with a distance less than the threshold are returned. + +**Example: Only return documents with a distance less than 0.5** + +```python +results = table.search([1, 2, 3]).distance_threshold(0.5).limit(10).to_list() +``` + +
+
+ +In SQL, use the `HAVING` clause with a distance function to filter results by distance: + +**Example: Only return documents with a distance less than 0.1** + +```sql +SELECT id, text, vec_cosine_distance(text_vec, '[1,2,3]') AS distance +FROM documents +HAVING distance < 0.1 +ORDER BY distance +LIMIT 10; +``` + +
+
+ +## Distance range + +The `table.search()` API also supports specifying a distance range to further refine the results. + + +
+ +Use the `.distance_range()` method to set both minimum and maximum distance values. Only records with a distance within this range are returned. + +**Example: Only return documents with a distance between 0.01 and 0.05** + +```python +results = table.search([1, 2, 3]).distance_range(0.01, 0.05).limit(10).to_list() +``` + +
+
+ +To specify a distance range in SQL, use `BETWEEN` or other comparison operators in the `HAVING` clause: + +**Example: Only return documents with a distance between 0.01 and 0.05** + +```sql +SELECT id, text, vec_l2_distance(text_vec, '[1,2,3]') AS distance +FROM documents +HAVING distance BETWEEN 0.01 AND 0.05 +ORDER BY distance +LIMIT 10; +``` + +
+
+ +## Metadata filtering + +As a relational database, TiDB supports a rich set of [SQL operators](https://docs.pingcap.com/tidbcloud/operators/) and allows flexible combinations of filtering conditions. + +For vector search in TiDB, you can apply metadata filtering on scalar fields (for example, integers and strings) or JSON fields. + +Typically, there are two modes for vector search combined with metadata filtering: + +- **Post-filtering**: TiDB first performs vector search to retrieve the top-k candidates from the entire vector space, then applies filters to that candidate set. The vector search stage typically uses a vector index for efficiency. +- **Pre-filtering**: TiDB applies filters before vector search. If the filter is highly selective and the filtered field has a scalar index, this mode can reduce the search space and improve performance. + +### Post-filtering + + +
+ +Use the `.filter()` method with a filter dictionary to apply filtering to vector search. + +By default, the `table.search()` API uses post-filtering mode to maximize search performance with the vector index. + +**Example: Vector search with post-filtering** + +```python +results = ( + table.search([1, 2, 3]) + # The `meta` is a JSON field, and its value is a JSON object + # like {"category": "animal"} + .filter({"meta.category": "animal"}) + .num_candidate(50) + .limit(10) + .to_list() +) +``` + +> **Note:** +> +> When using a vector index, if the final `limit` is very small, the accuracy of the results might decrease. You can use the `.num_candidate()` method to control how many candidates to retrieve from the vector index during the vector search phase, without changing the `limit` parameter. + +> A higher `num_candidate` value generally improves recall but might reduce query performance. Adjust this value based on your dataset and accuracy requirements. + +
+
+ +Currently, vector indexes are only effective in strict ANN (Approximate Nearest Neighbor) queries, such as: + +```sql +SELECT * FROM ORDER BY () LIMIT +``` + +In other words, you cannot use a `WHERE` clause together with a vector index in the same query. + +If you need to combine vector search with additional filtering conditions, you can use the post-filtering pattern. In this approach, the ANN query will be divided into two parts: + +- The inner query performs the vector search using the vector index. +- The outer query applies the `WHERE` condition to filter the results. + +```sql hl_lines="8" +SELECT * +FROM ( + SELECT id, text, meta, vec_cosine_distance(text_vec, '[1,2,3]') AS distance + FROM documents + ORDER BY distance + LIMIT 50 +) candidates +WHERE meta->>'$.category' = 'animal' +ORDER BY distance +LIMIT 10; +``` + +> **Note:** +> +> The post-filtering pattern might lead to empty results. For example, the inner query might retrieve the top 50 most similar records, but none of them match the `WHERE` condition. +> +> To mitigate this, you can increase the `LIMIT` value (e.g., 50) in the **inner query** to fetch more candidates, improving the chances of returning enough valid results after filtering. + +For supported SQL operators, see [Operators](https://docs.pingcap.com/tidbcloud/operators/) in the TiDB Cloud documentation. + + + + +### Pre-filtering + + +
+ +To enable pre-filtering, set `prefilter=True` in the `.filter()` method. + +**Example: Vector search with pre-filtering** + +```python +results = ( + table.search([1, 2, 3]) + .filter({"meta.category": "animal"}, prefilter=True) + .limit(10) + .to_list() +) +``` + +For supported filter operators, see [Filtering](/ai/guides/filtering.md). + +
+
+ +In SQL, use the `->>` operator or `JSON_EXTRACT` to access JSON fields in the `WHERE` clause: + +```sql +SELECT id, text, meta, vec_cosine_distance(text_vec, '[1,2,3]') AS distance +FROM documents +WHERE meta->>'$.category' = 'animal' +ORDER BY distance +LIMIT 10; +``` + +For supported SQL operators, see [Operators](https://docs.pingcap.com/tidbcloud/operators/) in the TiDB Cloud documentation. + +
+
+ +## Multiple vector fields + +TiDB supports defining multiple vector columns in a single table, allowing you to store and search different types of vector embeddings. + +For example, you can store both text embeddings and image embeddings in the same table, which is convenient for managing multimodal data. + + +
+ +You can define multiple vector fields in the schema and perform vector search on the specified vector field by using the `.vector_column()` method. + +**Example: Specify the vector field to search on** + +```python hl_lines="6 8 17" +# Create a table with multiple vector fields +class RichTextDocument(TableModel): + __tablename__ = "rich_text_documents" + id: int = Field(primary_key=True) + text: str = Field(sa_type=TEXT) + text_vec: list[float] = VectorField(dimensions=3) + image_url: str + image_vec: list[float] = VectorField(dimensions=3) + +table = client.create_table(schema=RichTextDocument, if_exists="overwrite") + +# Insert sample data ... + +# Search using image vector field +results = ( + table.search([1, 2, 3]) + .vector_column("image_vec") + .distance_metric(DistanceMetric.COSINE) + .limit(10) + .to_list() +) +``` + +
+
+ +You can create multiple vector columns in a table and search them using suitable distance functions: + +```sql +-- Create a table with multiple vector fields +CREATE TABLE rich_text_documents ( + id BIGINT PRIMARY KEY, + text TEXT, + text_vec VECTOR(3), + image_url VARCHAR(255), + image_vec VECTOR(3) +); + +-- Insert sample data ... + +-- Search using text vector +SELECT id, image_url, vec_l2_distance(image_vec, '[4,5,6]') AS image_distance +FROM rich_text_documents +ORDER BY image_distance +LIMIT 10; +``` + +
+
+ +## Output search results + +The `table.search()` API lets you convert search results into several common data processing formats: + +### As SQLAlchemy result rows + +To work with raw SQLAlchemy result rows, use: + +```python +table.search([1, 2, 3]).limit(10).to_rows() +``` + +### As a list of Python dictionaries + +For easier manipulation in Python, convert the results to a list of dictionaries: + +```python +table.search([1, 2, 3]).limit(10).to_list() +``` + +### As a pandas DataFrame + +To display results in a user-friendly table—especially useful in Jupyter notebooks—convert them to a pandas DataFrame: + +```python +table.search([1, 2, 3]).limit(10).to_pandas() +``` + +### As a list of Pydantic model instances + +The `TableModel` class can also be used as a Pydantic model to represent data entities. To work with results as Pydantic model instances, use: + +```python +table.search([1, 2, 3]).limit(10).to_pydantic() +``` \ No newline at end of file diff --git a/ai/integrations/embedding-openai-compatible.md b/ai/integrations/embedding-openai-compatible.md new file mode 100644 index 0000000000000..d89e940586cf5 --- /dev/null +++ b/ai/integrations/embedding-openai-compatible.md @@ -0,0 +1,131 @@ +--- +title: OpenAI-Compatible Embeddings +summary: Learn how to integrate TiDB Vector Search with an OpenAI-compatible embedding model to store embeddings and perform semantic search. +--- + +# OpenAI-Compatible Embeddings + +This tutorial demonstrates how to use OpenAI-compatible embedding services to generate text embeddings, store them in TiDB, and perform semantic search. + +> **Note:** +> +> Currently, [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. + +## OpenAI-compatible embedding services + +Because the OpenAI Embedding API is widely used, many providers offer compatible APIs, such as: + +- [Ollama](https://ollama.com/) +- [vLLM](https://vllm.ai/) + +The TiDB Python SDK [pytidb](https://github.com/pingcap/pytidb) provides the `EmbeddingFunction` class to integrate with OpenAI-compatible embedding services. + +## Usage example + +This example shows how to create a vector table, insert documents, and perform similarity search using an OpenAI-compatible embedding model. + +### Step 1: Connect to the database + +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +### Step 2: Define the embedding function + +To integrate with an OpenAI-compatible embedding service, initialize the `EmbeddingFunction` class and set the `model_name` parameter with the `openai/` prefix. + +```python +from pytidb.embeddings import EmbeddingFunction + +openai_like_embed = EmbeddingFunction( + model_name="openai/{model_name}", + api_base="{your-api-base}", + api_key="{your-api-key}", +) +``` + +The parameters are: + +- `model_name`: Specifies the model to use. Use the format `openai/{model_name}`. +- `api_base`: The base URL of your OpenAI-compatible embedding API service. +- `api_key`: The API key used to authenticate with the embedding API service. + +**Example: Use Ollama with the `nomic-embed-text` model** + +```python +openai_like_embed = EmbeddingFunction( + model_name="openai/nomic-embed-text", + api_base="http://localhost:11434/v1", +) +``` + +**Example: Use vLLM with the `intfloat/e5-mistral-7b-instruct` model** + +```python +openai_like_embed = EmbeddingFunction( + model_name="openai/intfloat/e5-mistral-7b-instruct", + api_base="http://localhost:8000/v1" +) +``` + +### Step 3: Create a vector table + +Create a table with a vector field that uses Ollama and the `nomic-embed-text` model. + +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +openai_like_embed = EmbeddingFunction( + model_name="openai/nomic-embed-text", + api_base="{your-api-base}", +) + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = openai_like_embed.VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +### Step 4: Insert data into the table + +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Java: Object-oriented language for cross-platform development."), + Document(id=2, content="Java coffee: Bold Indonesian beans with low acidity."), + Document(id=3, content="Java island: Densely populated, home to Jakarta."), + Document(id=4, content="Java's syntax is used in Android apps."), + Document(id=5, content="Dark roast Java beans enhance espresso blends."), +] +table.bulk_insert(documents) +``` + +With [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) enabled, TiDB automatically generates vector values when you insert data. + +### Step 5: Search for similar documents + +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How to start learning Java programming?") \ + .limit(2) \ + .to_list() +print(results) +``` + +With [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) enabled, TiDB automatically generates embeddings for query text during vector search. diff --git a/ai/integrations/tidb-mcp-claude-code.md b/ai/integrations/tidb-mcp-claude-code.md new file mode 100644 index 0000000000000..9db834959194c --- /dev/null +++ b/ai/integrations/tidb-mcp-claude-code.md @@ -0,0 +1,74 @@ +--- +title: Get started with Claude Code and TiDB MCP Server +summary: This guide shows you how to configure the TiDB MCP Server in Claude Code. +--- + +# Get Started with Claude Code and TiDB MCP Server + +This guide shows how to configure the TiDB MCP Server in Claude Code. + +## Prerequisites + +Before you begin, ensure you have the following: + +- **Claude Code**: Install it from [claude.com](https://claude.com/product/claude-code). +- **Python (>=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Connect to TiDB Cloud Starter (recommended) + +Use the TiDB Cloud console to generate a ready-to-run Claude Code command. + +1. Go to the [Clusters](https://tidbcloud.com/console/clusters) page, select your cluster, and then click **Use with AI Tools** in the upper-right corner. +2. In the **Access `your_cluster_name` with AI tools** dialog, select the **Branch** and **Database** that Claude Code should access. +3. Review the **Prerequisites** list in the dialog and install any missing dependencies. +4. Configure the root password: + + - If you have not set a password yet, click **Generate Password** and store it in a secure location (it is shown only once). + - If a password already exists, enter it in the **Enter the password for easy setup** field. + - If you forget the password, click **Reset password** in the **Prerequisites** section to generate a new one. + +5. Select the **Claude Code** tab, copy the setup command, and run it in your terminal. + +## Manual configuration (any TiDB cluster) + +If you prefer manual setup, use one of the following methods and replace the placeholders with your connection parameters. + +### Method 1: CLI command + +```bash +claude mcp add --transport stdio TiDB \ + --env TIDB_HOST='' \ + --env TIDB_PORT= \ + --env TIDB_USERNAME='' \ + --env TIDB_PASSWORD='' \ + --env TIDB_DATABASE='' \ + -- uvx --from 'pytidb[mcp]' 'tidb-mcp-server' +``` + +### Method 2: Project config file + +Add the following configuration to your project-level `.mcp.json` file. For details, see the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp#project-scope). + +```json +{ + "mcpServers": { + "TiDB": { + "type": "stdio", + "command": "uvx", + "args": ["--from", "pytidb[mcp]", "tidb-mcp-server"], + "env": { + "TIDB_HOST": "", + "TIDB_PORT": "", + "TIDB_USERNAME": "", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "" + } + } + } +} +``` + +## See also + +- [TiDB MCP Server](/ai/integrations/tidb-mcp-server.md) diff --git a/ai/integrations/tidb-mcp-claude-desktop.md b/ai/integrations/tidb-mcp-claude-desktop.md new file mode 100644 index 0000000000000..5845b7b67bd5b --- /dev/null +++ b/ai/integrations/tidb-mcp-claude-desktop.md @@ -0,0 +1,48 @@ +--- +title: Get started with Claude Desktop and TiDB MCP Server +summary: This guide shows you how to configure the TiDB MCP Server in Claude Desktop. +--- + +# Get started with Claude Desktop and TiDB MCP Server + +This guide shows how to configure the TiDB MCP Server in Claude Desktop. + +## Prerequisites + +Before you begin, ensure you have the following: + +- **Claude Desktop**: Download and install Claude Desktop from [claude.ai](https://claude.ai/download). +- **Python (>=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Setup steps + +Follow the steps below to set up the TiDB MCP Server in Claude Desktop: + +1. Open the **Settings** dialog. +2. Click the **Developers** tab in the dialog. +3. Click the **Edit Config** button to open the MCP config file `claude_desktop_config.json`. +4. Copy the following configuration into the `claude_desktop_config.json` file. + + ```json + { + "mcpServers": { + "TiDB": { + "command": "uvx --from pytidb[mcp] tidb-mcp-server", + "env": { + "TIDB_HOST": "localhost", + "TIDB_PORT": "4000", + "TIDB_USERNAME": "root", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "test" + } + } + } + } + ``` + +5. Go to the [TiDB Cloud cluster page](https://tidbcloud.com/console/clusters) and navigate to the cluster you want to connect to. +6. Click **Connect** in the upper-right corner to get the connection parameters, and replace the `TIDB_HOST`, `TIDB_PORT`, `TIDB_USERNAME`, `TIDB_PASSWORD`, and `TIDB_DATABASE` values with your own. +7. Restart Claude Desktop. + +For more details, see [how to configure the MCP server in Claude Desktop](https://modelcontextprotocol.io/quickstart/user). \ No newline at end of file diff --git a/ai/integrations/tidb-mcp-cursor.md b/ai/integrations/tidb-mcp-cursor.md new file mode 100644 index 0000000000000..ad27fe67ffb08 --- /dev/null +++ b/ai/integrations/tidb-mcp-cursor.md @@ -0,0 +1,66 @@ +--- +title: Get started with Cursor and TiDB MCP Server +summary: This guide shows you how to configure the TiDB MCP Server in the Cursor editor. +--- + +# Get Started with Cursor and TiDB MCP Server + +This guide shows how to configure the TiDB MCP Server in the Cursor editor. + +For one-click installation, click the following button: + +

Install TiDB MCP Server

+ +## Prerequisites + +Before you begin, ensure you have the following: + +- **Cursor**: Download and install Cursor from [cursor.com](https://cursor.com). +- **Python (>=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Connect to TiDB Cloud Starter (recommended) + +Use the TiDB Cloud console to create a Cursor configuration with your cluster credentials. + +1. Go to the [Clusters](https://tidbcloud.com/console/clusters) page, select your cluster, and then click **Use with AI Tools** in the upper-right corner. +2. In the **Access `your_cluster_name` with AI tools** dialog, select the **Branch** and **Database** that Cursor should access. +3. Review the **Prerequisites** list in the dialog and install any missing dependencies. +4. Configure the root password: + + - If you have not set a password yet, click **Generate Password** and store it in a secure location (it is shown only once). + - If a password already exists, enter it in the **Enter the password for easy setup** field. + - If you forget the password, click **Reset password** in the **Prerequisites** section to generate a new one. + +5. Select the **Cursor** tab, click **Add to Cursor**, and then click **Install** in Cursor. + +## Manual configuration (any TiDB cluster) + +If you prefer manual setup, add the following configuration to your `.cursor/mcp.json` file and replace the placeholders with your connection parameters: + +```json +{ + "mcpServers": { + "TiDB": { + "command": "uvx --from pytidb[mcp] tidb-mcp-server", + "env": { + "TIDB_HOST": "", + "TIDB_PORT": "", + "TIDB_USERNAME": "", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "" + } + } + } +} +``` + +For more details, see the [Model Context Protocol documentation](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers). + +## Troubleshooting + +If you encounter issues installing the TiDB MCP Server, check the MCP logs in Cursor. + +1. Click **View** > **Output** in the main menu at the top of the editor. +2. Select **MCP** from the dropdown menu in the **Output** panel. +3. If you see errors like `[error] Could not start MCP server tidb-mcp-server: Error: spawn uvx ENOENT`, it means the `uvx` command might not exist in your system `$PATH` environment variable. For macOS users, you can install `uvx` by running `brew install uv`. diff --git a/ai/integrations/tidb-mcp-server.md b/ai/integrations/tidb-mcp-server.md new file mode 100644 index 0000000000000..241d8b48aea7d --- /dev/null +++ b/ai/integrations/tidb-mcp-server.md @@ -0,0 +1,163 @@ +--- +title: TiDB MCP Server +summary: Manage your TiDB databases using natural language instructions with the TiDB MCP Server. +--- + +# TiDB MCP Server + +TiDB MCP Server is an open-source tool that lets you interact with TiDB databases using natural language instructions. + +## Understanding MCP and TiDB MCP Server + +The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is a protocol that standardizes communication between LLMs and external tools. + +MCP adopts a client-server architecture, allowing a host application to connect to multiple external servers: + +- **Hosts**: AI-powered applications, such as Claude Desktop or IDEs like Cursor, that initiate connections to MCP servers. + +- **Clients**: Components embedded within host applications that establish one-to-one connections with individual MCP servers. + +- **Servers**: External services, such as the **TiDB MCP Server**, which provide tools, context, and prompts to clients for interacting with external systems. + +The **TiDB MCP Server** is an MCP-compatible server that provides tools and context for MCP clients to interact with TiDB databases. + +## Prerequisites + +Before you begin, ensure you have the following: + +- **An MCP-compatible client**: For example, [Cursor](/ai/integrations/tidb-mcp-cursor.md) or [Claude Desktop](/ai/integrations/tidb-mcp-claude-desktop.md). +- **Python (>=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Supported MCP Clients + +Refer to the following guides for detailed examples of using the TiDB MCP Server with specific MCP clients: + +- [Cursor](/ai/integrations/tidb-mcp-cursor.md) +- [Claude Desktop](/ai/integrations/tidb-mcp-claude-desktop.md) + +If the preceding list does not include your MCP client, follow the setup steps below. + +## Setup steps + +The TiDB MCP Server supports two modes to integrate with MCP clients: + +- Standard Input/Output (STDIO) mode (default) +- Server-Sent Events (SSE) mode + +TiDB MCP Server uses STDIO mode by default, so you do not need to start a standalone server in advance. + +You can choose one of the modes to set up the TiDB MCP Server in your MCP client. + +### STDIO Mode + +To set up the TiDB MCP Server in your MCP client using STDIO mode, take the following steps: + +1. Refer to your MCP client documentation to learn how to configure your MCP server. + +2. Go to your [TiDB Cloud clusters](https://tidbcloud.com/console/clusters) page and navigate to the overview page of your cluster. + +3. Click **Connect** on the cluster overview page to get the connection parameters. + +4. Configure the TiDB MCP Server with your connection parameters in the `mcpServers` section of your AI application’s configuration file. + + Example MCP configuration file: + + ```json + { + "mcpServers": { + "TiDB": { + "command": "uvx --from pytidb[mcp] tidb-mcp-server", + "env": { + "TIDB_HOST": "localhost", + "TIDB_PORT": "4000", + "TIDB_USERNAME": "root", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "test" + } + } + } + } + ``` + +### Server-Sent Events (SSE) Mode + +To set up the TiDB MCP Server in your MCP client using SSE mode, take the following steps: + +1. Refer to your MCP client documentation to learn how to configure an MCP server. + +2. Go to your [TiDB Cloud clusters](https://tidbcloud.com/console/clusters) page and select your cluster. + +3. Click **Connect** on the cluster page to get the connection parameters. + +4. Create a `.env` file with your connection parameters. + + Example `.env` file: + + ```bash + cat > .env <=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Connect to TiDB Cloud Starter (recommended) + +Use the TiDB Cloud console to generate a VS Code configuration. + +1. Go to the [Clusters](https://tidbcloud.com/console/clusters) page, select your cluster, and then click **Use with AI Tools** in the upper-right corner. +2. In the **Access `your_cluster_name` with AI tools** dialog, select the **Branch** and **Database** that VS Code should access. +3. Review the **Prerequisites** list in the dialog and install any missing dependencies. +4. Configure the root password: + + - If you have not set a password yet, click **Generate Password** and store it in a secure location (it is shown only once). + - If a password already exists, enter it in the **Enter the password for easy setup** field. + - If you forget the password, click **Reset password** in the **Prerequisites** section to generate a new one. + +5. Select the **VS Code** tab, click **Add to VS Code**, and then click **Install** in VS Code. + +## Manual configuration (any TiDB cluster) + +If you prefer manual setup, add the following configuration to your `.vscode/mcp.json` file and replace the placeholders with your connection parameters: + +```json +{ + "mcpServers": { + "TiDB": { + "type": "stdio", + "command": "uvx", + "args": ["--from", "pytidb[mcp]", "tidb-mcp-server"], + "env": { + "TIDB_HOST": "", + "TIDB_PORT": "", + "TIDB_USERNAME": "", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "" + } + } + } +} +``` + +## See also + +- [TiDB MCP Server](/ai/integrations/tidb-mcp-server.md) diff --git a/ai/integrations/tidb-mcp-windsurf.md b/ai/integrations/tidb-mcp-windsurf.md new file mode 100644 index 0000000000000..d7eeaa8e713a3 --- /dev/null +++ b/ai/integrations/tidb-mcp-windsurf.md @@ -0,0 +1,58 @@ +--- +title: Get started with Windsurf and TiDB MCP Server +summary: This guide shows you how to configure the TiDB MCP Server in Windsurf. +--- + +# Get Started with Windsurf and TiDB MCP Server + +This guide shows how to configure the TiDB MCP Server in Windsurf. + +## Prerequisites + +Before you begin, ensure you have the following: + +- **Windsurf**: Download and install Windsurf from [windsurf.com](https://windsurf.com). +- **Python (>=3.10) and uv**: Ensure Python (3.10 or later) and `uv` are installed. Follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`. +- **A TiDB Cloud Starter cluster**: You can create a free TiDB cluster on [TiDB Cloud](https://tidbcloud.com/free-trial). + +## Connect to TiDB Cloud Starter (recommended) + +Use the TiDB Cloud console to gather the connection details, then update Windsurf's MCP configuration. + +1. Go to the [Clusters](https://tidbcloud.com/console/clusters) page, select your cluster, and then click **Use with AI Tools** in the upper-right corner. +2. In the **Access `your_cluster_name` with AI tools** dialog, select the **Branch** and **Database** that Windsurf should access. +3. Review the **Prerequisites** list in the dialog and install any missing dependencies. +4. Configure the root password: + + - If you have not set a password yet, click **Generate Password** and store it in a secure location (it is shown only once). + - If a password already exists, enter it in the **Enter the password for easy setup** field. + - If you forget the password, click **Reset password** in the **Prerequisites** section to generate a new one. + +5. Select the **Windsurf** tab and copy the provided connection values. +6. Update your `mcp_config.json` file using the copied values. For more information, see the [Windsurf MCP documentation](https://docs.windsurf.com/windsurf/cascade/mcp#adding-a-new-mcp-plugin). + +## Manual configuration (any TiDB cluster) + +If you prefer manual setup, update your `mcp_config.json` file as follows and replace the placeholders with your connection parameters: + +```json +{ + "mcpServers": { + "TiDB": { + "command": "uvx", + "args": ["--from", "pytidb[mcp]", "tidb-mcp-server"], + "env": { + "TIDB_HOST": "", + "TIDB_PORT": "", + "TIDB_USERNAME": "", + "TIDB_PASSWORD": "", + "TIDB_DATABASE": "" + } + } + } +} +``` + +## See also + +- [TiDB MCP Server](/ai/integrations/tidb-mcp-server.md) diff --git a/tidb-cloud/vector-search-auto-embedding-amazon-titan.md b/ai/integrations/vector-search-auto-embedding-amazon-titan.md similarity index 85% rename from tidb-cloud/vector-search-auto-embedding-amazon-titan.md rename to ai/integrations/vector-search-auto-embedding-amazon-titan.md index 502b3db11c2da..5c002dbe8960f 100644 --- a/tidb-cloud/vector-search-auto-embedding-amazon-titan.md +++ b/ai/integrations/vector-search-auto-embedding-amazon-titan.md @@ -1,15 +1,16 @@ --- title: Amazon Titan Embeddings summary: Learn how to use Amazon Titan embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-amazon-titan/'] --- # Amazon Titan Embeddings -This document describes how to use Amazon Titan embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. +This document describes how to use Amazon Titan embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. > **Note:** > -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. ## Available models @@ -126,13 +127,9 @@ Result: +------+----------------------------------------------------------------+ ``` -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). - ## See also -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/tidb-cloud/vector-search-auto-embedding-cohere.md b/ai/integrations/vector-search-auto-embedding-cohere.md similarity index 54% rename from tidb-cloud/vector-search-auto-embedding-cohere.md rename to ai/integrations/vector-search-auto-embedding-cohere.md index 10b6a12fe4b3b..e099fb5c5be5e 100644 --- a/tidb-cloud/vector-search-auto-embedding-cohere.md +++ b/ai/integrations/vector-search-auto-embedding-cohere.md @@ -1,15 +1,16 @@ --- title: Cohere Embeddings summary: Learn how to use Cohere embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-cohere/'] --- # Cohere Embeddings -This document describes how to use Cohere embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. +This document describes how to use Cohere embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. > **Note:** > -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. ## Available models @@ -55,7 +56,7 @@ For a full list of Cohere models, see [Cohere Documentation](https://docs.cohere ## SQL usage example (TiDB Cloud hosted) -The following example shows how to use the Cohere embedding model hosted by TiDB Cloud with Auto Embedding. +The following example shows how to use a Cohere embedding model hosted by TiDB Cloud with Auto Embedding. ```sql CREATE TABLE sample ( @@ -124,53 +125,185 @@ Both the **Embed v3** and **Multilingual Embed v3** models support the following - `START`: discards text from the beginning until the input fits. - `END`: discards text from the end until the input fits. -## SQL usage example (BYOK) +## Usage example (BYOK) -To use Bring Your Own Key (BYOK) Cohere models, you must specify a Cohere API key as follows: +This example shows how to create a vector table, insert documents, and run similarity search using Bring Your Own Key (BYOK) Cohere models. -> **Note** -> -> Replace `'your-cohere-api-key-here'` with your actual Cohere API key. You can obtain an API key from the [Cohere Dashboard](https://dashboard.cohere.com/). +### Step 1: Connect to the database + + +
+ +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +
+
+ +```bash +mysql -h {gateway-region}.prod.aws.tidbcloud.com \ + -P 4000 \ + -u {prefix}.root \ + -p{password} \ + -D {database} +``` + +
+
+ +### Step 2: Configure the API key + +Create your API key from the [Cohere Dashboard](https://dashboard.cohere.com/api-keys) and bring your own key (BYOK) to use the embedding service. + + +
+ +Configure the API key for the Cohere embedding provider using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="cohere", + api_key="{your-cohere-api-key}", +) +``` + +
+
+ +Set the API key for the Cohere embedding provider using SQL: ```sql -SET @@GLOBAL.TIDB_EXP_EMBED_COHERE_API_KEY = 'your-cohere-api-key-here'; +SET @@GLOBAL.TIDB_EXP_EMBED_COHERE_API_KEY = "{your-cohere-api-key}"; +``` -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( - "cohere/embed-v4.0", - `content`, - '{"input_type": "search_document", "input_type@search": "search_query"}' - )) STORED +
+
+ +### Step 3: Create a vector table + +Create a table with a vector field that uses the `cohere/embed-v4.0` model to generate 1536-dimensional vectors (default dimension): + + +
+ +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="cohere/embed-v4.0" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +
+
+ +```sql +CREATE TABLE sample_documents ( + `id` INT PRIMARY KEY, + `content` TEXT, + `embedding` VECTOR(1536) GENERATED ALWAYS AS (EMBED_TEXT( + "cohere/embed-v4.0", + `content` + )) STORED ); +``` -INSERT INTO sample - (`id`, `content`) +
+
+ +### Step 4: Insert data into the table + + +
+ +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Python: High-level programming language for data science and web development."), + Document(id=2, content="Python snake: Non-venomous constrictor found in tropical regions."), + Document(id=3, content="Python framework: Django and Flask are popular web frameworks."), + Document(id=4, content="Python libraries: NumPy and Pandas for data analysis."), + Document(id=5, content="Python ecosystem: Rich collection of packages and tools."), +] +table.bulk_insert(documents) +``` + +
+
+ +Insert data using the `INSERT INTO` statement: + +```sql +INSERT INTO sample_documents (id, content) VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); + (1, "Python: High-level programming language for data science and web development."), + (2, "Python snake: Non-venomous constrictor found in tropical regions."), + (3, "Python framework: Django and Flask are popular web frameworks."), + (4, "Python libraries: NumPy and Pandas for data analysis."), + (5, "Python ecosystem: Rich collection of packages and tools."); +``` +
+
-SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) +### Step 5: Search for similar documents + + +
+ +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How to learn Python programming?") \ + .limit(2) \ + .to_list() +print(results) +``` + +
+
+ +Use the `VEC_EMBED_COSINE_DISTANCE` function to perform vector search based on cosine distance metric: + +```sql +SELECT + `id`, + `content`, + VEC_EMBED_COSINE_DISTANCE(embedding, "How to learn Python programming?") AS _distance +FROM sample_documents +ORDER BY _distance ASC LIMIT 2; ``` +
+
+ ## Options (BYOK) All [Cohere embedding options](https://docs.cohere.com/v2/reference/embed) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. **Example: Specify different `input_type` for search and insert operations** -Use the `@search` suffix to indicates that the field takes effect only during vector search queries. +Use the `@search` suffix to indicate that the field takes effect only during vector search queries. ```sql CREATE TABLE sample ( @@ -200,13 +333,9 @@ CREATE TABLE sample ( For all available options, see [Cohere Documentation](https://docs.cohere.com/v2/reference/embed). -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). - ## See also -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/ai/integrations/vector-search-auto-embedding-gemini.md b/ai/integrations/vector-search-auto-embedding-gemini.md new file mode 100644 index 0000000000000..bd451c18164f1 --- /dev/null +++ b/ai/integrations/vector-search-auto-embedding-gemini.md @@ -0,0 +1,287 @@ +--- +title: Gemini Embeddings +summary: Learn how to use Google Gemini embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-gemini/'] +--- + +# Gemini Embeddings + +This document describes how to use Gemini embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. + +> **Note:** +> +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. + +## Available models + +All Gemini models are available for use with the `gemini/` prefix if you bring your own Gemini API key (BYOK). For example: + +**gemini-embedding-001** + +- Name: `gemini/gemini-embedding-001` +- Dimensions: 128–3072 (default: 3072) +- Distance metric: Cosine, L2 +- Maximum input text tokens: 2,048 +- Price: Charged by Google +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ + +For a full list of available models, see [Gemini documentation](https://ai.google.dev/gemini-api/docs/embeddings). + +## Usage example + +This example shows how to create a vector table, insert documents, and run similarity search using Google Gemini embedding models. + +### Step 1: Connect to the database + + +
+ +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +
+
+ +```bash +mysql -h {gateway-region}.prod.aws.tidbcloud.com \ + -P 4000 \ + -u {prefix}.root \ + -p{password} \ + -D {database} +``` + +
+
+ +### Step 2: Configure the API key + +Create your API key from the [Google AI Studio](https://makersuite.google.com/app/apikey) and bring your own key (BYOK) to use the embedding service. + + +
+ +Configure the API key for the Google Gemini embedding provider using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="google_gemini", + api_key="{your-google-api-key}", +) +``` + +
+
+ +Set the API key for the Google Gemini embedding provider using SQL: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_GEMINI_API_KEY = "{your-google-api-key}"; +``` + +
+
+ +### Step 3: Create a vector table + +Create a table with a vector field that uses the `gemini-embedding-001` model to generate 3072-dimensional vectors (default): + + +
+ +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="gemini-embedding-001" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +
+
+ +```sql +CREATE TABLE sample_documents ( + `id` INT PRIMARY KEY, + `content` TEXT, + `embedding` VECTOR(3072) GENERATED ALWAYS AS (EMBED_TEXT( + "gemini-embedding-001", + `content` + )) STORED +); +``` + +
+
+ +### Step 4: Insert data into the table + + +
+ +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Java: Object-oriented language for cross-platform development."), + Document(id=2, content="Java coffee: Bold Indonesian beans with low acidity."), + Document(id=3, content="Java island: Densely populated, home to Jakarta."), + Document(id=4, content="Java's syntax is used in Android apps."), + Document(id=5, content="Dark roast Java beans enhance espresso blends."), +] +table.bulk_insert(documents) +``` + +
+
+ +Insert data using the `INSERT INTO` statement: + +```sql +INSERT INTO sample_documents (id, content) +VALUES + (1, "Java: Object-oriented language for cross-platform development."), + (2, "Java coffee: Bold Indonesian beans with low acidity."), + (3, "Java island: Densely populated, home to Jakarta."), + (4, "Java's syntax is used in Android apps."), + (5, "Dark roast Java beans enhance espresso blends."); +``` + +
+
+ +### Step 5: Search for similar documents + + +
+ +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How to start learning Java programming?") \ + .limit(2) \ + .to_list() +print(results) +``` + +
+
+ +Use the `VEC_EMBED_COSINE_DISTANCE` function to perform vector search based on cosine distance: + +```sql +SELECT + `id`, + `content`, + VEC_EMBED_COSINE_DISTANCE(embedding, "How to start learning Java programming?") AS _distance +FROM sample_documents +ORDER BY _distance ASC +LIMIT 2; +``` + +
+
+ +## Custom embedding dimensions + +The `gemini-embedding-001` model supports flexible dimensions through Matryoshka Representation Learning (MRL). You can specify the desired dimensions in your embedding function: + + +
+ +```python +# For 1536 dimensions +embedding: list[float] = EmbeddingFunction( + model_name="gemini-embedding-001", + dimensions=1536 +).VectorField(source_field="content") + +# For 768 dimensions +embedding: list[float] = EmbeddingFunction( + model_name="gemini-embedding-001", + dimensions=768 +).VectorField(source_field="content") +``` + +
+
+ +```sql +-- For 1536 dimensions +`embedding` VECTOR(1536) GENERATED ALWAYS AS (EMBED_TEXT( + "gemini-embedding-001", + `content`, + '{"embedding_config": {"output_dimensionality": 1536}}' +)) STORED + +-- For 768 dimensions +`embedding` VECTOR(768) GENERATED ALWAYS AS (EMBED_TEXT( + "gemini-embedding-001", + `content`, + '{"embedding_config": {"output_dimensionality": 768}}' +)) STORED +``` + +
+
+ +Choose dimensions based on your performance requirements and storage constraints. Higher dimensions can improve accuracy but require more storage and compute resources. + +## Options + +All [Gemini options](https://ai.google.dev/gemini-api/docs/embeddings) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. + +**Example: Specify the task type to improve quality** + +```sql +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( + "gemini/gemini-embedding-001", + `content`, + '{"task_type": "SEMANTIC_SIMILARITY"}' + )) STORED +); +``` + +**Example: Use an alternative dimension** + +```sql +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(768) GENERATED ALWAYS AS (EMBED_TEXT( + "gemini/gemini-embedding-001", + `content`, + '{"output_dimensionality": 768}' + )) STORED +); +``` + +For all available options, see [Gemini documentation](https://ai.google.dev/gemini-api/docs/embeddings). + +## See also + +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/tidb-cloud/vector-search-auto-embedding-huggingface.md b/ai/integrations/vector-search-auto-embedding-huggingface.md similarity index 56% rename from tidb-cloud/vector-search-auto-embedding-huggingface.md rename to ai/integrations/vector-search-auto-embedding-huggingface.md index bbfb7efeb16b5..3853c54c73522 100644 --- a/tidb-cloud/vector-search-auto-embedding-huggingface.md +++ b/ai/integrations/vector-search-auto-embedding-huggingface.md @@ -1,28 +1,29 @@ --- -title: HuggingFace Embeddings -summary: Learn how to use HuggingFace embedding models in TiDB Cloud. +title: Hugging Face Embeddings +summary: Learn how to use Hugging Face embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-huggingface/'] --- -# HuggingFace Embeddings +# Hugging Face Embeddings -This document describes how to use HuggingFace embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. +This document describes how to use Hugging Face embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. > **Note:** > -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. ## Available models -HuggingFace models are available for use with the `huggingface/` prefix if you bring your own [HuggingFace Inference API](https://huggingface.co/docs/inference-providers/index) key (BYOK). +Hugging Face models are available for use with the `huggingface/` prefix if you bring your own [Hugging Face Inference API](https://huggingface.co/docs/inference-providers/index) key (BYOK). -For your convenience, the following sections take several popular models as examples to show how to use them with Auto Embedding. For a full list of available models, see [HuggingFace Models](https://huggingface.co/models?library=sentence-transformers&inference_provider=hf-inference&sort=trending). Note that not all models are provided by HuggingFace Inference API or always working. +For your convenience, the following sections use several popular models as examples. For a full list of available models, see [Hugging Face models](https://huggingface.co/models?library=sentence-transformers&inference_provider=hf-inference&sort=trending). Note that not all models are available through Hugging Face Inference API or reliably work. ## multilingual-e5-large - Name: `huggingface/intfloat/multilingual-e5-large` - Dimensions: 1024 - Distance metric: Cosine, L2 -- Price: Charged by HuggingFace +- Price: Charged by Hugging Face - Hosted by TiDB Cloud: ❌ - Bring Your Own Key: ✅ - Project home: @@ -66,7 +67,7 @@ LIMIT 2; - Name: `huggingface/BAAI/bge-m3` - Dimensions: 1024 - Distance metric: Cosine, L2 -- Price: Charged by HuggingFace +- Price: Charged by Hugging Face - Hosted by TiDB Cloud: ❌ - Bring Your Own Key: ✅ - Project home: @@ -108,7 +109,7 @@ LIMIT 2; - Name: `huggingface/sentence-transformers/all-MiniLM-L6-v2` - Dimensions: 384 - Distance metric: Cosine, L2 -- Price: Charged by HuggingFace +- Price: Charged by Hugging Face - Hosted by TiDB Cloud: ❌ - Bring Your Own Key: ✅ - Project home: @@ -152,7 +153,7 @@ LIMIT 2; - Name: `huggingface/sentence-transformers/all-mpnet-base-v2` - Dimensions: 768 - Distance metric: Cosine, L2 -- Price: Charged by HuggingFace +- Price: Charged by Hugging Face - Hosted by TiDB Cloud: ❌ - Bring Your Own Key: ✅ - Project home: @@ -193,13 +194,13 @@ LIMIT 2; > **Note:** > -> HuggingFace Inference API might be not stable for this model. +> Hugging Face Inference API might be unstable for this model. - Name: `huggingface/Qwen/Qwen3-Embedding-0.6B` - Dimensions: 1024 - Distance metric: Cosine, L2 - Maximum input text tokens: 512 -- Price: Charged by HuggingFace +- Price: Charged by Hugging Face - Hosted by TiDB Cloud: ❌ - Bring Your Own Key: ✅ - Project home: @@ -238,11 +239,91 @@ LIMIT 2; ## Python usage example -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). +This example shows how to create a vector table, insert documents, and run similarity search using Hugging Face embedding models. + +### Step 1: Connect to the database + +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +### Step 2: Configure the API key + +If you're using a private model or need higher rate limits, you can configure your Hugging Face API token. You can create your token from the [Hugging Face Token Settings](https://huggingface.co/settings/tokens) page: + +Configure the API token for Hugging Face models using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="huggingface", + api_key="{your-huggingface-token}", +) +``` + +### Step 3: Create a vector table + +Create a table with a vector field that uses a Hugging Face model to generate embeddings: + +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="huggingface/sentence-transformers/all-MiniLM-L6-v2" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +> **Tip:** +> +> The vector dimensions depend on the model you choose. For example, `huggingface/sentence-transformers/all-MiniLM-L6-v2` produces 384-dimensional vectors, while `huggingface/sentence-transformers/all-mpnet-base-v2` produces 768-dimensional vectors. + +### Step 4: Insert data into the table + +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Machine learning algorithms can identify patterns in data."), + Document(id=2, content="Deep learning uses neural networks with multiple layers."), + Document(id=3, content="Natural language processing helps computers understand text."), + Document(id=4, content="Computer vision enables machines to interpret images."), + Document(id=5, content="Reinforcement learning learns through trial and error."), +] +table.bulk_insert(documents) +``` + +### Step 5: Search for similar documents + +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How do neural networks work?") \ + .limit(3) \ + .to_list() + +for doc in results: + print(f"ID: {doc.id}, Content: {doc.content}") +``` ## See also -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/ai/integrations/vector-search-auto-embedding-jina-ai.md b/ai/integrations/vector-search-auto-embedding-jina-ai.md new file mode 100644 index 0000000000000..a4e800d9ae601 --- /dev/null +++ b/ai/integrations/vector-search-auto-embedding-jina-ai.md @@ -0,0 +1,264 @@ +--- +title: Jina AI Embeddings +summary: Learn how to use Jina AI embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-jina-ai/'] +--- + +# Jina AI Embeddings + +This document describes how to use [Jina AI embedding models](https://jina.ai/embeddings/) with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. + +> **Note:** +> +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. + +## Available models + +Jina AI provides high-performance, multimodal, and multilingual long-context embeddings for search, RAG, and agent applications. + +All Jina AI models are available for use with the `jina_ai/` prefix if you bring your own Jina AI API key (BYOK). For example: + +**jina-embeddings-v4** + +- Name: `jina_ai/jina-embeddings-v4` +- Dimensions: 2048 +- Distance metric: Cosine, L2 +- Maximum input text tokens: 32,768 +- Price: Charged by Jina AI +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ + +**jina-embeddings-v3** + +- Name: `jina_ai/jina-embeddings-v3` +- Dimensions: 1024 +- Distance metric: Cosine, L2 +- Maximum input text tokens: 8,192 +- Price: Charged by Jina AI +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ + +For a full list of available models, see [Jina AI Documentation](https://jina.ai/embeddings/). + +## Usage example + +This example shows how to create a vector table, insert documents, and run a similarity search using Jina AI embedding models. + +### Step 1: Connect to the database + + +
+ +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +
+
+ +```bash +mysql -h {gateway-region}.prod.aws.tidbcloud.com \ + -P 4000 \ + -u {prefix}.root \ + -p{password} \ + -D {database} +``` +
+
+ +### Step 2: Configure the API key + +Create your API key from the [Jina AI Platform](https://jina.ai/embeddings/) and bring your own key (BYOK) to use the embedding service. + + +
+ +Configure the API key for the Jina AI embedding provider using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="jina_ai", + api_key="{your-jina-api-key}", +) +``` + +
+
+ +Set the API key for the Jina AI embedding provider using SQL: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_JINA_AI_API_KEY = "{your-jina-api-key}"; +``` + +
+
+ +### Step 3: Create a vector table + +Create a table with a vector field that uses the `jina_ai/jina-embeddings-v4` model to generate 2048-dimensional vectors: + + +
+ +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="jina_ai/jina-embeddings-v4" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +
+
+ +```sql +CREATE TABLE sample_documents ( + `id` INT PRIMARY KEY, + `content` TEXT, + `embedding` VECTOR(2048) GENERATED ALWAYS AS (EMBED_TEXT( + "jina_ai/jina-embeddings-v4", + `content` + )) STORED +); +``` + +
+
+ +### Step 4: Insert data into the table + + +
+ +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Java: Object-oriented language for cross-platform development."), + Document(id=2, content="Java coffee: Bold Indonesian beans with low acidity."), + Document(id=3, content="Java island: Densely populated, home to Jakarta."), + Document(id=4, content="Java's syntax is used in Android apps."), + Document(id=5, content="Dark roast Java beans enhance espresso blends."), +] +table.bulk_insert(documents) +``` + +
+
+ +Insert data using the `INSERT INTO` statement: + +```sql +INSERT INTO sample_documents (id, content) +VALUES + (1, "Java: Object-oriented language for cross-platform development."), + (2, "Java coffee: Bold Indonesian beans with low acidity."), + (3, "Java island: Densely populated, home to Jakarta."), + (4, "Java's syntax is used in Android apps."), + (5, "Dark roast Java beans enhance espresso blends."); +``` + +
+
+ +### Step 5: Search for similar documents + + +
+ +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How to start learning Java programming?") \ + .limit(2) \ + .to_list() +print(results) +``` + +
+
+ +Use the `VEC_EMBED_COSINE_DISTANCE` function to perform vector search based on cosine distance metric: + +```sql +SELECT + `id`, + `content`, + VEC_EMBED_COSINE_DISTANCE(embedding, "How to start learning Java programming?") AS _distance +FROM sample_documents +ORDER BY _distance ASC +LIMIT 2; +``` + +Result: + +``` ++------+----------------------------------------------------------------+ +| id | content | ++------+----------------------------------------------------------------+ +| 1 | Java: Object-oriented language for cross-platform development. | +| 4 | Java's syntax is used in Android apps. | ++------+----------------------------------------------------------------+ +``` + +
+
+ +## Options + +All [Jina AI options](https://jina.ai/embeddings/) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. + +**Example: Specify "downstream task" for better performance** + +```sql +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(2048) GENERATED ALWAYS AS (EMBED_TEXT( + "jina_ai/jina-embeddings-v4", + `content`, + '{"task": "retrieval.passage", "task@search": "retrieval.query"}' + )) STORED +); +``` + +**Example: Use an alternative dimension** + +```sql +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(768) GENERATED ALWAYS AS (EMBED_TEXT( + "jina_ai/jina-embeddings-v3", + `content`, + '{"dimensions":768}' + )) STORED +); +``` + +For all available options, see [Jina AI Documentation](https://jina.ai/embeddings/). + +## See also + +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/ai/integrations/vector-search-auto-embedding-nvidia-nim.md b/ai/integrations/vector-search-auto-embedding-nvidia-nim.md new file mode 100644 index 0000000000000..364bf76bbc7a2 --- /dev/null +++ b/ai/integrations/vector-search-auto-embedding-nvidia-nim.md @@ -0,0 +1,255 @@ +--- +title: NVIDIA NIM Embeddings +summary: Learn how to use NVIDIA NIM embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-nvidia-nim/'] +--- + +# NVIDIA NIM Embeddings + +This document describes how to use NVIDIA NIM embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. + +> **Note:** +> +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. + +## Available models + +Embedding models hosted on NVIDIA NIM are available for use with the `nvidia_nim/` prefix if you bring your own [NVIDIA NIM API key](https://build.nvidia.com/settings/api-keys) (BYOK). + +For your convenience, the following section takes a popular model as an example to show how to use it with Auto Embedding. For a full list of available models, see [NVIDIA NIM Text-to-embedding Models](https://build.nvidia.com/models?filters=usecase%3Ausecase_text_to_embedding). + +## bge-m3 + +- Name: `nvidia_nim/baai/bge-m3` +- Dimensions: 1024 +- Distance metric: Cosine, L2 +- Maximum input text tokens: 8,192 +- Price: Charged by NVIDIA +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ +- Docs: + +Example: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_NVIDIA_NIM_API_KEY = 'your-nvidia-nim-api-key-here'; + +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( + "nvidia_nim/baai/bge-m3", + `content` + )) STORED +); + +INSERT INTO sample + (`id`, `content`) +VALUES + (1, "Java: Object-oriented language for cross-platform development."), + (2, "Java coffee: Bold Indonesian beans with low acidity."), + (3, "Java island: Densely populated, home to Jakarta."), + (4, "Java's syntax is used in Android apps."), + (5, "Dark roast Java beans enhance espresso blends."); + + +SELECT `id`, `content` FROM sample +ORDER BY + VEC_EMBED_COSINE_DISTANCE( + embedding, + "How to start learning Java programming?" + ) +LIMIT 2; +``` + +Result: + +``` ++------+----------------------------------------------------------------+ +| id | content | ++------+----------------------------------------------------------------+ +| 1 | Java: Object-oriented language for cross-platform development. | +| 4 | Java's syntax is used in Android apps. | ++------+----------------------------------------------------------------+ +``` + +## nv-embed-v1 + +This example shows how to create a vector table, insert documents, and run similarity search using the `nvidia/nv-embed-v1` model. + +### Step 1: Connect to the database + + +
+ +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +
+
+ +```bash +mysql -h {gateway-region}.prod.aws.tidbcloud.com \ + -P 4000 \ + -u {prefix}.root \ + -p{password} \ + -D {database} +``` + +
+
+ +### Step 2: Configure the API key + +If you're using NVIDIA NIM models that require authentication, you can configure your API key. You can get free access to NIM API endpoints through the [NVIDIA Developer Program](https://developer.nvidia.com/nim) or create your API key from the [NVIDIA Build Platform](https://build.nvidia.com/settings/api-keys): + + +
+ +Configure the API key for NVIDIA NIM models using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="nvidia_nim", + api_key="{your-nvidia-api-key}", +) +``` + +
+
+ +Set the API key for NVIDIA NIM models using SQL: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_NVIDIA_NIM_API_KEY = "{your-nvidia-api-key}"; +``` + +
+
+ +### Step 3: Create a vector table + +Create a table with a vector field that uses an NVIDIA NIM model to generate embeddings: + + +
+ +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="nvidia/nv-embed-v1" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +
+
+ +```sql +CREATE TABLE sample_documents ( + `id` INT PRIMARY KEY, + `content` TEXT, + `embedding` VECTOR(4096) GENERATED ALWAYS AS (EMBED_TEXT( + "nvidia/nv-embed-v1", + `content` + )) STORED +); +``` + +
+
+ +### Step 4: Insert data into the table + + +
+ +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Machine learning algorithms can identify patterns in data."), + Document(id=2, content="Deep learning uses neural networks with multiple layers."), + Document(id=3, content="Natural language processing helps computers understand text."), + Document(id=4, content="Computer vision enables machines to interpret images."), + Document(id=5, content="Reinforcement learning learns through trial and error."), +] +table.bulk_insert(documents) +``` + +
+
+ +Insert data using the `INSERT INTO` statement: + +```sql +INSERT INTO sample_documents (id, content) +VALUES + (1, "Machine learning algorithms can identify patterns in data."), + (2, "Deep learning uses neural networks with multiple layers."), + (3, "Natural language processing helps computers understand text."), + (4, "Computer vision enables machines to interpret images."), + (5, "Reinforcement learning learns through trial and error."); +``` + +
+
+ +### Step 5: Search for similar documents + + +
+ +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How do neural networks work?") \ + .limit(3) \ + .to_list() + +for doc in results: + print(f"ID: {doc.id}, Content: {doc.content}") +``` + +
+
+ +Use the `VEC_EMBED_COSINE_DISTANCE` function to perform vector search with cosine distance: + +```sql +SELECT + `id`, + `content`, + VEC_EMBED_COSINE_DISTANCE(embedding, "How do neural networks work?") AS _distance +FROM sample_documents +ORDER BY _distance ASC +LIMIT 3; +``` + +
+
+ +## See also + +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) diff --git a/ai/integrations/vector-search-auto-embedding-openai.md b/ai/integrations/vector-search-auto-embedding-openai.md new file mode 100644 index 0000000000000..c2b2f2034a658 --- /dev/null +++ b/ai/integrations/vector-search-auto-embedding-openai.md @@ -0,0 +1,297 @@ +--- +title: OpenAI Embeddings +summary: Learn how to use OpenAI embedding models in TiDB Cloud. +aliases: ['/tidbcloud/vector-search-auto-embedding-openai/'] +--- + +# OpenAI Embeddings + +This document describes how to use OpenAI embedding models with [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches with text queries. + +> **Note:** +> +> [Auto Embedding](/ai/integrations/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. + +## Available models + +All OpenAI models are available for use with the `openai/` prefix if you bring your own OpenAI API key (BYOK). For example: + +**text-embedding-3-small** + +- Name: `openai/text-embedding-3-small` +- Dimensions: 512-1536 (default: 1536) +- Distance metric: Cosine, L2 +- Price: Charged by OpenAI +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ + +**text-embedding-3-large** + +- Name: `openai/text-embedding-3-large` +- Dimensions: 256-3072 (default: 3072) +- Distance metric: Cosine, L2 +- Price: Charged by OpenAI +- Hosted by TiDB Cloud: ❌ +- Bring Your Own Key: ✅ + +For a full list of available models, see [OpenAI Documentation](https://platform.openai.com/docs/guides/embeddings). + +## Usage example + +This example shows how to create a vector table, insert documents, and run similarity search using OpenAI embedding models. + +You can integrate the OpenAI Embeddings API with TiDB using the AI SDK or native SQL functions for automatic embedding generation. + +### Step 1: Connect to the database + + +
+ +```python +from pytidb import TiDBClient + +tidb_client = TiDBClient.connect( + host="{gateway-region}.prod.aws.tidbcloud.com", + port=4000, + username="{prefix}.root", + password="{password}", + database="{database}", + ensure_db=True, +) +``` + +
+
+ +```bash +mysql -h {gateway-region}.prod.aws.tidbcloud.com \ + -P 4000 \ + -u {prefix}.root \ + -p{password} \ + -D {database} +``` + +
+
+ +### Step 2: Configure the API key + +Create an API key in the [OpenAI API Platform](https://platform.openai.com/api-keys) and bring your own key (BYOK) to use the embedding service. + + +
+ +Configure the API key for the OpenAI embedding provider using the TiDB Client: + +```python +tidb_client.configure_embedding_provider( + provider="openai", + api_key="{your-openai-api-key}", +) +``` + +
+
+ +Set the API key for the OpenAI embedding provider using SQL: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_KEY = "{your-openai-api-key}"; +``` + +
+
+ +### Step 3: Create a vector table + +Create a table with a vector field that uses the `openai/text-embedding-3-small` model to generate 1536-dimensional vectors: + + +
+ +```python +from pytidb.schema import TableModel, Field +from pytidb.embeddings import EmbeddingFunction +from pytidb.datatype import TEXT + +class Document(TableModel): + __tablename__ = "sample_documents" + id: int = Field(primary_key=True) + content: str = Field(sa_type=TEXT) + embedding: list[float] = EmbeddingFunction( + model_name="openai/text-embedding-3-small" + ).VectorField(source_field="content") + +table = tidb_client.create_table(schema=Document, if_exists="overwrite") +``` + +
+
+ +```sql +CREATE TABLE sample_documents ( + `id` INT PRIMARY KEY, + `content` TEXT, + `embedding` VECTOR(1536) GENERATED ALWAYS AS (EMBED_TEXT( + "openai/text-embedding-3-small", + `content` + )) STORED +); +``` + +
+
+ +### Step 4: Insert data into the table + + +
+ +Use the `table.insert()` or `table.bulk_insert()` API to add data: + +```python +documents = [ + Document(id=1, content="Java: Object-oriented language for cross-platform development."), + Document(id=2, content="Java coffee: Bold Indonesian beans with low acidity."), + Document(id=3, content="Java island: Densely populated, home to Jakarta."), + Document(id=4, content="Java's syntax is used in Android apps."), + Document(id=5, content="Dark roast Java beans enhance espresso blends."), +] +table.bulk_insert(documents) +``` + +
+
+ +Insert data using the `INSERT INTO` statement: + +```sql +INSERT INTO sample_documents (id, content) +VALUES + (1, "Java: Object-oriented language for cross-platform development."), + (2, "Java coffee: Bold Indonesian beans with low acidity."), + (3, "Java island: Densely populated, home to Jakarta."), + (4, "Java's syntax is used in Android apps."), + (5, "Dark roast Java beans enhance espresso blends."); +``` + +
+
+ +### Step 5: Search for similar documents + + +
+ +Use the `table.search()` API to perform vector search: + +```python +results = table.search("How to start learning Java programming?") \ + .limit(2) \ + .to_list() +print(results) +``` + +
+
+ +Use the `VEC_EMBED_COSINE_DISTANCE` function to perform vector search with cosine distance: + +```sql +SELECT + `id`, + `content`, + VEC_EMBED_COSINE_DISTANCE(embedding, "How to start learning Java programming?") AS _distance +FROM sample_documents +ORDER BY _distance ASC +LIMIT 2; +``` + +Result: + +``` ++------+----------------------------------------------------------------+ +| id | content | ++------+----------------------------------------------------------------+ +| 1 | Java: Object-oriented language for cross-platform development. | +| 4 | Java's syntax is used in Android apps. | ++------+----------------------------------------------------------------+ +``` + +
+
+ +## Use Azure OpenAI + +To use OpenAI embedding models on Azure, set the global variable `TIDB_EXP_EMBED_OPENAI_API_BASE` to the URL of your Azure resource. For example: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_KEY = 'your-openai-api-key-here'; +SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_BASE = 'https://.openai.azure.com/openai/v1'; + +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(3072) GENERATED ALWAYS AS (EMBED_TEXT( + "openai/text-embedding-3-large", + `content` + )) STORED +); + +INSERT INTO sample + (`id`, `content`) +VALUES + (1, "Java: Object-oriented language for cross-platform development."), + (2, "Java coffee: Bold Indonesian beans with low acidity."), + (3, "Java island: Densely populated, home to Jakarta."), + (4, "Java's syntax is used in Android apps."), + (5, "Dark roast Java beans enhance espresso blends."); + +SELECT `id`, `content` FROM sample +ORDER BY + VEC_EMBED_COSINE_DISTANCE( + embedding, + "How to start learning Java programming?" + ) +LIMIT 2; +``` + +Even if your resource URL appears as `https://.cognitiveservices.azure.com/`, you still need to use `https://.openai.azure.com/openai/v1` as the API base to keep OpenAI-compatible request and response formats. + +To switch from Azure OpenAI to OpenAI directly, set `TIDB_EXP_EMBED_OPENAI_API_BASE` to an empty string: + +```sql +SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_BASE = ''; +``` + +> **Note:** +> +> - For security reasons, you can only set the API base to an Azure OpenAI URL or the OpenAI URL. Arbitrary base URLs are not allowed. +> - To use another OpenAI-compatible embedding service, contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md). + +## Options + +All [OpenAI embedding options](https://platform.openai.com/docs/api-reference/embeddings/create) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. + +**Example: Use an alternative dimension for text-embedding-3-large** + +```sql +CREATE TABLE sample ( + `id` INT, + `content` TEXT, + `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( + "openai/text-embedding-3-large", + `content`, + '{"dimensions": 1024}' + )) STORED +); +``` + +For all available options, see [OpenAI Documentation](https://platform.openai.com/docs/api-reference/embeddings/create). + +## See also + +- [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md) +- [Vector Search](/ai/concepts/vector-search-overview.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) \ No newline at end of file diff --git a/tidb-cloud/vector-search-auto-embedding-overview.md b/ai/integrations/vector-search-auto-embedding-overview.md similarity index 62% rename from tidb-cloud/vector-search-auto-embedding-overview.md rename to ai/integrations/vector-search-auto-embedding-overview.md index 2c19224191b98..ecbbb2a8bc7ca 100644 --- a/tidb-cloud/vector-search-auto-embedding-overview.md +++ b/ai/integrations/vector-search-auto-embedding-overview.md @@ -1,6 +1,7 @@ --- title: Auto Embedding Overview summary: Learn how to use Auto Embedding to perform semantic searches with plain text instead of vectors. +aliases: ['/tidbcloud/vector-search-auto-embedding-overview/'] --- # Auto Embedding Overview @@ -10,7 +11,7 @@ The Auto Embedding feature lets you perform vector searches directly with plain To use Auto Embedding, the basic workflow is as follows: 1. **Define a table** with a text column and a generated vector column using `EMBED_TEXT()`. -2. **Insert text data** — vectors are automatically generated and stored concurrently. +2. **Insert text data** — vectors are generated and stored automatically. 3. **Query using text** — use `VEC_EMBED_COSINE_DISTANCE()` or `VEC_EMBED_L2_DISTANCE()` to find semantically similar content. > **Note:** @@ -21,14 +22,14 @@ To use Auto Embedding, the basic workflow is as follows: > **Tip:** > -> For Python usage, see [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). +> For Python usage, see [Use Auto Embedding in Python](#use-auto-embedding-in-python). The following example shows how to use Auto Embedding with cosine distance to perform a semantic search. No API key is required in this example. ```sql -- Create a table with auto-embedding --- The dimension of the vector column must match the dimension of the embedding model, --- otherwise TiDB returns an error when inserting data. +-- The dimension of the vector column must match the dimension of the embedding model; +-- Otherwise, TiDB returns an error when inserting data. CREATE TABLE documents ( id INT PRIMARY KEY AUTO_INCREMENT, content TEXT, @@ -70,7 +71,7 @@ The preceding example uses the Amazon Titan model. For other models, see [Availa ## Auto Embedding + Vector index -Auto Embedding is compatible with [Vector index](/vector-search/vector-search-index.md) for better query performance. You can define a vector index on the generated vector column, and it will be used automatically: +Auto Embedding is compatible with [Vector index](/ai/reference/vector-search-index.md) for better query performance. You can define a vector index on the generated vector column, and it will be used automatically: ```sql -- Create a table with auto-embedding and a vector index @@ -111,18 +112,18 @@ TiDB Cloud supports various embedding models. Choose the one that best fits your | Embedding model | Documentation | Hosted by TiDB Cloud 1 | BYOK 2 | | --------------- | ----------------------------------------------------------------------------------- | --------------------------------- | ----------------- | -| Amazon Titan | [Amazon Titan Embeddings](/tidb-cloud/vector-search-auto-embedding-amazon-titan.md) | ✅ | | -| Cohere | [Cohere Embeddings](/tidb-cloud/vector-search-auto-embedding-cohere.md) | ✅ | ✅ | -| Jina AI | [Jina AI Embeddings](/tidb-cloud/vector-search-auto-embedding-jina-ai.md) | | ✅ | -| OpenAI | [OpenAI Embeddings](/tidb-cloud/vector-search-auto-embedding-openai.md) | | ✅ | -| Gemini | [Gemini Embeddings](/tidb-cloud/vector-search-auto-embedding-gemini.md) | | ✅ | +| Amazon Titan | [Amazon Titan Embeddings](/ai/integrations/vector-search-auto-embedding-amazon-titan.md) | ✅ | | +| Cohere | [Cohere Embeddings](/ai/integrations/vector-search-auto-embedding-cohere.md) | ✅ | ✅ | +| Jina AI | [Jina AI Embeddings](/ai/integrations/vector-search-auto-embedding-jina-ai.md) | | ✅ | +| OpenAI | [OpenAI Embeddings](/ai/integrations/vector-search-auto-embedding-openai.md) | | ✅ | +| Gemini | [Gemini Embeddings](/ai/integrations/vector-search-auto-embedding-gemini.md) | | ✅ | You can also use open-source embedding models through the following inference services that TiDB Cloud supports: | Embedding model | Documentation | Hosted by TiDB Cloud 1 | BYOK 2 | Example supported models | | --------------------- | --------------------------------------------------------------------------------- | --------------------------------- | ----------------- | --------------------------------- | -| HuggingFace Inference | [HuggingFace Embeddings](/tidb-cloud/vector-search-auto-embedding-huggingface.md) | | ✅ | `bge-m3`, `multilingual-e5-large` | -| NVIDIA NIM | [NVIDIA NIM Embeddings](/tidb-cloud/vector-search-auto-embedding-nvidia-nim.md) | | ✅ | `bge-m3`, `nv-embed-v1` | +| Hugging Face Inference | [Hugging Face Embeddings](/ai/integrations/vector-search-auto-embedding-huggingface.md) | | ✅ | `bge-m3`, `multilingual-e5-large` | +| NVIDIA NIM | [NVIDIA NIM Embeddings](/ai/integrations/vector-search-auto-embedding-nvidia-nim.md) | | ✅ | `bge-m3`, `nv-embed-v1` | ​1 Hosted models are hosted by TiDB Cloud and do not require any API keys. Currently, these hosted models are free to use, but certain usage limits might be applied to keep them available to everyone. @@ -132,7 +133,7 @@ You can also use open-source embedding models through the following inference se Auto Embedding uses the [`EMBED_TEXT()`](#embed_text) function to convert text into vector embeddings with your chosen embedding model. The generated vectors are stored in `VECTOR` columns and can be queried with plain text using [`VEC_EMBED_COSINE_DISTANCE()`](#vec_embed_cosine_distance) or [`VEC_EMBED_L2_DISTANCE()`](#vec_embed_l2_distance). -Internally, [`VEC_EMBED_COSINE_DISTANCE()`](#vec_embed_cosine_distance) and [`VEC_EMBED_L2_DISTANCE()`](#vec_embed_l2_distance) are executed as [`VEC_COSINE_DISTANCE()`](/vector-search/vector-search-functions-and-operators.md#vec_cosine_distance) and [`VEC_L2_DISTANCE()`](/vector-search/vector-search-functions-and-operators.md#vec_l2_distance), with the text query automatically converted into a vector embedding. +Internally, [`VEC_EMBED_COSINE_DISTANCE()`](#vec_embed_cosine_distance) and [`VEC_EMBED_L2_DISTANCE()`](#vec_embed_l2_distance) are executed as [`VEC_COSINE_DISTANCE()`](/ai/reference/vector-search-functions-and-operators.md#vec_cosine_distance) and [`VEC_L2_DISTANCE()`](/ai/reference/vector-search-functions-and-operators.md#vec_l2_distance), with the text query automatically converted into a vector embedding. ## Key functions @@ -154,7 +155,7 @@ Calculates cosine similarity between a stored vector in the vector column and a VEC_EMBED_COSINE_DISTANCE(vector_column, "query_text") ``` -Use this function in `ORDER BY` clauses to rank results by cosine distance. It uses the same calculation as [`VEC_COSINE_DISTANCE()`](/vector-search/vector-search-functions-and-operators.md#vec_cosine_distance), but automatically generates the embedding for the query text. +Use this function in `ORDER BY` clauses to rank results by cosine distance. It uses the same calculation as [`VEC_COSINE_DISTANCE()`](/ai/reference/vector-search-functions-and-operators.md#vec_cosine_distance), but automatically generates the embedding for the query text. ### `VEC_EMBED_L2_DISTANCE()` @@ -164,14 +165,41 @@ Calculates L2 (Euclidean) distance between a stored vector and a text query: VEC_EMBED_L2_DISTANCE(vector_column, "query_text") ``` -Use this function in `ORDER BY` clauses to rank results by L2 distance. It uses the same calculation as [`VEC_L2_DISTANCE()`](/vector-search/vector-search-functions-and-operators.md#vec_l2_distance), but automatically generates the embedding for the query text. +Use this function in `ORDER BY` clauses to rank results by L2 distance. It uses the same calculation as [`VEC_L2_DISTANCE()`](/ai/reference/vector-search-functions-and-operators.md#vec_l2_distance), but automatically generates the embedding for the query text. ## Use Auto Embedding in Python -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). +TiDB provides a unified interface for integrating with various embedding providers and models: + +- **Programmatic use**: Use the `EmbeddingFunction` class from the AI SDK to create embedding functions for specific providers or models. +- **SQL use**: Use the `EMBED_TEXT` function to generate embeddings directly from text data. + +Use the `EmbeddingFunction` class to work with different embedding providers and models. + + ```python + from pytidb.embeddings import EmbeddingFunction + + embed_func = EmbeddingFunction( + model_name="/", + ) + ``` + +**Parameters:** + +- `model_name` *(required)*: specifies the embedding model to use, in the format `{provider_name}/{model_name}`. + +- `dimensions` *(optional)*: the dimensionality of output vector embeddings. If not provided and the model lacks a default dimension, a test string is embedded during initialization to determine the actual dimension automatically. + +- `api_key` *(optional)*: the API key for accessing the embedding service. If not explicitly set, retrieves the key from the provider's default environment variable. + +- `api_base` *(optional)*: the base URL of the embedding API service. + +- `use_server` *(optional)*: whether to use TiDB Cloud's hosted embedding service. Defaults to `True` for TiDB Cloud Starter. + +- `multimodal` *(optional)*: whether to use a multimodal embedding model. When enabled, `use_server` is automatically set to `False`, and the embedding service is called client-side. ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md b/ai/integrations/vector-search-integrate-with-amazon-bedrock.md similarity index 85% rename from tidb-cloud/vector-search-integrate-with-amazon-bedrock.md rename to ai/integrations/vector-search-integrate-with-amazon-bedrock.md index ae593de4a8a92..9a013e92d46c9 100644 --- a/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md +++ b/ai/integrations/vector-search-integrate-with-amazon-bedrock.md @@ -1,23 +1,21 @@ --- title: Integrate TiDB Vector Search with Amazon Bedrock summary: Learn how to integrate TiDB Vector Search with Amazon Bedrock to build a Retrieval-Augmented Generation (RAG) Q&A bot. +aliases: ['/tidbcloud/vector-search-integrate-with-amazon-bedrock/'] --- # Integrate TiDB Vector Search with Amazon Bedrock -This tutorial demonstrates how to integrate the [vector search](/vector-search/vector-search-overview.md) feature of TiDB with [Amazon Bedrock](https://aws.amazon.com/bedrock/) to build a Retrieval-Augmented Generation (RAG) Q&A bot. - - - > **Note:** > -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> This document is applicable to TiDB Cloud only and not applicable to TiDB Self-Managed. - +This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/vector-search-overview.md) with [Amazon Bedrock](https://aws.amazon.com/bedrock/) to build a Retrieval-Augmented Generation (RAG) Q&A bot. -> **Note** +> **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). > **Tip** > @@ -31,7 +29,7 @@ To complete this tutorial, you need: - [Pip](https://pypi.org/project/pip/) installed - [AWS CLI](https://aws.amazon.com/cli/) installed - Ensure your AWS CLI profile is configured to a supported [Amazon Bedrock](https://aws.amazon.com/bedrock/) region for this tutorial. You can find the list of supported regions at [Amazon Bedrock Regions](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html). To switch to a supported region, run the following command: + Ensure your AWS CLI profile is configured to a supported [Amazon Bedrock](https://aws.amazon.com/bedrock/) region. You can find the list of supported regions at [Amazon Bedrock Regions](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html). To switch to a supported region, run the following command: ```shell aws configure set region @@ -39,7 +37,7 @@ To complete this tutorial, you need: - A {{{ .starter }}} cluster - Follow [creating a {{{ .starter }}} cluster](/tidb-cloud/create-tidb-cluster-serverless.md) to create your own TiDB Cloud cluster if you don't have one. + Follow [creating a {{{ .starter }}} cluster](/tidb-cloud/select-cluster-tier.md#starter) to create your own TiDB Cloud cluster if you don't have one. - An AWS account with the [required permissions for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html) and access to the following models: @@ -50,7 +48,7 @@ To complete this tutorial, you need: ## Get started -This section provides step-by-step instructions for integrating TiDB Vector Search with Amazon Bedrock to build a RAG-based Q&A bot. +This section provides step-by-step instructions to integrate TiDB Vector Search with Amazon Bedrock to build a RAG-based Q&A bot. ### Step 1. Set the environment variables @@ -317,5 +315,5 @@ def save_entities_with_embedding(session, contents): ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) \ No newline at end of file +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-django-orm.md b/ai/integrations/vector-search-integrate-with-django-orm.md similarity index 78% rename from vector-search/vector-search-integrate-with-django-orm.md rename to ai/integrations/vector-search-integrate-with-django-orm.md index 4a676a1b595de..d81a46641c0d8 100644 --- a/vector-search/vector-search-integrate-with-django-orm.md +++ b/ai/integrations/vector-search-integrate-with-django-orm.md @@ -1,31 +1,17 @@ --- title: Integrate TiDB Vector Search with Django ORM summary: Learn how to integrate TiDB Vector Search with Django ORM to store embeddings and perform semantic search. +aliases: ['/tidb/stable/vector-search-integrate-with-django-orm/','/tidb/dev/vector-search-integrate-with-django-orm/','/tidbcloud/vector-search-integrate-with-django-orm/'] --- # Integrate TiDB Vector Search with Django ORM -This tutorial walks you through how to use [Django](https://www.djangoproject.com/) ORM to interact with the [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial walks you through how to use the [Django](https://www.djangoproject.com/) ORM to interact with [TiDB Vector Search](/ai/concepts/vector-search-overview.md), store embeddings, and perform vector search queries. > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -35,26 +21,14 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Run the sample app -You can quickly learn about how to integrate TiDB Vector Search with Django ORM by following the steps below. +You can quickly learn how to integrate TiDB Vector Search with Django ORM by following the steps below. ### Step 1. Clone the repository @@ -90,7 +64,7 @@ pip install Django django-tidb mysqlclient numpy python-dotenv If you encounter installation issues with mysqlclient, refer to the mysqlclient official documentation. -#### What is `django-tidb` +#### What is `django-tidb`? `django-tidb` is a TiDB dialect for Django, which enhances the Django ORM to support TiDB-specific features (for example, Vector Search) and resolves compatibility issues between TiDB and Django. @@ -149,7 +123,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ``` -
+
For a TiDB Self-Managed cluster, create a `.env` file in the root directory of your Python project. Copy the following content into the `.env` file, and modify the environment variable values according to the connection parameters of your TiDB cluster: @@ -257,7 +231,7 @@ Document.objects.create(content="tree", embedding=[1, 0, 0]) ### Search the nearest neighbor documents -TiDB Vector support the following distance functions: +TiDB Vector supports the following distance functions: - `L1Distance` - `L2Distance` @@ -284,5 +258,5 @@ results = Document.objects.annotate( ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-jinaai-embedding.md b/ai/integrations/vector-search-integrate-with-jinaai-embedding.md similarity index 79% rename from vector-search/vector-search-integrate-with-jinaai-embedding.md rename to ai/integrations/vector-search-integrate-with-jinaai-embedding.md index 5f88e16096833..2dafff89ce87f 100644 --- a/vector-search/vector-search-integrate-with-jinaai-embedding.md +++ b/ai/integrations/vector-search-integrate-with-jinaai-embedding.md @@ -1,31 +1,17 @@ --- title: Integrate TiDB Vector Search with Jina AI Embeddings API summary: Learn how to integrate TiDB Vector Search with Jina AI Embeddings API to store embeddings and perform semantic search. +aliases: ['/tidb/stable/vector-search-integrate-with-jinaai-embedding/','/tidb/dev/vector-search-integrate-with-jinaai-embedding/','/tidbcloud/vector-search-integrate-with-jinaai-embedding/'] --- # Integrate TiDB Vector Search with Jina AI Embeddings API -This tutorial walks you through how to use [Jina AI](https://jina.ai/) to generate embeddings for text data, and then store the embeddings in TiDB vector storage and search similar texts based on embeddings. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial walks you through how to use [Jina AI](https://jina.ai/) to generate text embeddings, store them in TiDB, and search for similar text based on embeddings. > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -35,26 +21,14 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Run the sample app -You can quickly learn about how to integrate TiDB Vector Search with JinaAI Embedding by following the steps below. +You can quickly learn how to integrate TiDB Vector Search with Jina AI embeddings by following the steps below. ### Step 1. Clone the repository @@ -126,7 +100,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
For a TiDB Self-Managed cluster, set the environment variables for connecting to your TiDB cluster in your terminal as follows: @@ -278,7 +252,7 @@ with Session(engine) as session: ### Perform semantic search with Jina AI embeddings in TiDB -Generate the embedding for the query text via Jina AI embeddings API, and then search for the most relevant document based on the cosine distance between **the embedding of the query text** and **each embedding in the vector table**: +Generate an embedding for the query text via Jina AI embeddings API, and then search for the most relevant document based on the cosine distance between **the embedding of the query text** and **each embedding in the vector table**: ```python query = 'What is TiDB?' @@ -299,5 +273,5 @@ with Session(engine) as session: ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-langchain.md b/ai/integrations/vector-search-integrate-with-langchain.md similarity index 90% rename from vector-search/vector-search-integrate-with-langchain.md rename to ai/integrations/vector-search-integrate-with-langchain.md index 580ff8f95b6a8..201904fb49fba 100644 --- a/vector-search/vector-search-integrate-with-langchain.md +++ b/ai/integrations/vector-search-integrate-with-langchain.md @@ -1,35 +1,21 @@ --- title: Integrate Vector Search with LangChain summary: Learn how to integrate TiDB Vector Search with LangChain. +aliases: ['/tidb/stable/vector-search-integrate-with-langchain/','/tidb/dev/vector-search-integrate-with-langchain/','/tidbcloud/vector-search-integrate-with-langchain/'] --- # Integrate Vector Search with LangChain -This tutorial demonstrates how to integrate the [vector search](/vector-search/vector-search-overview.md) feature of TiDB with [LangChain](https://python.langchain.com/). - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/vector-search-overview.md) with [LangChain](https://python.langchain.com/). > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). > **Tip** > -> You can view the complete [sample code](https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) on Jupyter Notebook, or run the sample code directly in the [Colab](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) online environment. +> You can view the complete [sample code](https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) in Jupyter Notebook, or run it directly in the [Colab](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) online environment. ## Prerequisites @@ -40,22 +26,10 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Get started @@ -133,7 +107,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
This document uses [OpenAI](https://platform.openai.com/docs/introduction) as the embedding model provider. In this step, you need to provide the connection string obtained from the previous step and your [OpenAI API key](https://platform.openai.com/docs/quickstart/step-2-set-up-your-api-key). @@ -194,7 +168,7 @@ docs = text_splitter.split_documents(documents) ### Step 5. Embed and store document vectors -TiDB vector store supports both cosine distance (`consine`) and Euclidean distance (`l2`) for measuring similarity between vectors. The default strategy is cosine distance. +TiDB vector store supports both cosine distance (`cosine`) and Euclidean distance (`l2`) for measuring similarity between vectors. The default strategy is cosine distance. The following code creates a table named `embedded_documents` in TiDB, which is optimized for vector search. @@ -325,7 +299,7 @@ We’re securing commitments and supporting partners in South and Central Americ ### Use as a retriever -In Langchain, a [retriever](https://python.langchain.com/v0.2/docs/concepts/#retrievers) is an interface that retrieves documents in response to an unstructured query, providing more functionality than a vector store. The following code demonstrates how to use TiDB vector store as a retriever. +In LangChain, a [retriever](https://python.langchain.com/v0.2/docs/concepts/#retrievers) is an interface that retrieves documents for an unstructured query and provides more functionality than a vector store. The following code demonstrates how to use TiDB vector store as a retriever. ```python retriever = vector_store.as_retriever( @@ -618,7 +592,7 @@ Alternatively, you can streamline the entire process using a single SQL query: ```python search_query = f""" SELECT - VEC_Cosine_Distance(se.embedding, :query_vector) as distance, + VEC_COSINE_DISTANCE(se.embedding, :query_vector) as distance, ar.*, se.document as airport_review FROM @@ -658,5 +632,5 @@ The expected output is as follows: ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-llamaindex.md b/ai/integrations/vector-search-integrate-with-llamaindex.md similarity index 82% rename from vector-search/vector-search-integrate-with-llamaindex.md rename to ai/integrations/vector-search-integrate-with-llamaindex.md index 73c4977266a4e..b9a20381b6101 100644 --- a/vector-search/vector-search-integrate-with-llamaindex.md +++ b/ai/integrations/vector-search-integrate-with-llamaindex.md @@ -1,35 +1,21 @@ --- title: Integrate Vector Search with LlamaIndex summary: Learn how to integrate TiDB Vector Search with LlamaIndex. +aliases: ['/tidb/stable/vector-search-integrate-with-llamaindex/','/tidb/dev/vector-search-integrate-with-llamaindex/','/tidbcloud/vector-search-integrate-with-llamaindex/'] --- # Integrate Vector Search with LlamaIndex -This tutorial demonstrates how to integrate the [vector search](/vector-search/vector-search-overview.md) feature of TiDB with [LlamaIndex](https://www.llamaindex.ai). - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/vector-search-overview.md) with [LlamaIndex](https://www.llamaindex.ai). > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). > **Tip** > -> You can view the complete [sample code](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) on Jupyter Notebook, or run the sample code directly in the [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) online environment. +> You can view the complete [sample code](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) in Jupyter Notebook, or run it directly in the [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) online environment. ## Prerequisites @@ -40,22 +26,10 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Get started @@ -132,7 +106,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
This document uses [OpenAI](https://platform.openai.com/docs/introduction) as the embedding model provider. In this step, you need to provide the connection string of your TiDB cluster and your [OpenAI API key](https://platform.openai.com/docs/quickstart/step-2-set-up-your-api-key). @@ -200,7 +174,7 @@ The following code creates a table named `paul_graham_test` in TiDB, which is op ```python tidbvec = TiDBVectorStore( - connection_string=tidb_connection_url, + connection_string=tidb_connection_string, table_name="paul_graham_test", distance_strategy="cosine", vector_dimension=1536, @@ -322,7 +296,7 @@ Delete the first document from the index: tidbvec.delete(documents[0].doc_id) ``` -Check whether the documents had been deleted: +Check whether the documents have been deleted: ```python query_engine = index.as_query_engine() @@ -338,5 +312,5 @@ Empty Response ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-peewee.md b/ai/integrations/vector-search-integrate-with-peewee.md similarity index 77% rename from vector-search/vector-search-integrate-with-peewee.md rename to ai/integrations/vector-search-integrate-with-peewee.md index b19e45cab9229..d30fa1effc5a8 100644 --- a/vector-search/vector-search-integrate-with-peewee.md +++ b/ai/integrations/vector-search-integrate-with-peewee.md @@ -1,31 +1,17 @@ --- title: Integrate TiDB Vector Search with peewee summary: Learn how to integrate TiDB Vector Search with peewee to store embeddings and perform semantic searches. +aliases: ['/tidb/stable/vector-search-integrate-with-peewee/','/tidb/dev/vector-search-integrate-with-peewee/','/tidbcloud/vector-search-integrate-with-peewee/'] --- # Integrate TiDB Vector Search with peewee -This tutorial walks you through how to use [peewee](https://docs.peewee-orm.com/) to interact with the [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial walks you through how to use [peewee](https://docs.peewee-orm.com/) to interact with [TiDB Vector Search](/ai/concepts/vector-search-overview.md), store embeddings, and perform vector search queries. > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -35,26 +21,14 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Run the sample app -You can quickly learn about how to integrate TiDB Vector Search with peewee by following the steps below. +You can quickly learn how to integrate TiDB Vector Search with peewee by following the steps below. ### Step 1. Clone the repository @@ -139,7 +113,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
For a TiDB Self-Managed cluster, create a `.env` file in the root directory of your Python project. Copy the following content into the `.env` file, and modify the environment variable values according to the connection parameters of your TiDB cluster: @@ -194,7 +168,7 @@ You can refer to the following sample code snippets to develop your application. ### Create vector tables -#### Connect to TiDB cluster +#### Connect to a TiDB cluster ```python import os @@ -274,5 +248,5 @@ results = Document.select(Document, distance).where(distance_expression < 0.2).o ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integrate-with-sqlalchemy.md b/ai/integrations/vector-search-integrate-with-sqlalchemy.md similarity index 75% rename from vector-search/vector-search-integrate-with-sqlalchemy.md rename to ai/integrations/vector-search-integrate-with-sqlalchemy.md index 214dcb3232752..0432a3d9b844b 100644 --- a/vector-search/vector-search-integrate-with-sqlalchemy.md +++ b/ai/integrations/vector-search-integrate-with-sqlalchemy.md @@ -1,31 +1,17 @@ --- title: Integrate TiDB Vector Search with SQLAlchemy summary: Learn how to integrate TiDB Vector Search with SQLAlchemy to store embeddings and perform semantic searches. +aliases: ['/tidb/stable/vector-search-integrate-with-sqlalchemy/','/tidb/dev/vector-search-integrate-with-sqlalchemy/','/tidbcloud/vector-search-integrate-with-sqlalchemy/'] --- # Integrate TiDB Vector Search with SQLAlchemy -This tutorial walks you through how to use [SQLAlchemy](https://www.sqlalchemy.org/) to interact with [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +This tutorial walks you through how to use [SQLAlchemy](https://www.sqlalchemy.org/) to interact with [TiDB Vector Search](/ai/concepts/vector-search-overview.md), store embeddings, and perform vector search queries. > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -35,26 +21,14 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Run the sample app -You can quickly learn about how to integrate TiDB Vector Search with SQLAlchemy by following the steps below. +You can quickly learn how to integrate TiDB Vector Search with SQLAlchemy by following the steps below. ### Step 1. Clone the repository @@ -127,7 +101,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
For a TiDB Self-Managed cluster, create a `.env` file in the root directory of your Python project. Copy the following content into the `.env` file, and modify the environment variable values according to the connection parameters of your TiDB cluster: @@ -179,7 +153,7 @@ You can refer to the following sample code snippets to develop your application. ### Create vector tables -#### Connect to TiDB cluster +#### Connect to a TiDB cluster ```python import os @@ -245,5 +219,5 @@ with Session(engine) as session: ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/vector-search/vector-search-integration-overview.md b/ai/integrations/vector-search-integration-overview.md similarity index 62% rename from vector-search/vector-search-integration-overview.md rename to ai/integrations/vector-search-integration-overview.md index 240006a7149cb..5d81d579f6403 100644 --- a/vector-search/vector-search-integration-overview.md +++ b/ai/integrations/vector-search-integration-overview.md @@ -1,31 +1,17 @@ --- title: Vector Search Integration Overview summary: An overview of TiDB vector search integration, including supported AI frameworks, embedding models, and ORM libraries. +aliases: ['/tidb/stable/vector-search-integration-overview/','/tidb/dev/vector-search-integration-overview/','/tidbcloud/vector-search-integration-overview/'] --- # Vector Search Integration Overview This document provides an overview of TiDB vector search integration, including supported AI frameworks, embedding models, and Object Relational Mapping (ORM) libraries. - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## AI frameworks @@ -33,22 +19,22 @@ TiDB provides official support for the following AI frameworks, enabling you to | AI frameworks | Tutorial | |---------------|---------------------------------------------------------------------------------------------------| -| Langchain | [Integrate Vector Search with LangChain](/vector-search/vector-search-integrate-with-langchain.md) | -| LlamaIndex | [Integrate Vector Search with LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) | +| LangChain | [Integrate Vector Search with LangChain](/ai/integrations/vector-search-integrate-with-langchain.md) | +| LlamaIndex | [Integrate Vector Search with LlamaIndex](/ai/integrations/vector-search-integrate-with-llamaindex.md) | -Moreover, you can also use TiDB for various purposes, such as document storage and knowledge graph storage for AI applications. +You can also use TiDB for various tasks such as document storage and knowledge graph storage for AI applications. ## Embedding models and services TiDB Vector Search supports storing vectors of up to 16383 dimensions, which accommodates most embedding models. -You can either use self-deployed open-source embedding models or third-party embedding APIs provided by third-party embedding providers to generate vectors. +You can use either self-deployed open-source embedding models or third-party embedding APIs to generate vectors. The following table lists some mainstream embedding service providers and the corresponding integration tutorials. | Embedding service providers | Tutorial | |-----------------------------|---------------------------------------------------------------------------------------------------------------------| -| Jina AI | [Integrate Vector Search with Jina AI Embeddings API](/vector-search/vector-search-integrate-with-jinaai-embedding.md) | +| Jina AI | [Integrate Vector Search with Jina AI Embeddings API](/ai/integrations/vector-search-integrate-with-jinaai-embedding.md) | ## Object Relational Mapping (ORM) libraries diff --git a/ai/quickstart-via-python.md b/ai/quickstart-via-python.md new file mode 100644 index 0000000000000..eb67172a34c91 --- /dev/null +++ b/ai/quickstart-via-python.md @@ -0,0 +1,233 @@ +--- +title: Get Started with TiDB + AI via Python +summary: Learn how to get started with vector search in TiDB using Python SDK. +aliases: ['/tidb/stable/vector-search-get-started-using-sql/','/tidb/dev/vector-search-get-started-using-sql/','/tidbcloud/vector-search-get-started-using-sql/'] +--- + +# Get Started with TiDB + AI via Python + +In this guide, you will learn how to get started with [vector search](/ai/concepts/vector-search-overview.md) in TiDB using Python SDK. Follow along to build your first AI application working with TiDB. + +## Prerequisites + +- Go to [tidbcloud.com](https://tidbcloud.com/) to create a TiDB Cloud Starter cluster for free or using [tiup playground](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb/#deploy-a-local-test-cluster) to deploy a TiDB Self-Managed cluster for local testing. + +## Installation + +[pytidb](https://github.com/pingcap/pytidb) is the official Python SDK for TiDB, designed to help developers build AI applications efficiently. + +To install the Python SDK, run the following command: + +```bash +pip install pytidb +``` + +To use built-in embedding function, install the `models` extension (alternative): + +```bash +pip install "pytidb[models]" +``` + +## Connect to database + + +
+ +You can get these connection parameters from the [TiDB Cloud console](https://tidbcloud.com/clusters): + +1. Navigate to the [Clusters page](https://tidbcloud.com/clusters), and then click the name of your target cluster to go to its overview page. +2. Click **Connect** in the upper-right corner. A connection dialog is displayed, with connection parameters listed. + +For example, if the connection parameters are displayed as follows: + +```text +HOST: gateway01.us-east-1.prod.shared.aws.tidbcloud.com +PORT: 4000 +USERNAME: 4EfqPF23YKBxaQb.root +PASSWORD: abcd1234 +DATABASE: test +CA: /etc/ssl/cert.pem +``` + +The corresponding Python code to connect to the TiDB Cloud Starter cluster would be as follows: + +```python +from pytidb import TiDBClient + +client = TiDBClient.connect( + host="gateway01.us-east-1.prod.shared.aws.tidbcloud.com", + port=4000, + username="4EfqPF23YKBxaQb.root", + password="abcd1234", + database="test", +) +``` + +> **Note:** +> +> The preceding example is for demonstration purposes only. You need to fill in the parameters with your own values and keep them secure. + +
+
+ +Here is a basic example for connecting to a self-managed TiDB cluster: + +```python +from pytidb import TiDBClient + +client = TiDBClient.connect( + host="localhost", + port=4000, + username="root", + password="", + database="test", + ensure_db=True, +) +``` + +> **Note:** +> +> Make sure to update the connection parameters according to your actual deployment. + +
+
+ +Once connected, you can use the `client` object to operate tables, query data, and more. + +## Create an embedding function + +When working with [embedding models](/ai/concepts/vector-search-overview.md#embedding-model), you can leverage the embedding function to automatically vectorize your data at both insertion and query stages. It natively supports popular embedding models like OpenAI, Jina AI, Hugging Face, Sentence Transformers, and others. + + +
+ +Go to [OpenAI platform](https://platform.openai.com/api-keys) to create your API key for embedding. + +```python +from pytidb.embeddings import EmbeddingFunction + +text_embed = EmbeddingFunction( + model_name="openai/text-embedding-3-small", + api_key="", +) +``` + +
+
+ +Go to [Jina AI](https://jina.ai/embeddings/) to create your API key for embedding. + +```python +from pytidb.embeddings import EmbeddingFunction + +text_embed = EmbeddingFunction( + model_name="jina/jina-embeddings-v3", + api_key="", +) +``` + +
+
+ +## Create a table + +As an example, create a table named `chunks` with the following columns: + +- `id` (int): the ID of the chunk. +- `text` (text): the text content of the chunk. +- `text_vec` (vector): the vector embeddings of the text. +- `user_id` (int): the ID of the user who created the chunk. + +```python hl_lines="6" +from pytidb.schema import TableModel, Field, VectorField + +class Chunk(TableModel): + id: int | None = Field(default=None, primary_key=True) + text: str = Field() + text_vec: list[float] = text_embed.VectorField(source_field="text") + user_id: int = Field() + +table = client.create_table(schema=Chunk, if_exists="overwrite") +``` + +Once created, you can use the `table` object to insert data, search data, and more. + +## Insert Data + +Now let's add some sample data to our table. + +```python +table.bulk_insert([ + # 👇 The text will be automatically embedded and populated into the `text_vec` field. + Chunk(text="PyTiDB is a Python library for developers to connect to TiDB.", user_id=2), + Chunk(text="LlamaIndex is a framework for building AI applications.", user_id=2), + Chunk(text="OpenAI is a company and platform that provides AI models service and tools.", user_id=3), +]) +``` + +## Search for nearest neighbors + +To search for nearest neighbors of a given query, you can use the `table.search()` method. This method performs a [vector search](/ai/guides/vector-search.md) by default. + +```python +table.search( + # 👇 Pass the query text directly, it will be embedded to a query vector automatically. + "A library for my artificial intelligence software" +) +.limit(3).to_list() +``` + +In this example, vector search compares the query vector with the stored vectors in the `text_vec` field of the `chunks` table and returns the top 3 most semantically relevant results based on similarity scores. + +The closer `_distance` means the more similar the two vectors are. + +```json title="Expected output" +[ + { + 'id': 2, + 'text': 'LlamaIndex is a framework for building AI applications.', + 'text_vec': [...], + 'user_id': 2, + '_distance': 0.5719928358786761, + '_score': 0.4280071641213239 + }, + { + 'id': 3, + 'text': 'OpenAI is a company and platform that provides AI models service and tools.', + 'text_vec': [...], + 'user_id': 3, + '_distance': 0.603133726213383, + '_score': 0.396866273786617 + }, + { + 'id': 1, + 'text': 'PyTiDB is a Python library for developers to connect to TiDB.', + 'text_vec': [...], + 'user_id': 2, + '_distance': 0.6202191842385758, + '_score': 0.3797808157614242 + } +] +``` + +## Delete data + +To delete a specific row from the table, you can use the `table.delete()` method: + +```python +table.delete({ + "id": 1 +}) +``` + +## Drop table + +When you no longer need a table, you can drop it using the `client.drop_table()` method: + +```python +client.drop_table("chunks") +``` + +## Next steps + +- Learn more details about [Vector Search](/ai/guides/vector-search.md), [Full-Text Search](/ai/guides/vector-search-full-text-search-python.md) and [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) in TiDB. diff --git a/vector-search/vector-search-get-started-using-sql.md b/ai/quickstart-via-sql.md similarity index 68% rename from vector-search/vector-search-get-started-using-sql.md rename to ai/quickstart-via-sql.md index 94d494f5c83f3..e79d71269269b 100644 --- a/vector-search/vector-search-get-started-using-sql.md +++ b/ai/quickstart-via-sql.md @@ -1,11 +1,12 @@ --- title: Get Started with Vector Search via SQL summary: Learn how to quickly get started with Vector Search in TiDB using SQL statements to power your generative AI applications. +aliases: ['/tidb/stable/vector-search-get-started-using-sql/','/tidb/dev/vector-search-get-started-using-sql/','/tidbcloud/vector-search-get-started-using-sql/'] --- # Get Started with Vector Search via SQL -TiDB extends MySQL syntax to support [Vector Search](/vector-search/vector-search-overview.md) and introduce new [Vector data types](/vector-search/vector-search-data-types.md) and several [vector functions](/vector-search/vector-search-functions-and-operators.md). +TiDB extends MySQL syntax to support [Vector Search](/ai/concepts/vector-search-overview.md) and introduce new [Vector data types](/ai/reference/vector-search-data-types.md) and several [vector functions](/ai/reference/vector-search-functions-and-operators.md). This tutorial demonstrates how to get started with TiDB Vector Search just using SQL statements. You will learn how to use the [MySQL command-line client](https://dev.mysql.com/doc/refman/8.4/en/mysql.html) to complete the following operations: @@ -14,25 +15,10 @@ This tutorial demonstrates how to get started with TiDB Vector Search just using - Store vector embeddings. - Perform vector search queries. - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta and might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -41,22 +27,10 @@ To complete this tutorial, you need: - [MySQL command-line client](https://dev.mysql.com/doc/refman/8.4/en/mysql.html) (MySQL CLI) installed on your machine. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Get started @@ -82,7 +56,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele ```
-
+
After your TiDB Self-Managed cluster is started, execute your cluster connection command in the terminal. @@ -98,7 +72,7 @@ mysql --comments --host 127.0.0.1 --port 4000 -u root ### Step 2. Create a vector table -When creating a table, you can define a column as a [vector](/vector-search/vector-search-overview.md#vector-embedding) column by specifying the `VECTOR` data type. +When creating a table, you can define a column as a [vector](/ai/concepts/vector-search-overview.md#vector-embedding) column by specifying the `VECTOR` data type. For example, to create a table `embedded_documents` with a three-dimensional `VECTOR` column, execute the following SQL statements using your MySQL CLI: @@ -121,7 +95,7 @@ Query OK, 0 rows affected (0.27 sec) ### Step 3. Insert vector embeddings to the table -Insert three documents with their [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding) into the `embedded_documents` table: +Insert three documents with their [vector embeddings](/ai/concepts/vector-search-overview.md#vector-embedding) into the `embedded_documents` table: ```sql INSERT INTO embedded_documents @@ -142,7 +116,7 @@ Records: 3 Duplicates: 0 Warnings: 0 > > This example simplifies the dimensions of the vector embeddings and uses only 3-dimensional vectors for demonstration purposes. > -> In real-world applications, [embedding models](/vector-search/vector-search-overview.md#embedding-model) often produce vector embeddings with hundreds or thousands of dimensions. +> In real-world applications, [embedding models](/ai/concepts/vector-search-overview.md#embedding-model) often produce vector embeddings with hundreds or thousands of dimensions. ### Step 4. Query the vector table @@ -199,5 +173,5 @@ Therefore, according to the output, the swimming animal is most likely a fish, o ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/tidb-cloud/vector-search-changelogs.md b/ai/reference/vector-search-changelogs.md similarity index 91% rename from tidb-cloud/vector-search-changelogs.md rename to ai/reference/vector-search-changelogs.md index 0b550c444a643..44ae1b7bfc11e 100644 --- a/tidb-cloud/vector-search-changelogs.md +++ b/ai/reference/vector-search-changelogs.md @@ -1,6 +1,7 @@ --- title: Vector Search Changelogs summary: Learn about the new features, compatibility changes, improvements, and bug fixes for the TiDB vector search feature. +aliases: ['/tidbcloud/vector-search-changelogs/'] --- # Vector Search Changelogs diff --git a/vector-search/vector-search-data-types.md b/ai/reference/vector-search-data-types.md similarity index 82% rename from vector-search/vector-search-data-types.md rename to ai/reference/vector-search-data-types.md index 208581aa0a4af..16804a0257ea5 100644 --- a/vector-search/vector-search-data-types.md +++ b/ai/reference/vector-search-data-types.md @@ -1,31 +1,17 @@ --- title: Vector Data Types summary: Learn about the Vector data types in TiDB. +aliases: ['/tidb/stable/vector-search-data-types/','/tidb/dev/vector-search-data-types/','/tidbcloud/vector-search-data-types/'] --- # Vector Data Types A vector is a sequence of floating-point numbers, such as `[0.3, 0.5, -0.1, ...]`. TiDB offers Vector data types, specifically optimized for efficiently storing and querying vector embeddings widely used in AI applications. - - -> **Warning:** -> -> This feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> This feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> Vector data types are available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - Vector data types are in beta and might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - Vector data types are available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). The following Vector data types are currently available: @@ -34,7 +20,7 @@ The following Vector data types are currently available: Using vector data types provides the following advantages over using the [`JSON`](/data-type-json.md) type: -- Vector index support: You can build a [vector search index](/vector-search/vector-search-index.md) to speed up vector searching. +- Vector index support: You can build a [vector search index](/ai/reference/vector-search-index.md) to speed up vector searching. - Dimension enforcement: You can specify a dimension to forbid inserting vectors with different dimensions. - Optimized storage format: Vector data types are optimized for handling vector data, offering better space efficiency and performance compared to `JSON` types. @@ -73,9 +59,9 @@ In the following example, because dimension `3` is enforced for the `embedding` ERROR 1105 (HY000): vector has 2 dimensions, does not fit VECTOR(3) ``` -For available functions and operators over the vector data types, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). +For available functions and operators over the vector data types, see [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md). -For more information about building and using a vector search index, see [Vector Search Index](/vector-search/vector-search-index.md). +For more information about building and using a vector search index, see [Vector Search Index](/ai/reference/vector-search-index.md). ## Store vectors with different dimensions @@ -91,11 +77,11 @@ INSERT INTO vector_table VALUES (1, '[0.3, 0.5, -0.1]'); -- 3 dimensions vector, INSERT INTO vector_table VALUES (2, '[0.3, 0.5]'); -- 2 dimensions vector, OK ``` -However, note that you cannot build a [vector search index](/vector-search/vector-search-index.md) for this column, as vector distances can be only calculated between vectors with the same dimensions. +However, note that you cannot build a [vector search index](/ai/reference/vector-search-index.md) for this column, as vector distances can be only calculated between vectors with the same dimensions. ## Comparison -You can compare vector data types using [comparison operators](/functions-and-operators/operators.md) such as `=`, `!=`, `<`, `>`, `<=`, and `>=`. For a complete list of comparison operators and functions for vector data types, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). +You can compare vector data types using [comparison operators](/functions-and-operators/operators.md) such as `=`, `!=`, `<`, `>`, `<=`, and `>=`. For a complete list of comparison operators and functions for vector data types, see [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md). Vector data types are compared element-wise numerically. For example: @@ -239,7 +225,7 @@ You can also explicitly cast a vector to its string representation. Take using t 1 row in set (0.01 sec) ``` -For additional cast functions, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). +For additional cast functions, see [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md). ### Cast between Vector ⇔ other data types @@ -249,7 +235,7 @@ Note that vector data type columns stored in a table cannot be converted to othe ## Restrictions -For restrictions on vector data types, see [Vector search limitations](/vector-search/vector-search-limitations.md) and [Vector index restrictions](/vector-search/vector-search-index.md#restrictions). +For restrictions on vector data types, see [Vector search limitations](/ai/reference/vector-search-limitations.md) and [Vector index restrictions](/ai/reference/vector-search-index.md#restrictions). ## MySQL compatibility @@ -257,6 +243,6 @@ Vector data types are TiDB specific, and are not supported in MySQL. ## See also -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Vector Search Index](/vector-search/vector-search-index.md) -- [Improve Vector Search Performance](/vector-search/vector-search-improve-performance.md) \ No newline at end of file +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) +- [Improve Vector Search Performance](/ai/reference/vector-search-improve-performance.md) diff --git a/vector-search/vector-search-functions-and-operators.md b/ai/reference/vector-search-functions-and-operators.md similarity index 89% rename from vector-search/vector-search-functions-and-operators.md rename to ai/reference/vector-search-functions-and-operators.md index 44fb7cff34d5d..4ecd1e840b88e 100644 --- a/vector-search/vector-search-functions-and-operators.md +++ b/ai/reference/vector-search-functions-and-operators.md @@ -1,39 +1,25 @@ --- title: Vector Functions and Operators summary: Learn about functions and operators available for Vector data types. +aliases: ['/tidb/stable/vector-search-functions-and-operators/','/tidb/dev/vector-search-functions-and-operators/','/tidbcloud/vector-search-functions-and-operators/'] --- # Vector Functions and Operators This document lists the functions and operators available for Vector data types. - - -> **Warning:** -> -> This feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> This feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> Vector data types and these vector functions are available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - Vector functions and operators are in beta and might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - Vector data types and these vector functions are available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Vector functions -The following functions are designed specifically for [Vector data types](/vector-search/vector-search-data-types.md). +The following functions are designed specifically for [Vector data types](/ai/reference/vector-search-data-types.md). **Vector distance functions:** -| Function name | Description | Supported by [vector index](/vector-search/vector-search-index.md#vector-search-index) | +| Function name | Description | Supported by [vector index](/ai/reference/vector-search-index.md) | | ----------------------------------------------------------- | ---------------------------------------------------------------- |---------------------------| | [`VEC_L2_DISTANCE`](#vec_l2_distance) | Calculates L2 distance (Euclidean distance) between two vectors | Yes | | [`VEC_COSINE_DISTANCE`](#vec_cosine_distance) | Calculates the cosine distance between two vectors | Yes | @@ -51,7 +37,7 @@ The following functions are designed specifically for [Vector data types](/vecto ## Extended built-in functions and operators -The following built-in functions and operators are extended to support operations on [Vector data types](/vector-search/vector-search-data-types.md). +The following built-in functions and operators are extended to support operations on [Vector data types](/ai/reference/vector-search-data-types.md). **Arithmetic operators:** @@ -60,7 +46,7 @@ The following built-in functions and operators are extended to support operation | [`+`](https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html#operator_plus) | Vector element-wise addition operator | | [`-`](https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html#operator_minus) | Vector element-wise subtraction operator | -For more information about how vector arithmetic works, see [Vector Data Type | Arithmetic](/vector-search/vector-search-data-types.md#arithmetic). +For more information about how vector arithmetic works, see [Vector Data Type | Arithmetic](/ai/reference/vector-search-data-types.md#arithmetic). **Aggregate (GROUP BY) functions:** @@ -92,7 +78,7 @@ For more information about how vector arithmetic works, see [Vector Data Type | | [`!=`, `<>`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-equal) | Not equal operator | | [`NOT IN()`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-in) | Check whether a value is not within a set of values | -For more information about how vectors are compared, see [Vector Data Type | Comparison](/vector-search/vector-search-data-types.md#comparison). +For more information about how vectors are compared, see [Vector Data Type | Comparison](/ai/reference/vector-search-data-types.md#comparison). **Control flow functions:** @@ -110,7 +96,7 @@ For more information about how vectors are compared, see [Vector Data Type | Com | [`CAST()`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast) | Cast a value as a string or vector | | [`CONVERT()`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_convert) | Cast a value as a string | -For more information about how to use `CAST()`, see [Vector Data Type | Cast](/vector-search/vector-search-data-types.md#cast). +For more information about how to use `CAST()`, see [Vector Data Type | Cast](/ai/reference/vector-search-data-types.md#cast). ## Full references @@ -328,4 +314,4 @@ The vector functions and the extended usage of built-in functions and operators ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) diff --git a/vector-search/vector-search-improve-performance.md b/ai/reference/vector-search-improve-performance.md similarity index 59% rename from vector-search/vector-search-improve-performance.md rename to ai/reference/vector-search-improve-performance.md index 3ccc729b4f69b..324bf44e595fe 100644 --- a/vector-search/vector-search-improve-performance.md +++ b/ai/reference/vector-search-improve-performance.md @@ -1,39 +1,25 @@ --- title: Improve Vector Search Performance summary: Learn best practices for improving the performance of TiDB Vector Search. +aliases: ['/tidb/stable/vector-search-improve-performance/','/tidb/dev/vector-search-improve-performance/','/tidbcloud/vector-search-improve-performance/'] --- # Improve Vector Search Performance TiDB Vector Search enables you to perform Approximate Nearest Neighbor (ANN) queries that search for results similar to an image, document, or other input. To improve the query performance, review the following best practices. - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Add vector search index for vector columns -The [vector search index](/vector-search/vector-search-index.md) dramatically improves the performance of vector search queries, usually by 10x or more, with a trade-off of only a small decrease of recall rate. +The [vector search index](/ai/reference/vector-search-index.md) dramatically improves the performance of vector search queries, usually by 10x or more, with a trade-off of only a small decrease of recall rate. ## Ensure vector indexes are fully built -After you insert a large volume of vector data, some of it might be in the Delta layer waiting for persistence. The vector index for such data will be built after the data is persisted. Until all vector data is indexed, vector search performance is suboptimal. To check the index build progress, see [View index build progress](/vector-search/vector-search-index.md#view-index-build-progress). +After you insert a large volume of vector data, some of the data might be in the Delta layer waiting for persistence. TiDB builds the vector index for such data after the data is persisted. Until all vector data is indexed, vector search performance is suboptimal. To check the index build progress, see [View index build progress](/ai/reference/vector-search-index.md#view-index-build-progress). ## Reduce vector dimensions or shorten embeddings diff --git a/vector-search/vector-search-index.md b/ai/reference/vector-search-index.md similarity index 89% rename from vector-search/vector-search-index.md rename to ai/reference/vector-search-index.md index 5cae74e4a1fb6..0e1b2c0378a58 100644 --- a/vector-search/vector-search-index.md +++ b/ai/reference/vector-search-index.md @@ -1,33 +1,19 @@ --- title: Vector Search Index summary: Learn how to build and use the vector search index to accelerate K-Nearest neighbors (KNN) queries in TiDB. +aliases: ['/tidb/stable/vector-search-index/','/tidb/dev/vector-search-index/','/tidbcloud/vector-search-index/'] --- # Vector Search Index -As described in the [Vector Search](/vector-search/vector-search-overview.md) document, vector search identifies the Top K-Nearest Neighbors (KNN) to a given vector by calculating the distance between the given vector and all vectors stored in the database. While this approach provides accurate results, it can be slow when the table contains a large number of vectors because it involves a full table scan. [^1] +As described in the [Vector Search](/ai/concepts/vector-search-overview.md) document, vector search identifies the Top K-Nearest Neighbors (KNN) to a given vector by calculating the distance between the given vector and all vectors stored in the database. While this approach provides accurate results, it can be slow when the table contains a large number of vectors because it involves a full table scan. [^1] To improve search efficiency, you can create vector search indexes in TiDB for approximate KNN (ANN) search. When using vector indexes for vector search, TiDB can greatly improve query performance with only a slight reduction in accuracy, generally maintaining a search recall rate above 90%. - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). Currently, TiDB supports the [HNSW (Hierarchical Navigable Small World)](https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world) vector search index algorithm. @@ -41,13 +27,13 @@ Currently, TiDB supports the [HNSW (Hierarchical Navigable Small World)](https:/ - Directly dropping columns with vector search indexes is not supported. You can drop such a column by first dropping the vector search index on that column and then dropping the column itself. - Modifying the type of a column with a vector index is not supported. - Setting vector search indexes as [invisible](/sql-statements/sql-statement-alter-index.md) is not supported. -- Building vector search indexes on TiFlash nodes with [encryption at rest](https://docs.pingcap.com/tidb/stable/encryption-at-rest) enabled is not supported. +- Building vector search indexes on TiFlash nodes with [encryption at rest](/encryption-at-rest.md) enabled is not supported. ## Create the HNSW vector index [HNSW](https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world) is one of the most popular vector indexing algorithms. The HNSW index provides good performance with relatively high accuracy, up to 98% in specific cases. -In TiDB, you can create an HNSW index for a column with a [vector data type](/vector-search/vector-search-data-types.md) in either of the following ways: +In TiDB, you can create an HNSW index for a column with a [vector data type](/ai/reference/vector-search-data-types.md) in either of the following ways: - When creating a table, use the following syntax to specify the vector column for the HNSW index: @@ -267,7 +253,7 @@ See [`EXPLAIN`](/sql-statements/sql-statement-explain.md), [`EXPLAIN ANALYZE`](/ ## See also -- [Improve Vector Search Performance](/vector-search/vector-search-improve-performance.md) -- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Improve Vector Search Performance](/ai/reference/vector-search-improve-performance.md) +- [Vector Data Types](/ai/reference/vector-search-data-types.md) [^1]: The explanation of KNN search is adapted from the [Approximate Nearest Neighbor Search Indexes](https://github.com/ClickHouse/ClickHouse/pull/50661/files#diff-7ebd9e71df96e74230c9a7e604fa7cb443be69ba5e23bf733fcecd4cc51b7576) document authored by [rschu1ze](https://github.com/rschu1ze) in ClickHouse documentation, licensed under the Apache License 2.0. diff --git a/ai/reference/vector-search-limitations.md b/ai/reference/vector-search-limitations.md new file mode 100644 index 0000000000000..56b6873318f73 --- /dev/null +++ b/ai/reference/vector-search-limitations.md @@ -0,0 +1,50 @@ +--- +title: Vector Search Limitations +summary: Learn the limitations of the TiDB vector search. +aliases: ['/tidb/stable/vector-search-limitations/','/tidb/dev/vector-search-limitations/','/tidbcloud/vector-search-limitations/'] +--- + +# Vector Search Limitations + +This document describes the known limitations of TiDB vector search. + +> **Note:** +> +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). + +## Vector data type limitations + +- Each [vector](/ai/reference/vector-search-data-types.md) supports up to 16383 dimensions. +- Vector data types cannot store `NaN`, `Infinity`, or `-Infinity` values. +- Vector data types cannot store double-precision floating-point numbers. If you insert or store double-precision floating-point numbers in vector columns, TiDB converts them to single-precision floating-point numbers. +- Vector columns cannot be used as primary keys or as part of a primary key. +- Vector columns cannot be used as unique indexes or as part of a unique index. +- Vector columns cannot be used as partition keys or as part of a partition key. +- Currently, TiDB does not support modifying a vector column to other data types (such as `JSON` and `VARCHAR`). + +## Vector index limitations + +See [Vector search restrictions](/ai/reference/vector-search-index.md#restrictions). + +## Compatibility with TiDB tools + +When using vector search, note the following compatibility issues: + +- TiDB Cloud features: + + - The [Data Migration feature in the TiDB Cloud console](/tidb-cloud/migrate-from-mysql-using-data-migration.md) does not support migrating or replicating MySQL vector data types to TiDB Cloud. + +- TiDB Self-Managed tools: + + - Make sure that you are using v8.4.0 or a later version of [BR](/br/backup-and-restore-overview.md) to back up and restore data. Restoring tables with vector data types to TiDB clusters earlier than v8.4.0 is not supported. + - [TiDB Data Migration (DM)](/dm/dm-overview.md) does not support migrating or replicating MySQL vector data types to TiDB. + - When [TiCDC](/ticdc/ticdc-overview.md) replicates vector data to a downstream that does not support vector data types, it will change the vector data types to another type. For more information, see [Compatibility with vector data types](/ticdc/ticdc-compatibility.md#compatibility-with-vector-data-types). + +## Feedback + +We value your feedback and are always here to help: + +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/vector-search/vector-search-get-started-using-python.md b/ai/vector-search-get-started-using-python.md similarity index 77% rename from vector-search/vector-search-get-started-using-python.md rename to ai/vector-search-get-started-using-python.md index 9c6e6284c2105..df34d7b755107 100644 --- a/vector-search/vector-search-get-started-using-python.md +++ b/ai/vector-search-get-started-using-python.md @@ -1,33 +1,19 @@ --- title: Get Started with TiDB + AI via Python summary: Learn how to quickly develop an AI application that performs semantic search using Python and TiDB Vector Search. +aliases: ['/tidb/stable/vector-search-get-started-using-python/','/tidb/dev/vector-search-get-started-using-python/','/tidbcloud/vector-search-get-started-using-python/'] --- # Get Started with TiDB + AI via Python This tutorial demonstrates how to develop a simple AI application that provides **semantic search** features. Unlike traditional keyword search, semantic search intelligently understands the meaning behind your query and returns the most relevant result. For example, if you have documents titled "dog", "fish", and "tree", and you search for "a swimming animal", the application would identify "fish" as the most relevant result. -Throughout this tutorial, you will develop this AI application using [TiDB Vector Search](/vector-search/vector-search-overview.md), Python, [TiDB Vector SDK for Python](https://github.com/pingcap/tidb-vector-python), and AI models. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - +Throughout this tutorial, you will develop this AI application using [TiDB Vector Search](/ai/concepts/vector-search-overview.md), Python, [TiDB Vector SDK for Python](https://github.com/pingcap/tidb-vector-python), and AI models. > **Note:** > -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). +> - The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. +> - The vector search feature is available on [TiDB Self-Managed](/overview.md), [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter), [{{{ .essential }}}](/tidb-cloud/select-cluster-tier.md#essential), and [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). ## Prerequisites @@ -37,22 +23,10 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads) installed. - A TiDB cluster. - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. -- Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - - - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster of v8.4.0 or a later version. - - +- Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. ## Get started @@ -77,7 +51,7 @@ pip install sqlalchemy pymysql sentence-transformers tidb-vector python-dotenv ``` - `tidb-vector`: the Python client for interacting with TiDB vector search. -- [`sentence-transformers`](https://sbert.net): a Python library that provides pre-trained models for generating [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding) from text. +- [`sentence-transformers`](https://sbert.net): a Python library that provides pre-trained models for generating [vector embeddings](/ai/concepts/vector-search-overview.md#vector-embedding) from text. ### Step 3. Configure the connection string to the TiDB cluster @@ -118,7 +92,7 @@ For a {{{ .starter }}} cluster, take the following steps to obtain the cluster c ```
-
+
For a TiDB Self-Managed cluster, create a `.env` file in the root directory of your Python project. Copy the following content into the `.env` file, and modify the environment variable values according to the connection parameters of your TiDB cluster: @@ -143,7 +117,7 @@ The following are descriptions for each parameter: ### Step 4. Initialize the embedding model -An [embedding model](/vector-search/vector-search-overview.md#embedding-model) transforms data into [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding). This example uses the pre-trained model [**msmarco-MiniLM-L12-cos-v5**](https://huggingface.co/sentence-transformers/msmarco-MiniLM-L12-cos-v5) for text embedding. This lightweight model, provided by the `sentence-transformers` library, transforms text data into 384-dimensional vector embeddings. +An [embedding model](/ai/concepts/vector-search-overview.md#embedding-model) transforms data into [vector embeddings](/ai/concepts/vector-search-overview.md#vector-embedding). This example uses the pre-trained model [**msmarco-MiniLM-L12-cos-v5**](https://huggingface.co/sentence-transformers/msmarco-MiniLM-L12-cos-v5) for text embedding. This lightweight model, provided by the `sentence-transformers` library, transforms text data into 384-dimensional vector embeddings. To set up the model, copy the following code into the `example.py` file. This code initializes a `SentenceTransformer` instance and defines a `text_to_embedding()` function for later use. @@ -255,5 +229,5 @@ Therefore, according to the output, the swimming animal is most likely a fish, o ## See also -- [Vector Data Types](/vector-search/vector-search-data-types.md) -- [Vector Search Index](/vector-search/vector-search-index.md) \ No newline at end of file +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Search Index](/ai/reference/vector-search-index.md) diff --git a/api/_index.md b/api/_index.md new file mode 100644 index 0000000000000..467e43b61e82a --- /dev/null +++ b/api/_index.md @@ -0,0 +1,30 @@ +--- +title: TiDB API Overview +summary: Learn about the APIs available for TiDB Cloud and TiDB Self-Managed. +aliases: ['/tidbcloud/api-overview/'] +--- + +# TiDB API Overview + +TiDB provides various APIs for querying and operating clusters, managing data replication, monitoring system status, and more. This document provides an overview of the available APIs for both [TiDB Cloud](https://docs.pingcap.com/tidbcloud/) and [TiDB Self-Managed](https://docs.pingcap.com/tidb/stable/). + +## TiDB Cloud API (beta) + +[TiDB Cloud API](/api/tidb-cloud-api-overview.md) is a [REST interface](https://en.wikipedia.org/wiki/Representational_state_transfer) that provides you with programmatic access to manage administrative objects within TiDB Cloud, such as projects, clusters, backups, restores, imports, billings, and Data Service resources. + +| API | Description | +| --- | --- | +| [v1beta1](/api/tidb-cloud-api-v1beta1.md) | Manage TiDB Cloud Starter, Essential, and Dedicated clusters, as well as billing, Data Service, and IAM resources. | +| [v1beta](/api/tidb-cloud-api-v1beta.md) | Manage projects, clusters, backups, imports, and restores for TiDB Cloud. | + +## TiDB Self-Managed API + +TiDB Self-Managed provides various APIs for TiDB tools to help you manage cluster components, monitor system status, and control data replication workflows. + +| API | Description | +| --- | --- | +| [TiProxy API](/tiproxy/tiproxy-api.md) | Access TiProxy configuration, health status, and monitoring data. | +| [Data Migration API](/dm/dm-open-api.md) | Manage DM-master and DM-worker nodes, data sources, and data replication tasks. | +| [Monitoring API](/tidb-monitoring-api.md) | Get TiDB server running status, table storage information, and TiKV cluster details. | +| [TiCDC API](/ticdc/ticdc-open-api-v2.md) | Query TiCDC node status and manage replication tasks, including creating, pausing, resuming, and updating operations. | +| [TiDB Operator API]() | Manage TiDB clusters on Kubernetes, including deployment, upgrades, scaling, backup, and failover. | diff --git a/api/dm-api-overview.md b/api/dm-api-overview.md new file mode 100644 index 0000000000000..db3a45dbf4c20 --- /dev/null +++ b/api/dm-api-overview.md @@ -0,0 +1,18 @@ +--- +title: Data Migration API Overview +summary: Learn the API of Data Migration (DM). +--- + +# Data Migration API Overview + +[TiDB Data Migration](/dm/dm-overview.md) (DM) is an integrated data migration task management platform that supports full data migration and incremental data replication from MySQL-compatible databases (such as MySQL, MariaDB, and Aurora MySQL) into TiDB. + +DM provides an OpenAPI for querying and operating the DM cluster, similar to the [dmctl tool](/dm/dmctl-introduction.md). + +You can use DM APIs to perform the following maintenance operations on the DM cluster: + +- [Cluster management](/dm/dm-open-api.md#apis-for-managing-clusters): Get information about or stop DM-master and DM-worker nodes. +- [Data source management](/dm/dm-open-api.md#apis-for-managing-data-sources): Create, update, delete, enable, or disable data sources, manage relay-log features, and change the bindings between your data source and DM-workers. +- [Replication task management](/dm/dm-open-api.md#apis-for-managing-replication-tasks): Create, update, delete, start, or stop replication tasks; manage schemas and migration rules. + +For more information about each API, including request parameters, response examples, and usage instructions, see [Maintain DM Clusters Using OpenAPI](/dm/dm-open-api.md). diff --git a/api/monitoring-api-overview.md b/api/monitoring-api-overview.md new file mode 100644 index 0000000000000..46983fc07730a --- /dev/null +++ b/api/monitoring-api-overview.md @@ -0,0 +1,15 @@ +--- +title: TiDB Monitoring API Overview +summary: Learn the API of TiDB monitoring services. +--- + +# TiDB Monitoring API Overview + +The TiDB monitoring framework uses two open-source projects: [Prometheus](https://prometheus.io) and [Grafana](https://grafana.com/grafana). TiDB uses Prometheus to store monitoring and performance metrics and Grafana to visualize these metrics. TiDB also provides the built-in [TiDB Dashboard](/dashboard/dashboard-intro.md) for monitoring and diagnosing TiDB clusters. + +You can use the following interfaces to monitor TiDB cluster status: + +- [Status interface](/tidb-monitoring-api.md#use-the-status-interface): monitor the [running status](/tidb-monitoring-api.md#running-status) of the current TiDB server and the [storage information](/tidb-monitoring-api.md#storage-information) of a table. +- [Metrics interface](/tidb-monitoring-api.md#use-the-metrics-interface): get detailed information about various operations in components and view these metrics using Grafana. + +For more information about each API, including request parameters, response examples, and usage instructions, see [TiDB Monitoring API](/tidb-monitoring-api.md). diff --git a/api/ticdc-api-overview.md b/api/ticdc-api-overview.md new file mode 100644 index 0000000000000..b25f6e5808e88 --- /dev/null +++ b/api/ticdc-api-overview.md @@ -0,0 +1,19 @@ +--- +title: TiCDC API Overview +summary: Learn the API of TiCDC. +--- + +# TiCDC API Overview + +[TiCDC](/ticdc/ticdc-overview.md) is a tool used to replicate incremental data from TiDB. Specifically, TiCDC pulls TiKV change logs, sorts captured data, and exports row-based incremental data to downstream databases. + +TiCDC provides the following two versions of APIs for querying and operating the TiCDC cluster: + +- [TiCDC OpenAPI v1](/ticdc/ticdc-open-api.md) +- [TiCDC OpenAPI v2](/ticdc/ticdc-open-api-v2.md) + +> **Note:** +> +> TiCDC OpenAPI v1 will be removed in the future. It is recommended to use TiCDC OpenAPI v2. + +For more information about each API, including request parameters, response examples, and usage instructions, see [TiCDC OpenAPI v1](/ticdc/ticdc-open-api.md) and [TiCDC OpenAPI v2](/ticdc/ticdc-open-api-v2.md). \ No newline at end of file diff --git a/api/tidb-cloud-api-overview.md b/api/tidb-cloud-api-overview.md new file mode 100644 index 0000000000000..a143bf587c295 --- /dev/null +++ b/api/tidb-cloud-api-overview.md @@ -0,0 +1,23 @@ +--- +title: TiDB Cloud API Overview +summary: Learn about what TiDB Cloud API is, its features, and how to use the API to manage your TiDB Cloud clusters. +--- + +# TiDB Cloud API Overview + +> **Note:** +> +> TiDB Cloud API is in beta. + +The TiDB Cloud API is a [REST interface](https://en.wikipedia.org/wiki/Representational_state_transfer) that provides you with programmatic access to manage administrative objects within TiDB Cloud. Through this API, you can automatically and efficiently manage resources such as projects, clusters, backups, restores, imports, billings, and resources in the [Data Service](https://docs.pingcap.com/tidbcloud/data-service-overview). + +The API has the following features: + +- **JSON entities.** All entities are expressed in JSON. +- **HTTPS-only.** You can only access the API via HTTPS, ensuring all the data sent over the network is encrypted with TLS. +- **Key-based access and digest authentication.** Before you access the TiDB Cloud API, you must generate an API key. For more information, see [API Key Management](https://docs.pingcap.com/tidbcloud/api/v1beta#section/Authentication/API-key-management). All requests are authenticated through [HTTP Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication), ensuring the API key is never sent over the network. + +The TiDB Cloud API is available in two versions: + +- [v1beta1](/api/tidb-cloud-api-v1beta1.md): manage TiDB Cloud Starter, Essential, and Dedicated clusters, as well as billing, Data Service, and IAM resources. +- [v1beta](/api/tidb-cloud-api-v1beta.md): manage projects, clusters, backups, imports, and restores for TiDB Cloud. diff --git a/api/tidb-cloud-api-v1beta.md b/api/tidb-cloud-api-v1beta.md new file mode 100644 index 0000000000000..7afc9a05aff3e --- /dev/null +++ b/api/tidb-cloud-api-v1beta.md @@ -0,0 +1,16 @@ +--- +title: TiDB Cloud API v1beta Overview +summary: Learn about the v1beta API of TiDB Cloud. +--- + +# TiDB Cloud API v1beta Overview + +The [v1beta API](https://docs.pingcap.com/tidbcloud/api/v1beta) is a RESTful API that gives you programmatic access to manage administrative objects within TiDB Cloud. Through this API, you can automatically and efficiently manage resources such as projects, clusters, backups, restores, and imports. + +Currently, you can use the following v1beta APIs to manage the resources in TiDB Cloud: + +- [Project](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Project) +- [Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Cluster) +- [Backup](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Backup) +- [Import (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Import) +- [Restore](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Restore) \ No newline at end of file diff --git a/api/tidb-cloud-api-v1beta1.md b/api/tidb-cloud-api-v1beta1.md new file mode 100644 index 0000000000000..d852357ec6d57 --- /dev/null +++ b/api/tidb-cloud-api-v1beta1.md @@ -0,0 +1,19 @@ +--- +title: TiDB Cloud API v1beta1 Overview +summary: Learn about the v1beta1 API of TiDB Cloud. +--- + +# TiDB Cloud API v1beta1 Overview + +The TiDB Cloud API v1beta1 is a RESTful API that gives you programmatic access to manage administrative objects within TiDB Cloud. Through this API, you can automatically and efficiently manage cluster-level resources (such as clusters and branches) and organization- or project-level resources (such as billing, Data Service, and IAM). + +Currently, you can use the following v1beta1 APIs to manage the resources in TiDB Cloud: + +- Cluster-level resources: + - [TiDB Cloud Starter or Essential Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta1/serverless): manage clusters, branches, data export tasks, and data import tasks for TiDB Cloud Starter or Essential clusters. + - [TiDB Cloud Dedicated Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta1/dedicated): manage clusters, regions, private endpoint connections, and data import tasks for TiDB Cloud Dedicated clusters. +- Organization or project-level resources: + - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing): manage billing for TiDB Cloud clusters. + - [Data Service](https://docs.pingcap.com/tidbcloud/api/v1beta1/dataservice): manage resources in the Data Service for TiDB Cloud clusters. + - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam): manage API keys for TiDB Cloud clusters. + - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) \ No newline at end of file diff --git a/api/tidb-operator-api-overview.md b/api/tidb-operator-api-overview.md new file mode 100644 index 0000000000000..b136403806986 --- /dev/null +++ b/api/tidb-operator-api-overview.md @@ -0,0 +1,20 @@ +--- +title: TiDB Operator API Overview +summary: Learn the API of TiDB Operator. +--- + +# TiDB Operator API Overview + +[TiDB Operator](https://docs.pingcap.com/tidb-in-kubernetes/stable/) is an automatic operation system for TiDB clusters on Kubernetes. It provides full life-cycle management for TiDB including deployment, upgrades, scaling, backup, failover, and configuration changes. With TiDB Operator, TiDB can run seamlessly in the Kubernetes clusters deployed on a public or private cloud. + +To manage TiDB clusters on Kubernetes, you can use the following TiDB Operator APIs: + +- [Backup]() +- [BackupSchedule]() +- [DMCluster]() +- [Restore]() +- [TidbCluster]() +- [TidbInitializer]() +- [TidbMonitor]() + +For more information, see [TiDB Operator API Document](). diff --git a/api/tiproxy-api-overview.md b/api/tiproxy-api-overview.md new file mode 100644 index 0000000000000..a295a39b6040a --- /dev/null +++ b/api/tiproxy-api-overview.md @@ -0,0 +1,19 @@ +--- +title: TiProxy API Overview +summary: Learn about the API for TiProxy. +--- + +# TiProxy API Overview + +[TiProxy](/tiproxy/tiproxy-overview.md) is the official proxy component of PingCAP. It is placed between the client and the TiDB server to provide load balancing, connection persistence, service discovery, and other features for TiDB. + +TiProxy is an optional component. You can also use a third-party proxy component or connect directly to the TiDB server without using a proxy. + +You can use TiProxy APIs to perform the following operations on the TiProxy cluster: + +- [Get TiProxy configuration](/tiproxy/tiproxy-api.md#get-tiproxy-configuration) +- [Set TiProxy configuration](/tiproxy/tiproxy-api.md#set-tiproxy-configuration) +- [Get TiProxy health status](/tiproxy/tiproxy-api.md#get-tiproxy-health-status) +- [Get TiProxy monitoring data](/tiproxy/tiproxy-api.md#get-tiproxy-monitoring-data) + +For more information about each API, including request parameters, response examples, and usage instructions, see [TiProxy API](/tiproxy/tiproxy-api.md). \ No newline at end of file diff --git a/basic-features.md b/basic-features.md index 74e3ecf4de19d..5d61dae69309c 100644 --- a/basic-features.md +++ b/basic-features.md @@ -27,7 +27,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Date and time types](/data-type-date-and-time.md) | Y | Y | Y | Y | Y | Y | Y | | [String types](/data-type-string.md) | Y | Y | Y | Y | Y | Y | Y | | [JSON type](/data-type-json.md) | Y | Y | Y | Y | Y | E | E | -| [Vector types](/vector-search/vector-search-data-types.md) | E | N | N | N | N | N | N | +| [Vector types](/ai/reference/vector-search-data-types.md) | E | N | N | N | N | N | N | | [Control flow functions](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y | Y | Y | | [String functions](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y | Y | Y | | [Numeric functions and operators](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | @@ -35,7 +35,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Bit functions and operators](/functions-and-operators/bit-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | | [Cast functions and operators](/functions-and-operators/cast-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | | [Encryption and compression functions](/functions-and-operators/encryption-and-compression-functions.md) | Y | Y | Y | Y | Y | Y | Y | -| [Vector functions and operators](/vector-search/vector-search-functions-and-operators.md) | E | N | N | N | N | N | N | +| [Vector functions and operators](/ai/reference/vector-search-functions-and-operators.md) | E | N | N | N | N | N | N | | [Information functions](/functions-and-operators/information-functions.md) | Y | Y | Y | Y | Y | Y | Y | | [JSON functions](/functions-and-operators/json-functions.md) | Y | Y | Y | Y | Y | E | E | | [Aggregation functions](/functions-and-operators/aggregate-group-by-functions.md) | Y | Y | Y | Y | Y | Y | Y | @@ -66,7 +66,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Foreign key](/foreign-key.md) | Y | E | E | E | N | N | N | | [TiFlash late materialization](/tiflash/tiflash-late-materialization.md) | Y | Y | Y | Y | N | N | N | | [Global indexes](/global-indexes.md) | Y | N | N | N | N | N | N | -| [Vector indexes](/vector-search/vector-search-index.md) | E | N | N | N | N | N | N | +| [Vector indexes](/ai/reference/vector-search-index.md) | E | N | N | N | N | N | N | ## SQL statements @@ -97,7 +97,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | Advanced SQL features | 8.5 | 8.1 | 7.5 | 7.1 | 6.5 | 6.1 | 5.4 | |---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| [Vector search](/vector-search/vector-search-overview.md) | E | N | N | N | N | N | N | +| [Vector search](/ai/concepts/vector-search-overview.md) | E | N | N | N | N | N | N | | [Prepared statement cache](/sql-prepared-plan-cache.md) | Y | Y | Y | Y | Y | Y | Y | | [Non-prepared statement cache](/sql-non-prepared-plan-cache.md) | Y | Y | Y | E | N | N | N | | [Instance-level execution plan cache](/system-variables.md#tidb_enable_instance_plan_cache-new-in-v840) | E | N | N | N | N | N | N | diff --git a/best-practices/_index.md b/best-practices/_index.md new file mode 100644 index 0000000000000..19002ec9f2f67 --- /dev/null +++ b/best-practices/_index.md @@ -0,0 +1,58 @@ +--- +title: TiDB Best Practices +summary: Learn the best practices for deploying, configuring, and using TiDB effectively. +--- + +# TiDB Best Practices + +By following best practices for deploying, configuring, and using TiDB, you can optimize the performance, reliability, and scalability of your TiDB deployments. This document provides an overview of the best practices for using TiDB. + +## Overview + +Get started with basic principles and general recommendations for using TiDB effectively. + +| Best practice topic | Description | +| ------------------- | ----------- | +| [Use TiDB](/best-practices/tidb-best-practices.md) | A comprehensive overview of best practices for using TiDB. | + +## Schema design + +Learn best practices for designing schemas in TiDB, including managing DDL operations, choosing primary keys, and designing and maintaining indexes to balance performance, scalability, and maintainability. + +| Best practice topic | Description | +| ------------------- | ----------- | +| [Manage DDL](/best-practices/ddl-introduction.md) | Best practices for managing Data Definition Language (DDL) operations in TiDB. | +| [Use UUIDs as Primary Keys](/best-practices/uuid.md) | Best practices for storing and indexing UUIDs (Universally Unique Identifiers) efficiently when using UUIDs as primary keys. | +| [Optimize Multi-Column Indexes](/best-practices/multi-column-index-best-practices.md) | Best practices for designing and using multi-column indexes in TiDB to improve query performance. | +| [Manage Indexes and Identify Unused Indexes](/best-practices/index-management-best-practices.md) | Best practices for managing and optimizing indexes, identifying and removing unused indexes in TiDB to optimize performance. | + +## Deployment + +Explore recommended deployment patterns for different scenarios, such as deployment on public cloud and multi-data center setups, to ensure high availability and efficient resource usage. + +| Best practice topic | Description | +| ------------------- | ----------- | +| [Deploy TiDB on Public Cloud](/best-practices/best-practices-on-public-cloud.md) | Best practices for deploying TiDB on public cloud to maximize performance, cost efficiency, reliability, and scalability of your TiDB deployment. | +| [Three-Node Hybrid Deployment](/best-practices/three-nodes-hybrid-deployment.md) | Best practices for a cost-effective, hybrid three-node deployment while maintaining stability. | +| [Local Reads in Three-Data-Center Deployments](/best-practices/three-dc-local-read.md) | Best practices for reducing cross-center latency by using Stale Read. | + +## Operations + +Find operational best practices for running TiDB in production, such as traffic routing, load balancing, and monitoring, to ensure system stability and observability. + +| Best practice topic | Description | +| ------------------- | ----------- | +| [Use HAProxy for Load Balancing](/best-practices/haproxy-best-practices.md) | Best practices for configuring HAProxy to distribute application traffic across multiple TiDB nodes. | +| [Use Read-Only Storage Nodes](/best-practices/readonly-nodes.md) | Best practices for using read-only nodes to isolate analytical or heavy read workloads from OLTP traffic. | +| [Monitor TiDB Using Grafana](/best-practices/grafana-monitor-best-practices.md) | Best practices for using key metrics and dashboard configurations for proactive troubleshooting. | + +## Performance tuning + +Understand how to tune TiDB components such as TiKV and PD, and how to use features like read-only storage nodes to improve performance under different workloads. + +| Best practice topic | Description | +| ------------------- | ----------- | +| [Handle Millions of Tables in SaaS Multi-Tenant Scenarios](/best-practices/saas-best-practices.md) | Best practices for using TiDB in SaaS (Software as a Service) multi-tenant environments, especially in scenarios where the number of tables in a single cluster exceeds one million. | +| [Handle High-Concurrency Writes](/best-practices/high-concurrency-best-practices.md) | Best practices for handling high-concurrency write-heavy workloads in TiDB to avoid write hotspots and optimize performance. | +| [Tune TiKV Performance with Massive Regions](/best-practices/massive-regions-best-practices.md) | Best practices for optimizing TiKV performance and reducing heartbeat overhead when managing millions of Regions. | +| [Tune PD Scheduling](/best-practices/pd-scheduling-best-practices.md) | Best practices for adjusting PD policies to balance load and speed up failure recovery. | diff --git a/best-practices-on-public-cloud.md b/best-practices/best-practices-on-public-cloud.md similarity index 98% rename from best-practices-on-public-cloud.md rename to best-practices/best-practices-on-public-cloud.md index c2e429c7e9d69..24654d4ed2e95 100644 --- a/best-practices-on-public-cloud.md +++ b/best-practices/best-practices-on-public-cloud.md @@ -1,9 +1,10 @@ --- title: TiDB Best Practices on Public Cloud summary: Learn about the best practices for deploying TiDB on public cloud. +aliases: ['/tidb/stable/best-practices-on-public-cloud/','/tidb/dev/best-practices-on-public-cloud/'] --- -# TiDB Best Practices on Public Cloud +# Best Practices for Deploying TiDB on Public Cloud Public cloud infrastructure has become an increasingly popular choice for deploying and managing TiDB. However, deploying TiDB on public cloud requires careful consideration of several critical factors, including performance tuning, cost optimization, reliability, and scalability. diff --git a/ddl-introduction.md b/best-practices/ddl-introduction.md similarity index 98% rename from ddl-introduction.md rename to best-practices/ddl-introduction.md index 5a6f252d36fce..9197894a26f2f 100644 --- a/ddl-introduction.md +++ b/best-practices/ddl-introduction.md @@ -1,6 +1,7 @@ --- title: Best Practices for DDL Execution in TiDB summary: Learn about how DDL statements are implemented in TiDB, the online change process, and best practices. +aliases: ['/tidb/stable/ddl-introduction/','/tidb/dev/ddl-introduction/','/tidbcloud/ddl-introduction/'] --- # Best Practices for DDL Execution in TiDB @@ -86,7 +87,7 @@ To improve the user experience of DDL execution, starting from v6.2.0, TiDB enab + DDL statements to be performed on the same table are mutually blocked. + `DROP DATABASE` and DDL statements that affect all objects in the database are mutually blocked. + Adding indexes and column type changes on different tables can be executed concurrently. -+ Starting from v8.2.0, [logical DDL statements](/ddl-introduction.md#types-of-ddl-statements) for different tables can be executed in parallel. ++ Starting from v8.2.0, [logical DDL statements](/best-practices/ddl-introduction.md#types-of-ddl-statements) for different tables can be executed in parallel. + In other cases, DDL can be executed based on the level of availability for concurrent DDL execution. Specifically, TiDB 6.2.0 has enhanced the DDL execution framework in the following aspects: diff --git a/best-practices/grafana-monitor-best-practices.md b/best-practices/grafana-monitor-best-practices.md index 206b1f5334b60..8087cf716afb7 100644 --- a/best-practices/grafana-monitor-best-practices.md +++ b/best-practices/grafana-monitor-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Monitoring TiDB Using Grafana summary: Best Practices for Monitoring TiDB Using Grafana. Deploy a TiDB cluster using TiUP and add Grafana and Prometheus for monitoring. Use metrics to analyze cluster status and diagnose problems. Prometheus collects metrics from TiDB components, and Grafana displays them. Tips for efficient Grafana use include modifying query expressions, switching Y-axis scale, and using API for query results. The platform is powerful for analyzing and diagnosing TiDB cluster status. +aliases: ['/tidb/stable/grafana-monitor-best-practices/','/tidb/dev/grafana-monitor-best-practices/'] --- # Best Practices for Monitoring TiDB Using Grafana diff --git a/best-practices/haproxy-best-practices.md b/best-practices/haproxy-best-practices.md index 372fd469d3094..aa3dc1130f7c5 100644 --- a/best-practices/haproxy-best-practices.md +++ b/best-practices/haproxy-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Using HAProxy in TiDB summary: HAProxy is a free, open-source load balancer and proxy server for TCP and HTTP-based applications. It provides high availability, load balancing, health checks, sticky sessions, SSL support, and monitoring. To deploy HAProxy, ensure hardware and software requirements are met, then install and configure it. Use the latest stable version for best results. +aliases: ['/tidb/stable/haproxy-best-practices/','/tidb/dev/haproxy-best-practices/'] --- # Best Practices for Using HAProxy in TiDB diff --git a/best-practices/high-concurrency-best-practices.md b/best-practices/high-concurrency-best-practices.md index d82ae4f9d8df2..756fec1649713 100644 --- a/best-practices/high-concurrency-best-practices.md +++ b/best-practices/high-concurrency-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for High-Concurrency Writes summary: This document provides best practices for handling highly-concurrent write-heavy workloads in TiDB. It addresses challenges and solutions for data distribution, hotspot cases, and complex hotspot problems. The article also discusses parameter configuration for optimizing performance. +aliases: ['/tidb/stable/high-concurrency-best-practices/','/tidb/dev/high-concurrency-best-practices/'] --- # Best Practices for High-Concurrency Writes diff --git a/best-practices/index-management-best-practices.md b/best-practices/index-management-best-practices.md index 3410ede7fa8ac..48528336537b6 100644 --- a/best-practices/index-management-best-practices.md +++ b/best-practices/index-management-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Managing Indexes and Identifying Unused Indexes summary: Learn the best practices for managing and optimizing indexes, identifying and removing unused indexes in TiDB. +aliases: ['/tidb/stable/index-management-best-practices/','/tidb/dev/index-management-best-practices/'] --- # Best Practices for Managing Indexes and Identifying Unused Indexes diff --git a/best-practices/massive-regions-best-practices.md b/best-practices/massive-regions-best-practices.md index 9b49df0b7e491..62a829515e127 100644 --- a/best-practices/massive-regions-best-practices.md +++ b/best-practices/massive-regions-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Tuning TiKV Performance with Massive Regions summary: TiKV performance tuning involves reducing the number of Regions and messages, increasing Raftstore concurrency, enabling Hibernate Region and Region Merge, adjusting Raft base tick interval, increasing TiKV instances, and adjusting Region size. Other issues include slow PD leader switching and outdated PD routing information. +aliases: ['/tidb/stable/massive-regions-best-practices/','/tidb/dev/massive-regions-best-practices/'] --- # Best Practices for Tuning TiKV Performance with Massive Regions diff --git a/best-practices/multi-column-index-best-practices.md b/best-practices/multi-column-index-best-practices.md index c6a7dfe757749..59906be563d38 100644 --- a/best-practices/multi-column-index-best-practices.md +++ b/best-practices/multi-column-index-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Optimizing Multi-Column Indexes summary: Learn how to use multi-column indexes effectively in TiDB and apply advanced optimization techniques. +aliases: ['/tidb/stable/multi-column-index-best-practices/','/tidb/dev/multi-column-index-best-practices/'] --- # Best Practices for Optimizing Multi-Column Indexes diff --git a/best-practices/pd-scheduling-best-practices.md b/best-practices/pd-scheduling-best-practices.md index b81bd3217d9ba..6f0234f444d14 100644 --- a/best-practices/pd-scheduling-best-practices.md +++ b/best-practices/pd-scheduling-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for PD Scheduling -summary: This document summarizes PD scheduling best practices, including scheduling process, load balancing, hot regions scheduling, cluster topology awareness, scale-down and failure recovery, region merge, query scheduling status, and control scheduling strategy. It also covers common scenarios such as uneven distribution of leaders/regions, slow node recovery, and troubleshooting TiKV nodes. +summary: This document summarizes PD scheduling best practices, including scheduling process, load balancing, hot regions scheduling, cluster topology awareness, scale-in and failure recovery, region merge, query scheduling status, and control scheduling strategy. It also covers common scenarios such as uneven distribution of leaders/regions, slow node recovery, and troubleshooting TiKV nodes. +aliases: ['/tidb/stable/pd-scheduling-best-practices/','/tidb/dev/pd-scheduling-best-practices/'] --- # Best Practices for PD Scheduling @@ -91,11 +92,11 @@ Cluster topology awareness enables PD to distribute replicas of a region as much The component to check region distribution is `replicaChecker`, which is similar to a scheduler except that it cannot be disabled. `replicaChecker` schedules based on the configuration of `location-labels`. For example, `[zone,rack,host]` defines a three-tier topology for a cluster. PD attempts to schedule region peers to different zones first, or to different racks when zones are insufficient (for example, 2 zones for 3 replicas), or to different hosts when racks are insufficient. -### Scale-down and failure recovery +### Scale-in and failure recovery -Scale-down refers to the process when you take a store offline and mark it as "offline" using a command. PD replicates the regions on the offline node to other nodes by scheduling. Failure recovery applies when stores failed and cannot be recovered. In this case, regions with peers distributed on the corresponding store might lose replicas, which requires PD to replenish on other nodes. +Scale-in refers to the process when you take a store offline and mark it as "offline" using a command. PD replicates the regions on the offline node to other nodes by scheduling. Failure recovery applies when stores failed and cannot be recovered. In this case, regions with peers distributed on the corresponding store might lose replicas, which requires PD to replenish on other nodes. -The processes of scale-down and failure recovery are basically the same. `replicaChecker` finds a region peer in abnormal states, and then generates an operator to replace the abnormal peer with a new one on a healthy store. +The processes of scale-in and failure recovery are basically the same. `replicaChecker` finds a region peer in abnormal states, and then generates an operator to replace the abnormal peer with a new one on a healthy store. ### Region merge diff --git a/best-practices/readonly-nodes.md b/best-practices/readonly-nodes.md index 80faadb4da59f..acfe4fbf66254 100644 --- a/best-practices/readonly-nodes.md +++ b/best-practices/readonly-nodes.md @@ -1,6 +1,7 @@ --- title: Best Practices for Read-Only Storage Nodes summary: This document introduces configuring read-only storage nodes for isolating high-tolerance delay loads from online services. Steps include marking TiKV nodes as read-only, using Placement Rules to store data on read-only nodes as learners, and using Follower Read to read data from read-only nodes. +aliases: ['/tidb/stable/readonly-nodes/','/tidb/dev/readonly-nodes/'] --- # Best Practices for Read-Only Storage Nodes diff --git a/best-practices/saas-best-practices.md b/best-practices/saas-best-practices.md index e40f8adede725..3bb6cc6702bc2 100644 --- a/best-practices/saas-best-practices.md +++ b/best-practices/saas-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Handling Millions of Tables in SaaS Multi-Tenant Scenarios summary: Learn best practices for TiDB in SaaS (Software as a Service) multi-tenant scenarios, especially for environments where the number of tables in a single cluster exceeds one million. +aliases: ['/tidb/stable/saas-best-practices/','/tidb/dev/saas-best-practices/'] --- # Best Practices for Handling Millions of Tables in SaaS Multi-Tenant Scenarios diff --git a/best-practices/three-dc-local-read.md b/best-practices/three-dc-local-read.md index 7f0c2e4c9a2dd..afbf697d0dcf1 100644 --- a/best-practices/three-dc-local-read.md +++ b/best-practices/three-dc-local-read.md @@ -1,6 +1,7 @@ --- title: Best Practices for Local Reads in Three-Data-Center Deployments summary: TiDB's three data center deployment model can cause increased access latency due to cross-center data reads. To mitigate this, the Stale Read feature allows for local historical data access, reducing latency at the expense of real-time data availability. When using Stale Read in geo-distributed scenarios, TiDB accesses local replicas to avoid cross-center network latency. This is achieved by configuring the `zone` label and setting `tidb_replica_read` to `closest-replicas`. For more information on performing Stale Read, refer to the documentation. +aliases: ['/tidb/stable/three-dc-local-read/','/tidb/dev/three-dc-local-read/'] --- # Best Practices for Local Reads in Three-Data-Center Deployments diff --git a/best-practices/three-nodes-hybrid-deployment.md b/best-practices/three-nodes-hybrid-deployment.md index 52794404ba6d0..ca13fc6c9ec02 100644 --- a/best-practices/three-nodes-hybrid-deployment.md +++ b/best-practices/three-nodes-hybrid-deployment.md @@ -1,6 +1,7 @@ --- title: Best Practices for Three-Node Hybrid Deployment summary: TiDB cluster can be deployed in a cost-effective way on three machines. Best practices for this hybrid deployment include adjusting parameters for stability and performance. Limiting resource consumption and adjusting thread pool sizes are key to optimizing the cluster. Adjusting parameters for TiKV background tasks and TiDB execution operators is also important. +aliases: ['/tidb/stable/three-nodes-hybrid-deployment/','/tidb/dev/three-nodes-hybrid-deployment/'] --- # Best Practices for Three-Node Hybrid Deployment diff --git a/best-practices/tidb-best-practices.md b/best-practices/tidb-best-practices.md index b07d1a184d6c9..ac45c8e6750ab 100644 --- a/best-practices/tidb-best-practices.md +++ b/best-practices/tidb-best-practices.md @@ -1,6 +1,7 @@ --- title: TiDB Best Practices summary: This document summarizes best practices for using TiDB, covering SQL use and optimization tips for OLAP and OLTP scenarios, with a focus on TiDB-specific optimization options. It also recommends reading three blog posts introducing TiDB's technical principles before diving into the best practices. +aliases: ['/tidb/stable/tidb-best-practices/','/tidb/dev/tidb-best-practices/'] --- # TiDB Best Practices diff --git a/best-practices/uuid.md b/best-practices/uuid.md index 36d77654a6392..7ecb611b2ea86 100644 --- a/best-practices/uuid.md +++ b/best-practices/uuid.md @@ -1,6 +1,7 @@ --- title: Best Practices for Using UUIDs as Primary Keys summary: UUIDs, when used as primary keys, offer benefits such as reduced network trips, support in most programming languages and databases, and protection against enumeration attacks. Storing UUIDs as binary in a `BINARY(16)` column is recommended. It's also advised to avoid setting the `swap_flag` with TiDB to prevent hotspots. MySQL compatibility is available for UUIDs. +aliases: ['/tidb/stable/uuid/','/tidb/dev/uuid/','/tidbcloud/uuid/'] --- # Best Practices for Using UUIDs as Primary Keys @@ -27,33 +28,13 @@ The textual UUID format looks like this: `ab06f63e-8fe7-11ec-a514-5405db7aad56`, The `UUID_TO_BIN()` function can be used with one argument, the UUID or with two arguments where the second argument is a `swap_flag`. - - It is recommended to not set the `swap_flag` with TiDB to avoid [hotspots](/best-practices/high-concurrency-best-practices.md). - - - - -It is recommended to not set the `swap_flag` with TiDB to avoid hotspots. - - - You can also explicitly set the [`CLUSTERED` option](/clustered-indexes.md) for UUID based primary keys to avoid hotspots. To demonstrate the effect of the `swap_flag`, here are two tables with an identical structure. The difference is that the data inserted into `uuid_demo_1` uses `UUID_TO_BIN(?, 0)` and `uuid_demo_2` uses `UUID_TO_BIN(?, 1)`. - - -In the screenshot of the [Key Visualizer](/dashboard/dashboard-key-visualizer.md) below, you can see that writes are concentrated in a single region of the `uuid_demo_2` table that has the order of the fields swapped in the binary format. - - - - - -In the screenshot of the [Key Visualizer](/tidb-cloud/tune-performance.md#key-visualizer) below, you can see that writes are concentrated in a single region of the `uuid_demo_2` table that has the order of the fields swapped in the binary format. - - +In the screenshot of the Key Visualizer below, you can see that writes are concentrated in a single region of the `uuid_demo_2` table that has the order of the fields swapped in the binary format. ![Key Visualizer](/media/best-practices/uuid_keyviz.png) @@ -73,6 +54,12 @@ CREATE TABLE `uuid_demo_2` ( ) ``` +For more information about Key Visualizer, see the following documentation: + +- [Key Visualizer](/dashboard/dashboard-key-visualizer.md) for TiDB Self-Managed +- [Key Visualizer](/tidb-cloud/tune-performance.md#key-visualizer) for TiDB Cloud + + ## MySQL compatibility UUIDs can be used in MySQL as well. The `BIN_TO_UUID()` and `UUID_TO_BIN()` functions were introduced in MySQL 8.0. The `UUID()` function is available in earlier MySQL versions as well. diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index e5f38b3effc68..94a25e503e489 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -116,7 +116,7 @@ Backup and restore might go wrong when some TiDB features are enabled or disable | Global temporary tables | | Make sure that you are using v5.3.0 or a later version of BR to back up and restore data. Otherwise, an error occurs in the definition of the backed global temporary tables. | | TiDB Lightning Physical Import| | If the upstream database uses the physical import mode of TiDB Lightning, data cannot be backed up in log backup. It is recommended to perform a full backup after the data import. For more information, see [When the upstream database imports data using TiDB Lightning in the physical import mode, the log backup feature becomes unavailable. Why?](/faq/backup-and-restore-faq.md#when-the-upstream-database-imports-data-using-tidb-lightning-in-the-physical-import-mode-the-log-backup-feature-becomes-unavailable-why).| | TiCDC | | BR v8.2.0 and later: if the target cluster to be restored has a changefeed and the changefeed [CheckpointTS](/ticdc/ticdc-classic-architecture.md#checkpointts) is earlier than the BackupTS, BR does not perform the restoration. BR versions before v8.2.0: if the target cluster to be restored has any active TiCDC changefeeds, BR does not perform the restoration. | -| Vector search | | Make sure that you are using v8.4.0 or a later version of BR to back up and restore data. Restoring tables with [vector data types](/vector-search/vector-search-data-types.md) to TiDB clusters earlier than v8.4.0 is not supported. | +| Vector search | | Make sure that you are using v8.4.0 or a later version of BR to back up and restore data. Restoring tables with [vector data types](/ai/reference/vector-search-data-types.md) to TiDB clusters earlier than v8.4.0 is not supported. | ### Version compatibility diff --git a/data-type-default-values.md b/data-type-default-values.md index 03aff3b387925..367d8bb92ec16 100644 --- a/data-type-default-values.md +++ b/data-type-default-values.md @@ -50,7 +50,7 @@ TiDB supports specifying the following expressions as default values in the `DEF * [`NEXTVAL()`](/functions-and-operators/sequence-functions.md#nextval) * [`RAND()`](/functions-and-operators/numeric-functions-and-operators.md) * [`UUID()`](/functions-and-operators/miscellaneous-functions.md#uuid), [`UUID_TO_BIN()`](/functions-and-operators/miscellaneous-functions.md#uuid_to_bin) -* [`VEC_FROM_TEXT()`](/vector-search/vector-search-functions-and-operators.md#vec_from_text) +* [`VEC_FROM_TEXT()`](/ai/reference/vector-search-functions-and-operators.md#vec_from_text) TiDB supports assigning default values to `BLOB`, `TEXT`, and `JSON` data types. However, you can only use expressions, not literals, to define default values for these data types. The following is an example of `BLOB`: diff --git a/develop/_index.md b/develop/_index.md new file mode 100644 index 0000000000000..4ccb169998d2f --- /dev/null +++ b/develop/_index.md @@ -0,0 +1,184 @@ +--- +title: Developer Guide Overview +summary: Introduce the overview of the developer guide for TiDB Cloud and TiDB Self-Managed. +aliases: ['/tidb/stable/dev-guide-overview/','/tidb/dev/dev-guide-overview/','/tidbcloud/dev-guide-overview/'] +--- + +# Developer Guide Overview + +[TiDB](https://github.com/pingcap/tidb) is an open-source distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. + +This guide helps application developers quickly learn how to connect to TiDB, design databases, write and query data, and build reliable, high-performance applications on TiDB. + +Whether you are new to TiDB or migrating an existing MySQL-based application, this guide provides practical, step-by-step instructions and best practices to help you get productive quickly. + +> **Note:** +> +> This guide is written for application developers, but if you are interested in the inner workings of TiDB or want to get involved in TiDB development, read the [TiDB Kernel Development Guide](https://pingcap.github.io/tidb-dev-guide/) for more information about TiDB. + +## Guides by language and framework + +Build your application with the language you use by following the guides with sample codes. + + + + +Connect to TiDB over HTTPS from edge environments. + + + + +Connect Next.js with mysql2 to TiDB. + + + + +Connect to TiDB with Prisma ORM. + + + + +Connect to TiDB with TypeORM. + + + + +Connect to TiDB with Sequelize ORM. + + + + +Connect Node.js with mysql.js module to TiDB. + + + + +Connect Node.js with node-mysql2 module to TiDB. + + + + +Connect AWS Lambda Function with mysql2 to TiDB. + + + + + + + +Connect Django application with django-tidb to TiDB. + + + + +Connect to TiDB with the official MySQL package. + + + + +Connect to TiDB with PyMySQL package. + + + + +Connect to TiDB with mysqlclient package. + + + + +Connect to TiDB with SQLAlchemy ORM. + + + + +Connect to TiDB with Peewee ORM. + + + + + + + +Connect to TiDB with JDBC (MySQL Connector/J). + + + + +Connect to TiDB with MyBatis ORM. + + + + +Connect to TiDB with Hibernate ORM. + + + + +Connect Spring based application with Spring Data JPA to TiDB. + + + + + + + +Connect to TiDB with MySQL driver for Go. + + + + +Connect to TiDB with GORM. + + + + + + + +Connect Ruby on Rails application with Active Record ORM to TiDB. + + + + +Connect to TiDB with mysql2 driver. + + + + +In addition to these guides, PingCAP works with the community to support [third-party MySQL drivers, ORMs, and tools](/develop/dev-guide-third-party-support.md). + +## Use MySQL client software + +As TiDB is a MySQL-compatible database, you can use many familiar client software tools to connect to TiDB and manage your databases. Or, you can use our command line tool to connect and manage your databases. + + + + +Connect and manage TiDB databases with MySQL Workbench. + + + + +Connect and manage TiDB databases with the SQLTools extension in VS Code. + + + + +Connect and manage TiDB databases with DBeaver. + + + + +Connect and manage TiDB databases with DataGrip by JetBrains. + + + + +## Additional resources + +Learn other topics about developing with TiDB. + +- Use TiDB Cloud CLI to develop, manage and deploy your applications. +- Explore popular service integrations with TiDB Cloud. +- Follow [TiDB database development reference](/develop/dev-guide-schema-design-overview.md) to design, interact with, optimize, and troubleshoot your data and schema. +- Follow the free online course [Introduction to TiDB](https://eng.edu.pingcap.com/catalog/info/id:203/?utm_source=docs-dev-guide). diff --git a/develop/dev-guide-aws-appflow-integration.md b/develop/dev-guide-aws-appflow-integration.md index 0068b66d24646..a826da95e3a69 100644 --- a/develop/dev-guide-aws-appflow-integration.md +++ b/develop/dev-guide-aws-appflow-integration.md @@ -1,6 +1,7 @@ --- title: Integrate TiDB with Amazon AppFlow summary: Introduce how to integrate TiDB with Amazon AppFlow step by step. +aliases: ['/tidb/stable/dev-guide-aws-appflow-integration/','/tidb/dev/dev-guide-aws-appflow-integration/','/tidbcloud/dev-guide-aws-appflow-integration/'] --- # Integrate TiDB with Amazon AppFlow @@ -249,14 +250,6 @@ test> SELECT * FROM sf_account; ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-bookshop-schema-design.md b/develop/dev-guide-bookshop-schema-design.md index b4b4000cbb682..3058b6b6cd833 100644 --- a/develop/dev-guide-bookshop-schema-design.md +++ b/develop/dev-guide-bookshop-schema-design.md @@ -1,6 +1,7 @@ --- title: Bookshop Example Application summary: Bookshop is an online bookstore app for buying and rating books. You can import table structures and data via TiUP or TiDB Cloud. Method 1 uses TiUP to quickly generate and import sample data, while Method 2 imports data from Amazon S3 to TiDB Cloud. The database tables include books, authors, users, ratings, book_authors, and orders. The database initialization script `dbinit.sql` creates the table structures for the Bookshop application. +aliases: ['/tidb/stable/dev-guide-bookshop-schema-design/','/tidb/dev/dev-guide-bookshop-schema-design/','/tidbcloud/dev-guide-bookshop-schema-design/'] --- # Bookshop Example Application @@ -11,32 +12,15 @@ To make your reading on the application developer guide more smoothly, we presen ## Import table structures and data - +To import table structures and data of the Bookshop application, choose one of the following import methods: -You can import Bookshop table structures and data either [via TiUP](#method-1-via-tiup-demo) or [via the import feature of TiDB Cloud](#method-2-via-tidb-cloud-import). +- [TiDB Self-Managed: via `tiup demo`](#tidb-self-managed-via-tiup-demo). +- [TiDB Cloud: via the Import feature](#tidb-cloud-via-the-import-feature). - - - - -For TiDB Cloud, you can skip [Method 1: Via `tiup demo`](#method-1-via-tiup-demo) and import Bookshop table structures [via the import feature of TiDB Cloud](#method-2-via-tidb-cloud-import). - - - -### Method 1: Via `tiup demo` - - +### TiDB Self-Managed: via `tiup demo` If your TiDB cluster is deployed using [TiUP](/tiup/tiup-reference.md#tiup-reference) or you can connect to your TiDB server, you can quickly generate and import sample data for the Bookshop application by running the following command: - - - - -If your TiDB cluster is deployed using [TiUP](https://docs.pingcap.com/tidb/stable/tiup-reference) or you can connect to your TiDB server, you can quickly generate and import sample data for the Bookshop application by running the following command: - - - ```shell tiup demo bookshop prepare ``` @@ -87,7 +71,7 @@ tiup demo bookshop prepare --users=200000 --books=500000 --authors=100000 --rati You can delete the original table structure through the `--drop-tables` parameter. For more parameter descriptions, run the `tiup demo bookshop --help` command. -### Method 2: Via TiDB Cloud Import +### TiDB Cloud: via the Import feature 1. Open the **Import** page for your target cluster. @@ -293,14 +277,6 @@ CREATE TABLE `bookshop`.`orders` ( ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-build-cluster-in-cloud.md b/develop/dev-guide-build-cluster-in-cloud.md index 18084ab8c28bb..d4f98b7415855 100644 --- a/develop/dev-guide-build-cluster-in-cloud.md +++ b/develop/dev-guide-build-cluster-in-cloud.md @@ -1,26 +1,17 @@ --- -title: Build a {{{ .starter }}} Cluster -summary: Learn how to build a {{{ .starter }}} cluster in TiDB Cloud and connect to it. +title: Create a {{{ .starter }}} Cluster +summary: Learn how to create a {{{ .starter }}} cluster and connect to it. +aliases: ['/tidb/stable/dev-guide-build-cluster-in-cloud/','/tidb/dev/dev-guide-build-cluster-in-cloud/','/tidbcloud/dev-guide-build-cluster-in-cloud/'] --- -# Build a {{{ .starter }}} Cluster - - +# Create a {{{ .starter }}} Cluster This document walks you through the quickest way to get started with TiDB. You will use [TiDB Cloud](https://www.pingcap.com/tidb-cloud) to create a {{{ .starter }}} cluster, connect to it, and run a sample application on it. If you need to run TiDB on your local machine, see [Starting TiDB Locally](/quick-start-with-tidb.md). - - - - -This document walks you through the quickest way to get started with TiDB Cloud. You will create a TiDB cluster, connect to it, and run a sample application on it. - - - ## Step 1. Create a {{{ .starter }}} cluster {#step-1-create-a-tidb-cloud-cluster} 1. If you do not have a TiDB Cloud account, click [here](https://tidbcloud.com/free-trial) to sign up for an account. @@ -41,22 +32,10 @@ This document walks you through the quickest way to get started with TiDB Cloud. 8. Click **Generate Password** to generate a random password. The generated password will not show again, so save your password in a secure location. If you do not set a root password, you cannot connect to the cluster. - - > **Note:** > > For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) clusters, when you connect to your cluster, you must include the prefix for your cluster in the user name and wrap the name with quotation marks. For more information, see [User name prefix](https://docs.pingcap.com/tidbcloud/select-cluster-tier#user-name-prefix). - - - - -> **Note:** -> -> For [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter) clusters, when you connect to your cluster, you must include the prefix for your cluster in the user name and wrap the name with quotation marks. For more information, see [User name prefix](/tidb-cloud/select-cluster-tier.md#user-name-prefix). - - - ## Step 2. Connect to a cluster 1. If the MySQL client is not installed, select your operating system and follow the steps below to install it. @@ -138,24 +117,11 @@ mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1 mysql --connect-timeout 15 -u '.root' -h -P 4000 -D test --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/cert.pem -p ``` - - > **Note:** > > - When you connect to a {{{ .starter }}} cluster, you must [use the TLS connection](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters). > - If you encounter problems when connecting to a {{{ .starter }}} cluster, you can read [Secure Connections to {{{ .starter }}} Clusters](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-clusters) for more information. - - - - -> **Note:** -> -> - When you connect to a {{{ .starter }}} cluster, you must [use the TLS connection](/tidb-cloud/secure-connections-to-serverless-clusters.md). -> - If you encounter problems when connecting to a {{{ .starter }}} cluster, you can read [Secure Connections to {{{ .starter }}} Clusters](/tidb-cloud/secure-connections-to-serverless-clusters.md) for more information. - - - 3. Fill in the password to sign in. ## Step 3. Execute a SQL statement @@ -180,14 +146,6 @@ If your actual output is similar to the expected output, congratulations, you ha ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-choose-driver-or-orm.md b/develop/dev-guide-choose-driver-or-orm.md index c57d0ece19d83..716c872243b35 100644 --- a/develop/dev-guide-choose-driver-or-orm.md +++ b/develop/dev-guide-choose-driver-or-orm.md @@ -1,9 +1,10 @@ --- -title: Choose Driver or ORM +title: Choose a Driver or ORM summary: Learn how to choose a driver or ORM framework to connect to TiDB. +aliases: ['/tidb/stable/dev-guide-choose-driver-or-orm/','/tidb/dev/dev-guide-choose-driver-or-orm/','/tidbcloud/dev-guide-choose-driver-or-orm/'] --- -# Choose Driver or ORM +# Choose a Driver or ORM > **Note:** > @@ -302,22 +303,8 @@ For an example of using peewee to build a TiDB application, see [Connect to TiDB
- - -After you have determined the driver or ORM, you can [connect to your TiDB cluster](https://docs.pingcap.com/tidbcloud/connect-to-tidb-cluster). - - - ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-connect-to-tidb.md b/develop/dev-guide-connect-to-tidb.md index 5fc0cf7d6de4b..c28d37a0caa3b 100644 --- a/develop/dev-guide-connect-to-tidb.md +++ b/develop/dev-guide-connect-to-tidb.md @@ -1,155 +1,29 @@ --- title: Connect to TiDB -summary: Learn how to connect to TiDB. +summary: An overview of methods to connect to TiDB. +aliases: ['/tidb/stable/dev-guide-connect-to-tidb/','/tidb/dev/dev-guide-connect-to-tidb/'] --- # Connect to TiDB -TiDB is highly compatible with the MySQL protocol. For a full list of client link parameters, see [MySQL Client Options](https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html). +TiDB is highly compatible with the MySQL protocol, so you can connect to it using most MySQL tools, drivers, and ORMs. -TiDB supports the [MySQL Client/Server Protocol](https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_PROTOCOL.html), which allows most client drivers and ORM frameworks to connect to TiDB just as they connect to MySQL. +- To execute SQL manually (for connectivity testing, debugging, or quick verification), start with [MySQL CLI tools](/develop/dev-guide-mysql-tools.md). -## MySQL +- To connect using a visual interface, refer to the documents of the following popular GUI tools: -You can choose to use MySQL Client or MySQL Shell based on your personal preferences. + - [JetBrains DataGrip](/develop/dev-guide-gui-datagrip.md) + - [DBeaver](/develop/dev-guide-gui-dbeaver.md) + - [VS Code](/develop/dev-guide-gui-vscode-sqltools.md) + - [MySQL Workbench](/develop/dev-guide-gui-mysql-workbench.md) + - [Navicat](/develop/dev-guide-gui-navicat.md) - +- To build applications on TiDB, [choose a driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) based on your programming language and framework. -
- -You can connect to TiDB using MySQL Client, which can be used as a command-line tool for TiDB. To install MySQL Client, follow the instructions below for YUM based Linux distributions. - -```shell -sudo yum install mysql -``` - -After the installation, you can connect to TiDB using the following command: - -```shell -mysql --host --port 4000 -u root -p --comments -``` - -The MySQL v9.0 client on macOS cannot correctly load the `mysql_native_password` plugin, causing the error `ERROR 2059 (HY000): Authentication plugin 'mysql_native_password' cannot be loaded` when connecting to TiDB. To address this issue, it is recommended to install and use the MySQL v8.0 client to connect to TiDB. Run the following commands to install it: - -```shell -brew install mysql-client@8.0 -brew unlink mysql -brew link mysql-client@8.0 -``` - -If you still encounter errors, you can specify the installation path of the MySQL v8.0 client to connect to TiDB. Run the following command: - -```shell -/opt/homebrew/opt/mysql-client@8.0/bin/mysql --comments --host ${YOUR_IP_ADDRESS} --port ${YOUR_PORT_NUMBER} -u ${your_user_name} -p -``` - -Replace `/opt/homebrew/opt/mysql-client@8.0/bin/mysql` in the preceding command with the installation path of the MySQL v8.0 client in your actual environment. - -
- -
- -You can connect to TiDB using MySQL Shell, which can be used as a command-line tool for TiDB. To install MySQL Shell, follow the instructions in the [MySQL Shell documentation](https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html). After the installation, you can connect to TiDB using the following command: - -```shell -mysqlsh --sql mysql://root@:4000 -``` - -
- -
- -## JDBC - -You can connect to TiDB using the [JDBC](https://dev.mysql.com/doc/connector-j/en/) driver. To do that, you need to create a `MysqlDataSource` or `MysqlConnectionPoolDataSource` object (both objects support the `DataSource` interface), and then set the connection string using the `setURL` function. - -For example: - -```java -MysqlDataSource mysqlDataSource = new MysqlDataSource(); -mysqlDataSource.setURL("jdbc:mysql://{host}:{port}/{database}?user={username}&password={password}"); -``` - -For more information on JDBC connections, see the [JDBC documentation](https://dev.mysql.com/doc/connector-j/en/) - -### Connection parameters - -| Parameter name | Description | -| :---: | :----------------------------: | -| `{username}` | A SQL user to connect to the TiDB cluster | -| `{password}` | The password of the SQL user | -| `{host}` | [Host](https://en.wikipedia.org/wiki/Host_(network)) of a TiDB node | -| `{port}` | Port that the TiDB node is listening on | -| `{database}` | Name of an existing database | - - - -For more information about TiDB SQL users, see [TiDB User Account Management](/user-account-management.md). - - - - - -For more information about TiDB SQL users, see [TiDB User Account Management](https://docs.pingcap.com/tidb/stable/user-account-management). - - - -## Hibernate - -You can connect to TiDB using the [Hibernate ORM](https://hibernate.org/orm/). To do that, you need to set `hibernate.connection.url` in the Hibernate configuration file to a legal TiDB connection string. - -For example, if you use a `hibernate.cfg.xml` configuration file, set `hibernate.connection.url` as follows: - -```xml - - - - - com.mysql.cj.jdbc.Driver - org.hibernate.dialect.TiDBDialect - jdbc:mysql://{host}:{port}/{database}?user={user}&password={password} - - -``` - -After the configuration is done, you can use the following command to read the configuration file and get the `SessionFactory` object: - -```java -SessionFactory sessionFactory = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory(); -``` - -Note the following: - -- Because the `hibernate.cfg.xml` configuration file is in the XML format and `&` is a special character in XML, you need to change `&` to `&` when configuring the file. For example, you need to change the connection string `hibernate.connection.url` from `jdbc:mysql://{host}:{port}/{database}?user={user}&password={password}` to `jdbc:mysql://{host}:{ port}/{database}?user={user}&password={password}`. -- It is recommended that you use the `TiDB` dialect by setting `hibernate.dialect` to `org.hibernate.dialect.TiDBDialect`. -- Hibernate supports TiDB dialects starting from `6.0.0.Beta2`, so it is recommended that you use Hibernate `6.0.0.Beta2` or a later version to connect to TiDB. - -For more information about Hibernate connection parameters, see [Hibernate documentation](https://hibernate.org/orm/documentation). - -### Connection parameters - -| Parameter name | Description | -| :---: | :----------------------------: | -| `{username}` | A SQL user to connect to the TiDB cluster | -| `{password}` | The password of the SQL user | -| `{host}` | [Host](https://en.wikipedia.org/wiki/Host_(network)) of a TiDB node | -| `{port}` | Port that the TiDB node is listening on | -| `{database}` | Name of an existing database | - - - -For more information about TiDB SQL users, see [TiDB User Account Management](/user-account-management.md). - - - - - -For more information about TiDB SQL users, see [TiDB User Account Management](https://docs.pingcap.com/tidb/stable/user-account-management). - - +- To connect to {{{ .starter }}} or {{{ .essential }}} clusters from edge environments via HTTP, use the [TiDB Cloud Serverless Driver](/develop/serverless-driver.md). Note that the serverless driver is in beta and only applicable to {{{ .starter }}} or {{{ .essential }}} clusters. ## Need help? -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-connection-parameters.md b/develop/dev-guide-connection-parameters.md index e2afe056e22f8..14d8b74fcc3ba 100644 --- a/develop/dev-guide-connection-parameters.md +++ b/develop/dev-guide-connection-parameters.md @@ -1,23 +1,20 @@ --- -title: Connection Pools and Connection Parameters +title: Configure Connection Pools and Connection Parameters summary: This document explains how to configure connection pools and parameters for TiDB. It covers connection pool size, probe configuration, and formulas for optimal throughput. It also discusses JDBC API usage and MySQL Connector/J parameter configurations for performance optimization. +aliases: ['/tidb/stable/dev-guide-connection-parameters/','/tidb/dev/dev-guide-connection-parameters/','/tidbcloud/dev-guide-connection-parameters/'] --- -# Connection Pools and Connection Parameters +# Configure Connection Pools and Connection Parameters This document describes how to configure connection pools and connection parameters when you use a driver or ORM framework to connect to TiDB. - - -If you are interested in more tips about Java application development, see [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md#connection-pool) - - - - - -If you are interested in more tips about Java application development, see [Best Practices for Developing Java Applications with TiDB](https://docs.pingcap.com/tidb/stable/java-app-best-practices) - - +> **Tip:** +> +> In this document, the following sections are excerpted from [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md): +> +> - [Configure the number of connections](#configure-the-number-of-connections) +> - [Probe configuration](#probe-configuration) +> - [Connection parameters](#connection-parameters) ## Connection pool @@ -315,14 +312,6 @@ However, in an actual production environment, idle connections and SQL statement ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-create-database.md b/develop/dev-guide-create-database.md index 82bd9af01100d..17b4dff049f57 100644 --- a/develop/dev-guide-create-database.md +++ b/develop/dev-guide-create-database.md @@ -1,6 +1,7 @@ --- title: Create a Database summary: Learn steps, rules, and examples to create a database. +aliases: ['/tidb/stable/dev-guide-create-database/','/tidb/dev/dev-guide-create-database/','/tidbcloud/dev-guide-create-database/'] --- # Create a Database @@ -11,7 +12,7 @@ This document describes how to create a database using SQL and various programmi Before creating a database, do the following: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md). ## What is database @@ -83,14 +84,6 @@ After creating a database, you can add **tables** to it. For more information, s ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-create-secondary-indexes.md b/develop/dev-guide-create-secondary-indexes.md index d2ae7e3dc3b36..d6ffb927eab37 100644 --- a/develop/dev-guide-create-secondary-indexes.md +++ b/develop/dev-guide-create-secondary-indexes.md @@ -1,6 +1,7 @@ --- title: Create a Secondary Index summary: Learn steps, rules, and examples to create a secondary index. +aliases: ['/tidb/stable/dev-guide-create-secondary-indexes/','/tidb/dev/dev-guide-create-secondary-indexes/','/tidbcloud/dev-guide-create-secondary-indexes/'] --- # Create a Secondary Index @@ -11,7 +12,7 @@ This document describes how to create a secondary index using SQL and various pr Before creating a secondary index, do the following: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md). - [Create a Database](/develop/dev-guide-create-database.md). - [Create a Table](/develop/dev-guide-create-table.md). @@ -20,18 +21,8 @@ Before creating a secondary index, do the following: A secondary index is a logical object in a TiDB cluster. You can simply regard it as a sorting type of data that TiDB uses to improve the query performance. In TiDB, creating a secondary index is an online operation, which does not block any data read and write operations on a table. For each index, TiDB creates references for each row in a table and sorts the references by selected columns instead of by data directly. - - For more information about secondary indexes, see [Secondary Indexes](/best-practices/tidb-best-practices.md#secondary-index). - - - - -For more information about secondary indexes, see [Secondary Indexes](https://docs.pingcap.com/tidb/stable/tidb-best-practices#secondary-index). - - - In TiDB, you can either [add a secondary index to an existing table](#add-a-secondary-index-to-an-existing-table) or [create a secondary index when creating a new table](#create-a-secondary-index-when-creating-a-new-table). ## Add a secondary index to an existing table @@ -146,17 +137,12 @@ In the output, **IndexRangeScan** is displayed instead of **TableFullScan**, whi The words such as **TableFullScan** and **IndexRangeScan** in the execution plan are [operators](/explain-overview.md#operator-overview) in TiDB. For more information about execution plans and operators, see [TiDB Query Execution Plan Overview](/explain-overview.md). - - -The execution plan does not return the same operator every time. This is because TiDB uses a **Cost-Based Optimization (CBO)** approach, in which an execution plan depends on both rules and data distribution. For more information about TiDB SQL performance, see [SQL Tuning Overview](/sql-tuning-overview.md). - - +The execution plan does not return the same operator every time. This is because TiDB uses a **Cost-Based Optimization (CBO)** approach, in which an execution plan depends on both rules and data distribution. - +For more information about SQL performance tuning, see the following documents: -The execution plan does not return the same operator every time. This is because TiDB uses a **Cost-Based Optimization (CBO)** approach, in which an execution plan depends on both rules and data distribution. For more information about TiDB SQL performance, see [SQL Tuning Overview](/tidb-cloud/tidb-cloud-sql-tuning-overview.md). - - +- [SQL Tuning Overview for TiDB Cloud](/tidb-cloud/tidb-cloud-sql-tuning-overview.md) +- [SQL Tuning Overview for TiDB Self-Managed](/sql-tuning-overview.md) > **Note:** > @@ -186,14 +172,6 @@ After creating a database and adding tables and secondary indexes to it, you can ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-create-table.md b/develop/dev-guide-create-table.md index ff5cae4ba6e94..5d66ed9af5b1f 100644 --- a/develop/dev-guide-create-table.md +++ b/develop/dev-guide-create-table.md @@ -1,6 +1,7 @@ --- title: Create a Table summary: Learn the definitions, rules, and guidelines in table creation. +aliases: ['/tidb/stable/dev-guide-create-table/','/tidb/dev/dev-guide-create-table/','/tidbcloud/dev-guide-create-table/'] --- # Create a Table @@ -11,7 +12,7 @@ This document introduces how to create tables using the SQL statement and the re Before reading this document, make sure that the following tasks are completed: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md). - [Create a Database](/develop/dev-guide-create-database.md). @@ -114,11 +115,7 @@ A table can be created without a **primary key** or with a non-integer **primary When the **primary key** of a table is an [integer type](/data-type-numeric.md#integer-types) and `AUTO_INCREMENT` is used, hotspots cannot be avoided by using `SHARD_ROW_ID_BITS`. If you need to avoid hotspots and do not need a continuous and incremental primary key, you can use [`AUTO_RANDOM`](/auto-random.md) instead of `AUTO_INCREMENT` to eliminate row ID continuity. - - -For more information on how to handle hotspot issues, refer to [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md). - - +For more information on how to handle hotspot issues in TiDB Self-Managed, see [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md). Following the [guidelines for selecting primary key](#guidelines-to-follow-when-selecting-primary-key), the following example shows how an `AUTO_RANDOM` primary key is defined in the `users` table. @@ -231,43 +228,17 @@ CREATE TABLE `bookshop`.`users` ( ## Use HTAP capabilities - - -> **Note:** -> -> The steps provided in this guide is **_ONLY_** for quick start in the test environment. For production environments, refer to [explore HTAP](/explore-htap.md). - - - - - > **Note:** > -> The steps provided in this guide is **_ONLY_** for quick start. For more instructions, refer to [Use an HTAP Cluster with TiFlash](/tiflash/tiflash-overview.md). - - +> The steps provided in this section are **_ONLY_** for quick start and testing purposes. For more information about HTAP usage in TiDB, see [explore HTAP](/explore-htap.md). Suppose that you want to perform OLAP analysis on the `ratings` table using the `bookshop` application, for example, to query **whether the rating of a book has a significant correlation with the time of the rating**, which is to analyze whether the user's rating of the book is objective or not. Then you need to query the `score` and `rated_at` fields of the entire `ratings` table. This operation is resource-intensive for an OLTP-only database. Or you can use some ETL or other data synchronization tools to export the data from the OLTP database to a dedicated OLAP database for analysis. In this scenario, TiDB, an **HTAP (Hybrid Transactional and Analytical Processing)** database that supports both OLTP and OLAP scenarios, is an ideal one-stop database solution. -### Replicate column-based data - - - -Currently, TiDB supports two data analysis engines, **TiFlash** and **TiSpark**. For the large data scenarios (100 T), **TiFlash MPP** is recommended as the primary solution for HTAP, and **TiSpark** as a complementary solution. +In TiDB, you can use the row-based storage engine [TiKV](/tikv-overview.md) for Online Transactional Processing (OLTP) and the columnar storage engine [TiFlash](/tiflash/tiflash-overview.md) for Online Analytical Processing (OLAP). After configuration, TiFlash can replicate data from TiKV in real time according to the Raft Learner consensus algorithm, which ensures that data is strongly consistent between TiKV and TiFlash. -To learn more about TiDB HTAP capabilities, refer to the following documents: [Quick Start with TiDB HTAP](/quick-start-with-htap.md) and [Explore HTAP](/explore-htap.md). - - - - - -To learn more about TiDB HTAP capabilities, see [TiDB Cloud HTAP Quick Start](/tidb-cloud/tidb-cloud-htap-quickstart.md) and [Use an HTAP Cluster with TiFlash](/tiflash/tiflash-overview.md). - - - -In this example, [TiFlash](https://docs.pingcap.com/tidb/stable/tiflash-overview) has been chosen as the data analysis engine for the `bookshop` database. +### Replicate column-based data TiFlash does not automatically replicate data after deployment. Therefore, you need to manually specify the tables to be replicated: @@ -292,7 +263,7 @@ ALTER TABLE `bookshop`.`ratings` SET TIFLASH REPLICA 1; > **Note:** > -> If your cluster does not contain **TiFlash** nodes, this SQL statement will report an error: `1105 - the tiflash replica count: 1 should be less than the total tiflash server count: 0`. You can use [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md#step-1-create-a-tidb-cloud-cluster) to create a {{{ .starter }}} cluster that includes **TiFlash**. +> If your cluster does not contain **TiFlash** nodes, this SQL statement will report an error: `1105 - the tiflash replica count: 1 should be less than the total tiflash server count: 0`. You can use [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md#step-1-create-a-tidb-cloud-cluster) to create a {{{ .starter }}} cluster that includes **TiFlash**. Then you can go on to perform the following query: @@ -412,14 +383,6 @@ Note that all the tables that have been created in this document do not contain ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-delete-data.md b/develop/dev-guide-delete-data.md index 9b08a6c70fc12..dc80098e0b3cd 100644 --- a/develop/dev-guide-delete-data.md +++ b/develop/dev-guide-delete-data.md @@ -1,6 +1,7 @@ --- title: Delete Data summary: Learn about the SQL syntax, best practices, and examples for deleting data. +aliases: ['/tidb/stable/dev-guide-delete-data/','/tidb/dev/dev-guide-delete-data/','/tidbcloud/dev-guide-delete-data/'] --- # Delete Data @@ -11,7 +12,7 @@ This document describes how to use the [DELETE](/sql-statements/sql-statement-de Before reading this document, you need to prepare the following: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md), [Create a Database](/develop/dev-guide-create-database.md), [Create a Table](/develop/dev-guide-create-table.md), and [Create Secondary Indexes](/develop/dev-guide-create-secondary-indexes.md) - [Insert Data](/develop/dev-guide-insert-data.md) @@ -36,18 +37,8 @@ The following are some best practices to follow when you delete data: - Always specify the `WHERE` clause in the `DELETE` statement. If the `WHERE` clause is not specified, TiDB will delete **_ALL ROWS_** in the table. - - - Use [bulk-delete](#bulk-delete) when you delete a large number of rows (for example, more than ten thousand), because TiDB limits the size of a single transaction ([txn-total-size-limit](/tidb-configuration-file.md#txn-total-size-limit), 100 MB by default). - - - - -- Use [bulk-delete](#bulk-delete) when you delete a large number of rows (for example, more than ten thousand), because TiDB limits the size of a single transaction to 100 MB by default. - - - - If you delete all the data in a table, do not use the `DELETE` statement. Instead, use the [`TRUNCATE`](/sql-statements/sql-statement-truncate.md) statement. - For performance considerations, see [Performance Considerations](#performance-considerations). - In scenarios where large batches of data need to be deleted, [Non-Transactional bulk-delete](#non-transactional-bulk-delete) can significantly improve performance. However, this will lose the transactional of the deletion and therefore **CANNOT** be rolled back. Make sure that you select the correct operation. @@ -170,21 +161,10 @@ with connection: - - -The `rated_at` field is of the `DATETIME` type in [Date and Time Types](/data-type-date-and-time.md). You can assume that it is stored as a literal quantity in TiDB, independent of the time zone. On the other hand, the `TIMESTAMP` type stores a timestamp and thus displays a different time string in a different [time zone](/configure-time-zone.md). - - - - - -The `rated_at` field is of the `DATETIME` type in [Date and Time Types](/data-type-date-and-time.md). You can assume that it is stored as a literal quantity in TiDB, independent of the time zone. On the other hand, the `TIMESTAMP` type stores a timestamp and thus displays a different time string in a different time zone. - - - > **Note:** > -> Like MySQL, the `TIMESTAMP` data type is affected by the [year 2038 problem](https://en.wikipedia.org/wiki/Year_2038_problem). It is recommended to use the `DATETIME` type if you store values larger than 2038. +> - The `rated_at` field is of the `DATETIME` type in [Date and Time Types](/data-type-date-and-time.md). You can assume that it is stored as a literal quantity in TiDB, independent of the time zone. On the other hand, the `TIMESTAMP` type stores a timestamp and thus displays a different time string in a different [time zone](/configure-time-zone.md). +> - Like MySQL, the `TIMESTAMP` data type is affected by the [year 2038 problem](https://en.wikipedia.org/wiki/Year_2038_problem). It is recommended to use the `DATETIME` type if you store values larger than 2038. ## Performance considerations @@ -204,18 +184,8 @@ TiDB uses [statistical information](/statistics.md) to determine index selection When you need to delete multiple rows of data from a table, you can choose the [`DELETE` example](#example) and use the `WHERE` clause to filter the data that needs to be deleted. - - However, if you need to delete a large number of rows (more than ten thousand), it is recommended that you delete the data in an iterative way, that is, deleting a portion of the data at each iteration until the deletion is completed. This is because TiDB limits the size of a single transaction ([`txn-total-size-limit`](/tidb-configuration-file.md#txn-total-size-limit), 100 MB by default). You can use loops in your programs or scripts to perform such operations. - - - - -However, if you need to delete a large number of rows (more than ten thousand), it is recommended that you delete the data in an iterative way, that is, deleting a portion of the data at each iteration until the deletion is completed. This is because TiDB limits the size of a single transaction to 100 MB by default. You can use loops in your programs or scripts to perform such operations. - - - This section provides an example of writing a script to handle an iterative delete operation that demonstrates how you should do a combination of `SELECT` and `DELETE` to complete a bulk-delete. ### Write a bulk-delete loop @@ -414,14 +384,6 @@ BATCH ON `rated_at` LIMIT 1000 DELETE FROM `ratings` WHERE `rated_at` >= "2022-0 ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-get-data-from-single-table.md b/develop/dev-guide-get-data-from-single-table.md index e74e5547de7a4..843840f3af4c7 100644 --- a/develop/dev-guide-get-data-from-single-table.md +++ b/develop/dev-guide-get-data-from-single-table.md @@ -1,6 +1,7 @@ --- title: Query Data from a Single Table summary: This document describes how to query data from a single table in a database. +aliases: ['/tidb/stable/dev-guide-get-data-from-single-table/','/tidb/dev/dev-guide-get-data-from-single-table/','/tidbcloud/dev-guide-get-data-from-single-table/'] --- @@ -15,31 +16,22 @@ The following content takes the [Bookshop](/develop/dev-guide-bookshop-schema-de Before querying data, make sure that you have completed the following steps: - - -1. Build a TiDB cluster (using [TiDB Cloud](/develop/dev-guide-build-cluster-in-cloud.md) or [TiUP](/production-deployment-using-tiup.md) is recommended). - - - - - -1. Build a TiDB cluster using [TiDB Cloud](/develop/dev-guide-build-cluster-in-cloud.md). - - + +
+1. [Create a TiDB Cloud cluster](/develop/dev-guide-build-cluster-in-cloud.md). 2. [Import table schema and sample data of the Bookshop application](/develop/dev-guide-bookshop-schema-design.md#import-table-structures-and-data). - - - 3. [Connect to TiDB](/develop/dev-guide-connect-to-tidb.md). - - - +
+
-3. [Connect to TiDB](/tidb-cloud/connect-to-tidb-cluster.md). +1. [Deploy a TiDB Self-Managed cluster](/production-deployment-using-tiup.md). +2. [Import table schema and sample data of the Bookshop application](/develop/dev-guide-bookshop-schema-design.md#import-table-structures-and-data). +3. [Connect to TiDB](/develop/dev-guide-connect-to-tidb.md). - +
+
## Execute a simple query @@ -122,20 +114,9 @@ public class AuthorDAO { } ``` - - -- After [connecting to TiDB using the JDBC driver](/develop/dev-guide-connect-to-tidb.md#jdbc), you can create a `Statement` object with `conn.createStatus()`. - - - - - -- After [connecting to TiDB using the JDBC driver](/develop/dev-guide-choose-driver-or-orm.md#java-drivers), you can create a `Statement` object with `conn.createStatus()`. - - +After [connecting to TiDB using the JDBC driver](/develop/dev-guide-sample-application-java-jdbc.md), you can create a `Statement` object with `conn.createStatement()`, and then call `stmt.executeQuery("query_sql")` to initiate a database query request to TiDB. -- Then call `stmt.executeQuery("query_sql")` to initiate a database query request to TiDB. -- The query results are stored in a `ResultSet` object. By traversing `ResultSet`, the returned results can be mapped to the `Author` object. +The query results are stored in a `ResultSet` object. By traversing `ResultSet`, the returned results can be mapped to the `Author` object.
@@ -399,14 +380,6 @@ In addition to the `COUNT` function, TiDB also supports other aggregate function ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-gui-datagrip.md b/develop/dev-guide-gui-datagrip.md index dedf061777b52..c2822821a5285 100644 --- a/develop/dev-guide-gui-datagrip.md +++ b/develop/dev-guide-gui-datagrip.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with JetBrains DataGrip summary: Learn how to connect to TiDB using JetBrains DataGrip. This tutorial also applies to the Database Tools and SQL plugin available in other JetBrains IDEs, such as IntelliJ, PhpStorm, and PyCharm. +aliases: ['/tidb/stable/dev-guide-gui-datagrip/','/tidb/dev/dev-guide-gui-datagrip/','/tidbcloud/dev-guide-gui-datagrip/'] --- # Connect to TiDB with JetBrains DataGrip @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [DataGrip **2023.2.1** or later](https://www.jetbrains.com/datagrip/download/) or a non-community edition [JetBrains](https://www.jetbrains.com/) IDE. - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Connect to TiDB Connect to your TiDB cluster depending on the TiDB deployment option you've selected. @@ -137,7 +126,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 10. Click **OK** to save the connection configuration.
-
+
1. Launch DataGrip and create a project to manage your connections. @@ -172,19 +161,11 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele ## Next steps - Learn more usage of DataGrip from [the documentation of DataGrip](https://www.jetbrains.com/help/datagrip/getting-started.html). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-gui-dbeaver.md b/develop/dev-guide-gui-dbeaver.md index 327538168e834..67a2dfcf5e02d 100644 --- a/develop/dev-guide-gui-dbeaver.md +++ b/develop/dev-guide-gui-dbeaver.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with DBeaver summary: Learn how to connect to TiDB using DBeaver Community. +aliases: ['/tidb/stable/dev-guide-gui-dbeaver/','/tidb/dev/dev-guide-gui-dbeaver/','/tidbcloud/dev-guide-gui-dbeaver/'] --- # Connect to TiDB with DBeaver @@ -20,23 +21,11 @@ To complete this tutorial, you need: - [DBeaver Community **23.0.3** or higher](https://dbeaver.io/download/). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Connect to TiDB Connect to your TiDB cluster depending on the TiDB deployment option you've selected. @@ -126,7 +115,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 7. Click **Finish** to save the connection configuration.
-
+
1. Launch DBeaver and click **New Database Connection** in the upper-left corner. In the **Connect to a database** dialog, select **TiDB** from the list, and then click **Next**. @@ -161,19 +150,11 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele ## Next steps - Learn more usage of DBeaver from [the documentation of DBeaver](https://github.com/dbeaver/dbeaver/wiki). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-gui-mysql-workbench.md b/develop/dev-guide-gui-mysql-workbench.md index cfdf810d7bb32..6053c12671b4a 100644 --- a/develop/dev-guide-gui-mysql-workbench.md +++ b/develop/dev-guide-gui-mysql-workbench.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with MySQL Workbench summary: Learn how to connect to TiDB using MySQL Workbench. +aliases: ['/tidb/stable/dev-guide-gui-mysql-workbench/','/tidb/dev/dev-guide-gui-mysql-workbench/','/tidbcloud/dev-guide-gui-mysql-workbench/'] --- # Connect to TiDB with MySQL Workbench @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [MySQL Workbench](https://dev.mysql.com/downloads/workbench/) **8.0.31** or later versions. - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Connect to TiDB Connect to your TiDB cluster depending on the TiDB deployment option you have selected. @@ -124,7 +113,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se 7. If the connection test is successful, you can see the **Successfully made the MySQL connection** message. Click **OK** to save the connection configuration.
-
+
1. Launch MySQL Workbench and click **+** near the **MySQL Connections** title. @@ -167,19 +156,11 @@ For more information, see [MySQL Workbench frequently asked questions](https://d ## Next steps - Learn more usage of MySQL Workbench from [the documentation of MySQL Workbench](https://dev.mysql.com/doc/workbench/en/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-gui-navicat.md b/develop/dev-guide-gui-navicat.md index f757be6f87dfd..ce548b7c7efea 100644 --- a/develop/dev-guide-gui-navicat.md +++ b/develop/dev-guide-gui-navicat.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Navicat summary: Learn how to connect to TiDB using Navicat. +aliases: ['/tidb/stable/dev-guide-gui-navicat/','/tidb/dev/dev-guide-gui-navicat/','/tidbcloud/dev-guide-gui-navicat/'] --- # Connect to TiDB with Navicat @@ -21,23 +22,11 @@ To complete this tutorial, you need: - A paid account for Navicat Premium. - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Connect to TiDB Connect to your TiDB cluster depending on the TiDB deployment option you have selected. @@ -122,7 +111,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se 9. If the connection test is successful, you can see the **Connection Successful** message. Click **OK** to finish the connection configuration.
-
+
1. Launch Navicat Premium, click **Connection** in the upper-left corner, select **PingCAP** from the **Vendor Filter** list, and double-click **TiDB** in the right panel. @@ -147,19 +136,11 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se ## Next steps -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-gui-vscode-sqltools.md b/develop/dev-guide-gui-vscode-sqltools.md index 66206847af020..c218073a963b8 100644 --- a/develop/dev-guide-gui-vscode-sqltools.md +++ b/develop/dev-guide-gui-vscode-sqltools.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Visual Studio Code summary: Learn how to connect to TiDB using Visual Studio Code or GitHub Codespaces. +aliases: ['/tidb/stable/dev-guide-gui-vscode-sqltools/','/tidb/dev/dev-guide-gui-vscode-sqltools/','/tidbcloud/dev-guide-gui-vscode-sqltools/'] --- # Connect to TiDB with Visual Studio Code @@ -25,23 +26,11 @@ To complete this tutorial, you need: - On the **Extensions** tab of your VS Code, search for `mtxr.sqltools-driver-mysql` to get the **SQLTools MySQL/MariaDB/TiDB** extension, and then click **Install**. - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Connect to TiDB Connect to your TiDB cluster depending on the TiDB deployment option you have selected. @@ -148,7 +137,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se 7. If the connection test is successful, you can see the **Successfully connected!** message. Click **SAVE CONNECTION** to save the connection configuration.
-
+
1. Launch VS Code and select the **SQLTools** extension on the navigation pane. Under the **CONNECTIONS** section, click **Add New Connection** and select **TiDB** as the database driver. @@ -190,19 +179,11 @@ Connect to your TiDB cluster depending on the TiDB deployment option you have se - Learn more usage of Visual Studio Code from [the documentation of Visual Studio Code](https://code.visualstudio.com/docs). - Learn more usage of VS Code SQLTools extension from [the documentation](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) and [GitHub repository](https://github.com/mtxr/vscode-sqltools) of SQLTools. -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-hybrid-oltp-and-olap-queries.md b/develop/dev-guide-hybrid-oltp-and-olap-queries.md index 4423e5872c383..450f015636626 100644 --- a/develop/dev-guide-hybrid-oltp-and-olap-queries.md +++ b/develop/dev-guide-hybrid-oltp-and-olap-queries.md @@ -1,6 +1,7 @@ --- title: HTAP Queries summary: Introduce the HTAP queries in TiDB. +aliases: ['/tidb/stable/dev-guide-hybrid-oltp-and-olap-queries/','/tidb/dev/dev-guide-hybrid-oltp-and-olap-queries/','/tidbcloud/dev-guide-hybrid-oltp-and-olap-queries/'] --- # HTAP Queries @@ -13,13 +14,13 @@ The [Create a table](/develop/dev-guide-create-table.md#use-htap-capabilities) s ## Data preparation -Before starting, you can import more sample data [via the `tiup demo` command](/develop/dev-guide-bookshop-schema-design.md#method-1-via-tiup-demo). For example: +Before starting, you can import more sample data [via the `tiup demo` command](/develop/dev-guide-bookshop-schema-design.md#tidb-self-managed-via-tiup-demo). For example: ```shell tiup demo bookshop prepare --users=200000 --books=500000 --authors=100000 --ratings=1000000 --orders=1000000 --host 127.0.0.1 --port 4000 --drop-tables ``` -Or you can [use the Import function of TiDB Cloud](/develop/dev-guide-bookshop-schema-design.md#method-2-via-tidb-cloud-import) to import the pre-prepared sample data. +Or you can [use the Import function of TiDB Cloud](/develop/dev-guide-bookshop-schema-design.md#tidb-cloud-via-the-import-feature) to import the pre-prepared sample data. ## Window functions @@ -246,32 +247,13 @@ For more information about how TiDB chooses to use TiFlash, see [Use TiDB to rea ## Read more - - -- [Quick Start with TiDB HTAP](/quick-start-with-htap.md) -- [Explore HTAP](/explore-htap.md) - - - - - -- [TiDB Cloud HTAP Quick Start](/tidb-cloud/tidb-cloud-htap-quickstart.md) - - - +- [HTAP Quick Start for TiDB Cloud](/tidb-cloud/tidb-cloud-htap-quickstart.md) +- [HTAP Quick Start for TiDB Self-Managed](/quick-start-with-htap.md) and [Explore HTAP for TiDB Self-Managed](/explore-htap.md) - [Window Functions](/functions-and-operators/window-functions.md) - [Use TiFlash](/tiflash/tiflash-overview.md#use-tiflash) ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-implicit-type-conversion.md b/develop/dev-guide-implicit-type-conversion.md index 13711c29e7317..91137e8e34f53 100644 --- a/develop/dev-guide-implicit-type-conversion.md +++ b/develop/dev-guide-implicit-type-conversion.md @@ -1,6 +1,7 @@ --- title: Avoid Implicit Type Conversions summary: Introduces the possible consequences of implicit type conversions in TiDB and ways to avoid them. +aliases: ['/tidb/stable/dev-guide-implicit-type-conversion/','/tidb/dev/dev-guide-implicit-type-conversion/','/tidbcloud/dev-guide-implicit-type-conversion/'] --- # Avoid Implicit Type Conversions @@ -79,14 +80,6 @@ SELECT * FROM `t1` WHERE `a` BETWEEN '12123123' AND '1111222211111111200000'; ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-index-best-practice.md b/develop/dev-guide-index-best-practice.md index efb3db870c936..3fd8f3556a365 100644 --- a/develop/dev-guide-index-best-practice.md +++ b/develop/dev-guide-index-best-practice.md @@ -1,6 +1,7 @@ --- title: Best Practices for Indexing summary: Learn some best practices for creating and using indexes in TiDB. +aliases: ['/tidb/stable/dev-guide-index-best-practice/','/tidb/dev/dev-guide-index-best-practice/','/tidbcloud/dev-guide-index-best-practice/'] --- @@ -153,14 +154,6 @@ CREATE TABLE `books` ( ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-insert-data.md b/develop/dev-guide-insert-data.md index eec758342a64f..7d5d332202fa1 100644 --- a/develop/dev-guide-insert-data.md +++ b/develop/dev-guide-insert-data.md @@ -1,6 +1,7 @@ --- title: Insert Data summary: Learn about how to insert data. +aliases: ['/tidb/stable/dev-guide-insert-data/','/tidb/dev/dev-guide-insert-data/','/tidbcloud/dev-guide-insert-data/'] --- @@ -13,7 +14,7 @@ This document describes how to insert data into TiDB by using the SQL language w Before reading this document, you need to prepare the following: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md), [Create a Database](/develop/dev-guide-create-database.md), [Create a Table](/develop/dev-guide-create-table.md), and [Create Secondary Indexes](/develop/dev-guide-create-secondary-indexes.md) ## Insert rows @@ -234,33 +235,30 @@ If you need to quickly import a large amount of data into a TiDB cluster, it is The following are the recommended tools for bulk-insert: -- Data export: [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview). You can export MySQL or TiDB data to local or Amazon S3. + +
- +- Data export: use [Dumpling](/dumpling-overview.md) to export MySQL or TiDB data to local or your cloud storage. For a TiDB Cloud Starter or Essential cluster, you can also use the [Export](/tidb-cloud/serverless-export.md) feature in the [TiDB Cloud console](https://tidbcloud.com/) to export data more efficiently. +- Data import: use the [Import](/tidb-cloud/import-sample-data.md) feature in the [TiDB Cloud console](https://tidbcloud.com/). You can import Dumpling exported data, import a local CSV file, or [import CSV files from cloud storage into TiDB Cloud](/tidb-cloud/import-csv-files.md). +- Data replication: use the [TiDB Data Migration](/tidb-cloud/migrate-from-mysql-using-data-migration.md) feature in the [TiDB Cloud console](https://tidbcloud.com/). You can replicate MySQL-compatible databases to TiDB. It also supports merging and migrating the sharded instances and tables from the source databases. +- Data backup and restore: use the [Backup](/tidb-cloud/backup-and-restore.md) feature in the [TiDB Cloud console](https://tidbcloud.com/). Compared to Dumpling, backup and restore is more suitable for big data scenario. +
+
+ +- Data export: [Dumpling](/dumpling-overview.md). You can export MySQL or TiDB data to local or Amazon S3. - Data import: [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md). You can import **Dumpling** exported data, a **CSV** file, or [Migrate Data from Amazon Aurora to TiDB](/migrate-aurora-to-tidb.md). It also supports reading data from a local disk or Amazon S3 cloud disk. - Data replication: [TiDB Data Migration](/dm/dm-overview.md). You can replicate MySQL, MariaDB, and Amazon Aurora databases to TiDB. It also supports merging and migrating the sharded instances and tables from the source databases. - Data backup and restore: [Backup & Restore (BR)](/br/backup-and-restore-overview.md). Compared to **Dumpling**, **BR** is more suitable for **_big data_** scenario. - - - - -- Data import: [Create Import](/tidb-cloud/import-sample-data.md) page in the [TiDB Cloud console](https://tidbcloud.com/). You can import **Dumpling** exported data, import a local **CSV** file, or [Import CSV Files from Amazon S3 or GCS into TiDB Cloud](/tidb-cloud/import-csv-files.md). It also supports reading data from a local disk, Amazon S3 cloud disk, or GCS cloud disk. -- Data replication: [TiDB Data Migration](https://docs.pingcap.com/tidb/stable/dm-overview). You can replicate MySQL, MariaDB, and Amazon Aurora databases to TiDB. It also supports merging and migrating the sharded instances and tables from the source databases. -- Data backup and restore: [Backup](/tidb-cloud/backup-and-restore.md) page in the TiDB Cloud console. Compared to **Dumpling**, backup and restore is more suitable for **_big data_** scenario. - - +
+
## Avoid hotspots When designing a table, you need to consider if there is a large number of insert operations. If so, you need to avoid hotspots during table design. See the [Select primary key](/develop/dev-guide-create-table.md#select-primary-key) section and follow the [Rules when selecting primary key](/develop/dev-guide-create-table.md#guidelines-to-follow-when-selecting-primary-key). - - -For more information on how to handle hotspot issues, see [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md). - - +For more information on how to handle hotspot issues in TiDB Self-Managed, see [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md). ## Insert data to a table with the `AUTO_RANDOM` primary key @@ -305,14 +303,6 @@ In TiDB, HTAP capabilities save you from performing additional operations when i ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-join-tables.md b/develop/dev-guide-join-tables.md index 237dc9a8b4841..c53e61481cc3b 100644 --- a/develop/dev-guide-join-tables.md +++ b/develop/dev-guide-join-tables.md @@ -1,6 +1,7 @@ --- title: Multi-table Join Queries summary: This document describes how to use multi-table join queries. +aliases: ['/tidb/stable/dev-guide-join-tables/','/tidb/dev/dev-guide-join-tables/','/tidbcloud/dev-guide-join-tables/'] --- # Multi-table Join Queries @@ -256,14 +257,6 @@ For more information about the implementation details and limitations of this Jo ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-mysql-tools.md b/develop/dev-guide-mysql-tools.md new file mode 100644 index 0000000000000..75a4f07d72f17 --- /dev/null +++ b/develop/dev-guide-mysql-tools.md @@ -0,0 +1,64 @@ +--- +title: Connect to TiDB with MySQL Tools +summary: Learn how to connect to TiDB using MySQL tools. +--- + +# Connect to TiDB with MySQL Tools + +TiDB is highly compatible with the MySQL protocol. For a full list of client link parameters, see [MySQL Client Options](https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html). + +TiDB supports the [MySQL Client/Server Protocol](https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_PROTOCOL.html), which allows most client drivers and ORM frameworks to connect to TiDB just as they connect to MySQL. + +You can choose to use MySQL Client or MySQL Shell based on your personal preferences. + + + +
+ +You can connect to TiDB using MySQL Client, which can be used as a command-line tool for TiDB. To install MySQL Client, follow the instructions below for YUM based Linux distributions. + +```shell +sudo yum install mysql +``` + +After the installation, you can connect to TiDB using the following command: + +```shell +mysql --host --port 4000 -u root -p --comments +``` + +The MySQL v9.0 client on macOS cannot correctly load the `mysql_native_password` plugin, causing the error `ERROR 2059 (HY000): Authentication plugin 'mysql_native_password' cannot be loaded` when connecting to TiDB. To address this issue, it is recommended to install and use the MySQL v8.0 client to connect to TiDB. Run the following commands to install it: + +```shell +brew install mysql-client@8.0 +brew unlink mysql +brew link mysql-client@8.0 +``` + +If you still encounter errors, you can specify the installation path of the MySQL v8.0 client to connect to TiDB. Run the following command: + +```shell +/opt/homebrew/opt/mysql-client@8.0/bin/mysql --comments --host ${YOUR_IP_ADDRESS} --port ${YOUR_PORT_NUMBER} -u ${your_user_name} -p +``` + +Replace `/opt/homebrew/opt/mysql-client@8.0/bin/mysql` in the preceding command with the installation path of the MySQL v8.0 client in your actual environment. + +
+ +
+ +You can connect to TiDB using MySQL Shell, which can be used as a command-line tool for TiDB. To install MySQL Shell, follow the instructions in the [MySQL Shell documentation](https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html). After the installation, you can connect to TiDB using the following command: + +```shell +mysqlsh --sql mysql://root@:4000 +``` + +
+ +
+ +## Need help? + +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-object-naming-guidelines.md b/develop/dev-guide-object-naming-guidelines.md index 8939b7b8fd48f..f854b0220f558 100644 --- a/develop/dev-guide-object-naming-guidelines.md +++ b/develop/dev-guide-object-naming-guidelines.md @@ -1,6 +1,7 @@ --- title: Object Naming Convention summary: Learn the object naming convention in TiDB. +aliases: ['/tidb/stable/dev-guide-object-naming-guidelines/','/tidb/dev/dev-guide-object-naming-guidelines/','/tidbcloud/dev-guide-object-naming-guidelines/'] --- # Object Naming Convention @@ -47,14 +48,6 @@ It is recommended to differentiate database names by business, product, or other ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-optimistic-and-pessimistic-transaction.md b/develop/dev-guide-optimistic-and-pessimistic-transaction.md index 7f441d257a54c..8efa3c53978c8 100644 --- a/develop/dev-guide-optimistic-and-pessimistic-transaction.md +++ b/develop/dev-guide-optimistic-and-pessimistic-transaction.md @@ -1,6 +1,7 @@ --- title: Optimistic Transactions and Pessimistic Transactions summary: Learn about optimistic and pessimistic transactions in TiDB. +aliases: ['/tidb/stable/dev-guide-optimistic-and-pessimistic-transaction/','/tidb/dev/dev-guide-optimistic-and-pessimistic-transaction/','/tidbcloud/dev-guide-optimistic-and-pessimistic-transaction/'] --- # Optimistic Transactions and Pessimistic Transactions @@ -1369,14 +1370,6 @@ mysql> SELECT * FROM users; ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-optimize-sql-best-practices.md b/develop/dev-guide-optimize-sql-best-practices.md index f4d8088297724..788c2616ec57a 100644 --- a/develop/dev-guide-optimize-sql-best-practices.md +++ b/develop/dev-guide-optimize-sql-best-practices.md @@ -1,6 +1,7 @@ --- title: Performance Tuning Best Practices summary: Introduces the best practices for tuning TiDB performance. +aliases: ['/tidb/stable/dev-guide-optimize-sql-best-practices/','/tidb/dev/dev-guide-optimize-sql-best-practices/','/tidbcloud/dev-guide-optimize-sql-best-practices/'] --- # Performance Tuning Best Practices @@ -151,56 +152,18 @@ SET @@global.tidb_ddl_reorg_batch_size = 128; ## Transaction conflicts - - For how to locate and resolve transaction conflicts, see [Troubleshoot Lock Conflicts](/troubleshoot-lock-conflicts.md). - - - - -For how to locate and resolve transaction conflicts, see [Troubleshoot Lock Conflicts](https://docs.pingcap.com/tidb/stable/troubleshoot-lock-conflicts). - - - ## Best practices for developing Java applications with TiDB - - -See [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md). - - - - - -See [Best Practices for Developing Java Applications with TiDB](https://docs.pingcap.com/tidb/stable/java-app-best-practices). - - +See [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md). ### See also - - - [Best Practices for High-Concurrency Writes](/best-practices/high-concurrency-best-practices.md) - - - - -- [Best Practices for High-Concurrency Writes](https://docs.pingcap.com/tidb/stable/high-concurrency-best-practices) - - - ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-optimize-sql-overview.md b/develop/dev-guide-optimize-sql-overview.md index 9b6e30e4a0caf..522e1dfe624d7 100644 --- a/develop/dev-guide-optimize-sql-overview.md +++ b/develop/dev-guide-optimize-sql-overview.md @@ -1,6 +1,7 @@ --- title: Overview of Optimizing SQL Performance summary: Provides an overview of SQL performance tuning for TiDB application developers. +aliases: ['/tidb/stable/dev-guide-optimize-sql-overview/','/tidb/dev/dev-guide-optimize-sql-overview/','/tidbcloud/dev-guide-optimize-sql-overview/'] --- # Overview of Optimizing SQL Performance @@ -23,44 +24,16 @@ To get good SQL statement performance, you can follow these guidelines: After [tuning SQL performance](#sql-performance-tuning), if your application still cannot get good performance, you might need to check your schema design and data access patterns to avoid the following issues: - - * Transaction contention. For how to diagnose and resolve transaction contention, see [Troubleshoot Lock Conflicts](/troubleshoot-lock-conflicts.md). * Hot spots. For how to diagnose and resolve hot spots, see [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md). - - - - -* Transaction contention. For how to diagnose and resolve transaction contention, see [Troubleshoot Lock Conflicts](https://docs.pingcap.com/tidb/stable/troubleshoot-lock-conflicts). -* Hot spots. For how to diagnose and resolve hot spots, see [Troubleshoot Hotspot Issues](https://docs.pingcap.com/tidb/stable/troubleshoot-hot-spot-issues). - - - ### See also - - -* [SQL Performance Tuning](/sql-tuning-overview.md) - - - - - -* [SQL Performance Tuning](/tidb-cloud/tidb-cloud-sql-tuning-overview.md) - - +* [SQL Performance Tuning for TiDB Cloud](/tidb-cloud/tidb-cloud-sql-tuning-overview.md) +* [SQL Performance Tuning for TiDB Self-Managed](/sql-tuning-overview.md) ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-optimize-sql.md b/develop/dev-guide-optimize-sql.md index 750b6c12e5d38..ed8838230d9a4 100644 --- a/develop/dev-guide-optimize-sql.md +++ b/develop/dev-guide-optimize-sql.md @@ -1,6 +1,7 @@ --- title: SQL Performance Tuning summary: Introduces TiDB's SQL performance tuning scheme and analysis approach. +aliases: ['/tidb/stable/dev-guide-optimize-sql/','/tidb/dev/dev-guide-optimize-sql/','/tidbcloud/dev-guide-optimize-sql/'] --- # SQL Performance Tuning @@ -9,13 +10,13 @@ This document introduces some common reasons for slow SQL statements and techniq ## Before you begin -You can use [`tiup demo` import](/develop/dev-guide-bookshop-schema-design.md#method-1-via-tiup-demo) to prepare data: +You can use [`tiup demo` import](/develop/dev-guide-bookshop-schema-design.md#tidb-self-managed-via-tiup-demo) to prepare data: ```shell tiup demo bookshop prepare --host 127.0.0.1 --port 4000 --books 1000000 ``` -Or [using the Import feature of TiDB Cloud](/develop/dev-guide-bookshop-schema-design.md#method-2-via-tidb-cloud-import) to import the pre-prepared sample data. +Or [using the Import feature of TiDB Cloud](/develop/dev-guide-bookshop-schema-design.md#tidb-cloud-via-the-import-feature) to import the pre-prepared sample data. ## Issue: Full table scan @@ -247,14 +248,6 @@ See [JOIN Execution Plan](/explain-joins.md). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-overview.md b/develop/dev-guide-overview.md deleted file mode 100644 index 512ffba0da38b..0000000000000 --- a/develop/dev-guide-overview.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: Developer Guide Overview -summary: Introduce the overview of the developer guide for TiDB Cloud and TiDB Self-Managed. ---- - -# Developer Guide Overview - - - - - - - -## Guides by language and framework - -Build your application with the language you use by following the guides with sample codes. - - - - -Connect to TiDB Cloud over HTTPS from edge environments. - - - - -Connect Next.js with mysql2 to TiDB Cloud. - - - - -Connect to TiDB Cloud with Prisma ORM. - - - - -Connect to TiDB Cloud with TypeORM. - - - - -Connect to TiDB Cloud with Sequelize ORM. - - - - -Connect Node.js with mysql.js module to TiDB Cloud. - - - - -Connect Node.js with node-mysql2 module to TiDB Cloud. - - - - -Connect AWS Lambda Function with mysql2 to TiDB Cloud. - - - - - - - -Connect Django application with django-tidb to TiDB Cloud. - - - - -Connect to TiDB Cloud with the official MySQL package. - - - - -Connect to TiDB Cloud with PyMySQL package. - - - - -Connect to TiDB Cloud with mysqlclient package. - - - - -Connect to TiDB Cloud with SQLAlchemy ORM. - - - - -Connect to TiDB Cloud with Peewee ORM. - - - - - - - -Connect to TiDB Cloud with JDBC (MySQL Connector/J). - - - - -Connect to TiDB Cloud with MyBatis ORM. - - - - -Connect to TiDB Cloud with Hibernate ORM. - - - - -Connect Spring based application with Spring Data JPA to TiDB Cloud. - - - - - - - -Connect to TiDB Cloud with MySQL driver for Go. - - - - -Connect to TiDB Cloud with GORM. - - - - - - - -Connect Ruby on Rails application with Active Record ORM to TiDB Cloud. - - - - -Connect to TiDB Cloud with mysql2 driver. - - - - -In addition to these guides, PingCAP works with the community to support [third-party MySQL drivers, ORMs, and tools](/develop/dev-guide-third-party-support.md). - -## Use MySQL client software - -As TiDB is a MySQL-compatible database, you can use many familiar client software tools to connect to TiDB Cloud and manage your databases. Or, you can use our command line tool to connect and manage your databases. - - - - -Connect and manage TiDB Cloud databases with MySQL Workbench. - - - - -Connect and manage TiDB Cloud databases with the SQLTools extension in VS Code. - - - - -Connect and manage TiDB Cloud databases with DBeaver. - - - - -Connect and manage TiDB Cloud databases with DataGrip by JetBrains. - - - - -## Additional resources - -Learn other topics about developing with TiDB Cloud. - -- Use TiDB Cloud CLI to develop, manage and deploy your applications. -- Explore popular service integrations with TiDB Cloud. -- Follow [TiDB database development reference](/develop/dev-guide-schema-design-overview.md) to design, interact with, optimize, and troubleshoot your data and schema. -- Follow the free online course [Introduction to TiDB](https://eng.edu.pingcap.com/catalog/info/id:203/?utm_source=docs-dev-guide). - - - - - -This guide is written for application developers, but if you are interested in the inner workings of TiDB or want to get involved in TiDB development, read the [TiDB Kernel Development Guide](https://pingcap.github.io/tidb-dev-guide/) for more information about TiDB. - -This tutorial shows how to quickly build an application using TiDB, the possible use cases of TiDB and how to handle common problems. - -Before reading this page, it is recommended that you read the [Quick Start with TiDB Self-Managed](https://docs.pingcap.com/tidb/v8.5/quick-start-with-tidb/). - -## TiDB basics - -Before you start working with TiDB, you need to understand some important mechanisms of how TiDB works: - -- Read the [TiDB Transaction Overview](/transaction-overview.md) to understand how transactions work in TiDB, or check out the [Transaction Notes for Application Developers](/develop/dev-guide-transaction-overview.md) to learn about transaction knowledge required for application development. -- Understand [the way applications interact with TiDB](#the-way-applications-interact-with-tidb). -- To learn core components and concepts of building up the distributed database TiDB and TiDB Cloud, refer to the free online course [Introduction to TiDB](https://eng.edu.pingcap.com/catalog/info/id:203/?utm_source=docs-dev-guide). - -## TiDB transaction mechanisms - -TiDB supports distributed transactions and offers both [optimistic transaction](/optimistic-transaction.md) and [pessimistic transaction](/pessimistic-transaction.md) modes. The current version of TiDB uses the **pessimistic transaction** mode by default, which allows you to transact with TiDB as you would with a traditional monolithic database (for example, MySQL). - -You can start a transaction using [`BEGIN`](/sql-statements/sql-statement-begin.md), explicitly specify a **pessimistic transaction** using `BEGIN PESSIMISTIC`, or explicitly specify an **optimistic transaction** using `BEGIN OPTIMISTIC`. After that, you can either commit ([`COMMIT`](/sql-statements/sql-statement-commit.md)) or roll back ([`ROLLBACK`](/sql-statements/sql-statement-rollback.md)) the transaction. - -TiDB guarantees atomicity for all statements between the start of `BEGIN` and the end of `COMMIT` or `ROLLBACK`, that is, all statements that are executed during this period either succeed or fail as a whole. This is used to ensure data consistency you need for application development. - -If you are not sure what an **optimistic transaction** is, do **_NOT_** use it yet. Because **optimistic transactions** require that the application can correctly handle [all errors](https://docs.pingcap.com/tidb/v8.5/error-codes/) returned by the `COMMIT` statement. If you are not sure how your application handles them, use a **pessimistic transaction** instead. - -## The way applications interact with TiDB - -TiDB is highly compatible with the MySQL protocol and supports [most MySQL syntax and features](/mysql-compatibility.md), so most MySQL connection libraries are compatible with TiDB. If your application framework or language does not have an official adaptation from PingCAP, it is recommended that you use MySQL's client libraries. More and more third-party libraries are actively supporting TiDB's different features. - -Since TiDB is compatible with the MySQL protocol and MySQL syntax, most of the ORMs that support MySQL are also compatible with TiDB. - -## Read more - -- [Quick Start](/develop/dev-guide-build-cluster-in-cloud.md) -- [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) -- [Connect to TiDB](https://docs.pingcap.com/tidb/v8.5/dev-guide-connect-to-tidb/) -- [Database Schema Design](/develop/dev-guide-schema-design-overview.md) -- [Write Data](/develop/dev-guide-insert-data.md) -- [Read Data](/develop/dev-guide-get-data-from-single-table.md) -- [Transaction](/develop/dev-guide-transaction-overview.md) -- [Optimize](/develop/dev-guide-optimize-sql-overview.md) -- [Example Applications](/develop/dev-guide-sample-application-java-spring-boot.md) - -## Need help? - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://docs.pingcap.com/tidb/v8.5/support/). - - \ No newline at end of file diff --git a/develop/dev-guide-paginate-results.md b/develop/dev-guide-paginate-results.md index cb46b6f8c23c7..9514895046b77 100644 --- a/develop/dev-guide-paginate-results.md +++ b/develop/dev-guide-paginate-results.md @@ -1,6 +1,7 @@ --- title: Paginate Results summary: Introduce paginate result feature in TiDB. +aliases: ['/tidb/stable/dev-guide-paginate-results/','/tidb/dev/dev-guide-paginate-results/','/tidbcloud/dev-guide-paginate-results/'] --- # Paginate Results @@ -336,14 +337,6 @@ ORDER BY book_id, user_id; ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-playground-gitpod.md b/develop/dev-guide-playground-gitpod.md index 1a1cec665bc87..221cce4f1939d 100644 --- a/develop/dev-guide-playground-gitpod.md +++ b/develop/dev-guide-playground-gitpod.md @@ -1,6 +1,7 @@ --- title: Gitpod summary: Gitpod provides a complete, automated, and pre-configured cloud-native development environment. You can develop, run, and test code directly in the browser without any local configurations. +aliases: ['/tidb/stable/dev-guide-playground-gitpod/','/tidb/dev/dev-guide-playground-gitpod/','/tidbcloud/dev-guide-playground-gitpod/'] --- @@ -169,14 +170,6 @@ Gitpod provides a complete, automated, and pre-configured cloud-native developme ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-prepared-statement.md b/develop/dev-guide-prepared-statement.md index 1bc3c510ef640..7fe012330271f 100644 --- a/develop/dev-guide-prepared-statement.md +++ b/develop/dev-guide-prepared-statement.md @@ -1,6 +1,7 @@ --- title: Prepared Statements summary: Learn about how to use the TiDB prepared statements. +aliases: ['/tidb/stable/dev-guide-prepared-statement/','/tidb/dev/dev-guide-prepared-statement/','/tidbcloud/dev-guide-prepared-statement/'] --- # Prepared Statements @@ -227,14 +228,6 @@ For a complete example in Java, see: ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-proxysql-integration.md b/develop/dev-guide-proxysql-integration.md index 5a508b5c86dc2..ab316d81e3631 100644 --- a/develop/dev-guide-proxysql-integration.md +++ b/develop/dev-guide-proxysql-integration.md @@ -1,6 +1,7 @@ --- -title: ProxySQL Integration Guide +title: Integrate TiDB with ProxySQL summary: Learn how to integrate TiDB Cloud and TiDB (self-hosted) with ProxySQL. +aliases: ['/tidb/stable/dev-guide-proxysql-integration/','/tidb/dev/dev-guide-proxysql-integration/','/tidbcloud/dev-guide-proxysql-integration/'] --- # Integrate TiDB with ProxySQL @@ -10,7 +11,7 @@ This document provides a high-level introduction to ProxySQL, describes how to i If you are interested in learning more about TiDB and ProxySQL, you can find some useful links as follows: - [TiDB Cloud](https://docs.pingcap.com/tidbcloud) -- [TiDB Developer Guide](/develop/dev-guide-overview.md) +- [TiDB Developer Guide](https://docs.pingcap.com/developer/) - [ProxySQL Documentation](https://proxysql.com/documentation/) ## What is ProxySQL? @@ -1128,14 +1129,6 @@ Databases can be overloaded by high traffic, faulty code, or malicious spam. Wit ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-aws-lambda.md b/develop/dev-guide-sample-application-aws-lambda.md index e844834dbb634..e3aad2705f354 100644 --- a/develop/dev-guide-sample-application-aws-lambda.md +++ b/develop/dev-guide-sample-application-aws-lambda.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with mysql2 in AWS Lambda Function summary: This article describes how to build a CRUD application using TiDB and mysql2 in AWS Lambda Function and provides a simple example code snippet. +aliases: ['/tidb/stable/dev-guide-sample-application-aws-lambda/','/tidb/dev/dev-guide-sample-application-aws-lambda/','/tidbcloud/dev-guide-sample-application-aws-lambda/'] --- # Connect to TiDB with mysql2 in AWS Lambda Function @@ -29,23 +30,11 @@ To complete this tutorial, you need: - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - If you don't have an AWS account or a user, you can create them by following the steps in the [Getting Started with Lambda](https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html) guide. ## Run the sample app to connect to TiDB @@ -119,7 +108,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
-
+
Copy and paste the corresponding connection string into `env.json`. The following is an example: @@ -362,19 +351,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). - For more details on how to use TiDB in AWS Lambda Function, see our [TiDB-Lambda-integration/aws-lambda-bookstore Demo](https://github.com/pingcap/TiDB-Lambda-integration/blob/main/aws-lambda-bookstore/README.md). You can also use AWS API Gateway to build a RESTful API for your application. - Learn more usage of `mysql2` from [the documentation of `mysql2`](https://sidorares.github.io/node-mysql2/docs/documentation). - Learn more usage of AWS Lambda from [the AWS developer guide of `Lambda`](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-cs.md b/develop/dev-guide-sample-application-cs.md index 710b1df3084cd..61a777d62599e 100644 --- a/develop/dev-guide-sample-application-cs.md +++ b/develop/dev-guide-sample-application-cs.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with C# summary: Learn how to connect to TiDB using C#. This tutorial provides sample C# code snippets for interacting with TiDB. +aliases: ['/tidb/stable/dev-guide-sample-application-cs/','/tidb/dev/dev-guide-sample-application-cs/','/tidbcloud/dev-guide-sample-application-cs/'] --- # Connect to TiDB with C\# diff --git a/develop/dev-guide-sample-application-golang-gorm.md b/develop/dev-guide-sample-application-golang-gorm.md index fc45bb66ac81c..d247595afec84 100644 --- a/develop/dev-guide-sample-application-golang-gorm.md +++ b/develop/dev-guide-sample-application-golang-gorm.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with GORM summary: Learn how to connect to TiDB using GORM. This tutorial gives Golang sample code snippets that work with TiDB using GORM. +aliases: ['/tidb/stable/dev-guide-sample-application-golang-gorm/','/tidb/dev/dev-guide-sample-application-golang-gorm/','/tidbcloud/dev-guide-sample-application-golang-gorm/'] --- # Connect to TiDB with GORM @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -141,7 +130,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -239,19 +228,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of GORM from [the documentation of GORM](https://gorm.io/docs/index.html) and the [TiDB section in the documentation of GORM](https://gorm.io/docs/connecting_to_the_database.html#TiDB). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-golang-sql-driver.md b/develop/dev-guide-sample-application-golang-sql-driver.md index 4cdc07f613177..b2da7c8b57256 100644 --- a/develop/dev-guide-sample-application-golang-sql-driver.md +++ b/develop/dev-guide-sample-application-golang-sql-driver.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Go-MySQL-Driver summary: Learn how to connect to TiDB using Go-MySQL-Driver. This tutorial gives Golang sample code snippets that work with TiDB using Go-MySQL-Driver. +aliases: ['/tidb/stable/dev-guide-sample-application-golang-sql-driver/','/tidb/dev/dev-guide-sample-application-golang-sql-driver/','/tidbcloud/dev-guide-sample-application-golang-sql-driver/'] --- # Connect to TiDB with Go-MySQL-Driver @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -141,7 +130,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -289,19 +278,11 @@ Unless you need to write complex SQL statements, it is recommended to use [ORM]( ## Next steps - Learn more usage of Go-MySQL-Driver from [the documentation of Go-MySQL-Driver](https://github.com/go-sql-driver/mysql/blob/master/README.md). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-java-hibernate.md b/develop/dev-guide-sample-application-java-hibernate.md index d6e59a317651a..bb8ff1d6d18c1 100644 --- a/develop/dev-guide-sample-application-java-hibernate.md +++ b/develop/dev-guide-sample-application-java-hibernate.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Hibernate summary: Learn how to connect to TiDB using Hibernate. This tutorial gives Java sample code snippets that work with TiDB using Hibernate. +aliases: ['/tidb/stable/dev-guide-sample-application-java-hibernate/','/tidb/dev/dev-guide-sample-application-java-hibernate/','/tidbcloud/dev-guide-sample-application-java-hibernate/'] --- # Connect to TiDB with Hibernate @@ -26,23 +27,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -142,7 +131,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `env.sh` file.
-
+
1. Run the following command to copy `env.sh.example` and rename it to `env.sh`: @@ -297,20 +286,12 @@ Without this setting, TiDB accepts the `CHECK` constraint syntax but does not en ## Next steps - Learn more usage of Hibernate from [the documentation of Hibernate](https://hibernate.org/orm/documentation). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. - Learn through the course for Java developers: [Working with TiDB from Java](https://eng.edu.pingcap.com/catalog/info/id:212). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-java-jdbc.md b/develop/dev-guide-sample-application-java-jdbc.md index 9e4f66f36b89f..eaa8517402f5c 100644 --- a/develop/dev-guide-sample-application-java-jdbc.md +++ b/develop/dev-guide-sample-application-java-jdbc.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with JDBC summary: Learn how to connect to TiDB using JDBC. This tutorial gives Java sample code snippets that work with TiDB using JDBC. +aliases: ['/tidb/stable/dev-guide-sample-application-java-jdbc/','/tidb/dev/dev-guide-sample-application-java-jdbc/','/tidbcloud/dev-guide-sample-application-java-jdbc/'] --- # Connect to TiDB with JDBC @@ -13,24 +14,11 @@ In this tutorial, you can learn how to use TiDB and JDBC to accomplish the follo - Connect to your TiDB cluster using JDBC. - Build and run your application. Optionally, you can find [sample code snippets](#sample-code-snippets) for basic CRUD operations. - - > **Note:** > > - This tutorial works with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed. > - Starting from TiDB v7.4, if `connectionCollation` is not configured, and `characterEncoding` is either not configured or set to `UTF-8` in the JDBC URL, the collation used in a JDBC connection depends on the JDBC driver version. For more information, see [Collation used in JDBC connections](/faq/sql-faq.md#collation-used-in-jdbc-connections). - - - - -> **Note:** -> -> - This tutorial works with {{{ .starter }}}, {{{ .essential }}}, TiDB Cloud Dedicated, and TiDB Self-Managed. -> - Starting from TiDB v7.4, if `connectionCollation` is not configured, and `characterEncoding` is either not configured or set to `UTF-8` in the JDBC URL, the collation used in a JDBC connection depends on the JDBC driver version. For more information, see [Collation used in JDBC connections](https://docs.pingcap.com/tidb/stable/sql-faq#collation-used-in-jdbc-connections). - - - ## Prerequisites To complete this tutorial, you need: @@ -40,27 +28,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -> **Note:** -> -> For security considerations, it is recommended that you use `VERIFY_IDENTITY` to establish TLS connections to TiDB clusters when connecting over the internet. {{{ .starter }}}, {{{ .essential }}}, and TiDB Cloud Dedicated use Subject Alternative Name (SAN) certificates, which require MySQL Connector/J version to be greater than or equal to [8.0.22](https://dev.mysql.com/doc/relnotes/connector-j/en/news-8-0-22.html). - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -160,7 +132,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `env.sh` file.
-
+
1. Run the following command to copy `env.sh.example` and rename it to `env.sh`: @@ -324,20 +296,12 @@ Starting from TiDB v8.5.4, TiDB aligns its behavior with MySQL: regardless of ho ## Next steps - Learn more usage of MySQL Connector/J from [the documentation of MySQL Connector/J](https://dev.mysql.com/doc/connector-j/en/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. - Learn through the course for Java developers: [Working with TiDB from Java](https://eng.edu.pingcap.com/catalog/info/id:212). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-java-mybatis.md b/develop/dev-guide-sample-application-java-mybatis.md index 97547a0aa9d18..bbbb47c91c5ae 100644 --- a/develop/dev-guide-sample-application-java-mybatis.md +++ b/develop/dev-guide-sample-application-java-mybatis.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with MyBatis summary: Learn how to connect to TiDB using MyBatis. This tutorial gives Java sample code snippets that work with TiDB using MyBatis. +aliases: ['/tidb/stable/dev-guide-sample-application-java-mybatis/','/tidb/dev/dev-guide-sample-application-java-mybatis/','/tidbcloud/dev-guide-sample-application-java-mybatis/'] --- # Connect to TiDB with MyBatis @@ -26,23 +27,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -142,7 +131,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `env.sh` file.
-
+
1. Run the following command to copy `env.sh.example` and rename it to `env.sh`: @@ -311,20 +300,12 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of MyBatis from [the documentation of MyBatis](http://www.mybatis.org/mybatis-3/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. - Learn through the course for Java developers: [Working with TiDB from Java](https://eng.edu.pingcap.com/catalog/info/id:212). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-java-spring-boot.md b/develop/dev-guide-sample-application-java-spring-boot.md index 7222b33382aab..922f4b8233437 100644 --- a/develop/dev-guide-sample-application-java-spring-boot.md +++ b/develop/dev-guide-sample-application-java-spring-boot.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Spring Boot summary: Learn how to connect to TiDB using Spring Boot. This tutorial gives Java sample code snippets that work with TiDB using Spring Boot. +aliases: ['/tidb/stable/dev-guide-sample-application-java-spring-boot/','/tidb/dev/dev-guide-sample-application-java-spring-boot/','/tidbcloud/dev-guide-sample-application-java-spring-boot/'] --- # Connect to TiDB with Spring Boot @@ -26,23 +27,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -142,7 +131,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `env.sh` file.
-
+
1. Run the following command to copy `env.sh.example` and rename it to `env.sh`: @@ -264,20 +253,12 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). - [The documentation of Spring Data JPA](https://spring.io/projects/spring-data-jpa) - [The documentation of Hibernate](https://hibernate.org/orm/documentation) -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. - Learn through the course for Java developers: [Working with TiDB from Java](https://eng.edu.pingcap.com/catalog/info/id:212). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nextjs.md b/develop/dev-guide-sample-application-nextjs.md index aa22bc13b525c..00b0590b56a78 100644 --- a/develop/dev-guide-sample-application-nextjs.md +++ b/develop/dev-guide-sample-application-nextjs.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with mysql2 in Next.js summary: This article describes how to build a CRUD application using TiDB and mysql2 in Next.js and provides a simple example code snippet. +aliases: ['/tidb/stable/dev-guide-sample-application-nextjs/','/tidb/dev/dev-guide-sample-application-nextjs/','/tidbcloud/dev-guide-sample-application-nextjs/'] --- # Connect to TiDB with mysql2 in Next.js @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -124,7 +113,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -278,19 +267,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). - For more details on how to build a complex application with ORM and Next.js, see [our Bookshop Demo](https://github.com/pingcap/tidb-prisma-vercel-demo). - Learn more usage of node-mysql2 driver from [the documentation of node-mysql2](https://sidorares.github.io/node-mysql2/docs/documentation). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nodejs-mysql2.md b/develop/dev-guide-sample-application-nodejs-mysql2.md index 87720b116e02c..f8987de80aff4 100644 --- a/develop/dev-guide-sample-application-nodejs-mysql2.md +++ b/develop/dev-guide-sample-application-nodejs-mysql2.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with node-mysql2 summary: Learn how to connect to TiDB using node-mysql2. This tutorial gives Node.js sample code snippets that work with TiDB using node-mysql2. +aliases: ['/tidb/stable/dev-guide-sample-application-nodejs-mysql2/','/tidb/dev/dev-guide-sample-application-nodejs-mysql2/','/tidbcloud/dev-guide-sample-application-nodejs-mysql2/'] --- # Connect to TiDB with node-mysql2 @@ -27,19 +28,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -155,7 +146,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -306,19 +297,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of node-mysql2 driver from [the documentation of node-mysql2](https://github.com/sidorares/node-mysql2#readme). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nodejs-mysqljs.md b/develop/dev-guide-sample-application-nodejs-mysqljs.md index 4d8a8a164c013..a7d2390856e79 100644 --- a/develop/dev-guide-sample-application-nodejs-mysqljs.md +++ b/develop/dev-guide-sample-application-nodejs-mysqljs.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with mysql.js summary: Learn how to connect to TiDB using mysql.js. This tutorial gives Node.js sample code snippets that work with TiDB using mysql.js. +aliases: ['/tidb/stable/dev-guide-sample-application-nodejs-mysqljs/','/tidb/dev/dev-guide-sample-application-nodejs-mysqljs/','/tidbcloud/dev-guide-sample-application-nodejs-mysqljs/'] --- # Connect to TiDB with mysql.js @@ -27,19 +28,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -155,7 +146,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -329,19 +320,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of mysql.js driver from [the documentation of mysql.js](https://github.com/mysqljs/mysql#readme). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nodejs-prisma.md b/develop/dev-guide-sample-application-nodejs-prisma.md index 8fb7e604496f5..919b865b0d8e2 100644 --- a/develop/dev-guide-sample-application-nodejs-prisma.md +++ b/develop/dev-guide-sample-application-nodejs-prisma.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Prisma summary: Learn how to connect to TiDB using Prisma. This tutorial gives Node.js sample code snippets that work with TiDB using Prisma. +aliases: ['/tidb/stable/dev-guide-sample-application-nodejs-prisma/','/tidb/dev/dev-guide-sample-application-nodejs-prisma/','/tidbcloud/dev-guide-sample-application-nodejs-prisma/'] --- # Connect to TiDB with Prisma @@ -27,19 +28,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -158,7 +149,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele ```
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -367,19 +358,11 @@ To check [referential integrity](https://en.wikipedia.org/wiki/Referential_integ ## Next steps - Learn more usage of the ORM framework Prisma driver from [the documentation of Prisma](https://www.prisma.io/docs). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nodejs-sequelize.md b/develop/dev-guide-sample-application-nodejs-sequelize.md index bf8c042bb1ebf..389bda7918c3e 100644 --- a/develop/dev-guide-sample-application-nodejs-sequelize.md +++ b/develop/dev-guide-sample-application-nodejs-sequelize.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Sequelize summary: Learn how to connect to TiDB using Sequelize. This tutorial gives Node.js sample code snippets that work with TiDB using Sequelize. +aliases: ['/tidb/stable/dev-guide-sample-application-nodejs-sequelize/','/tidb/dev/dev-guide-sample-application-nodejs-sequelize/','/tidbcloud/dev-guide-sample-application-nodejs-sequelize/'] --- # Connect to TiDB with Sequelize @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -151,7 +140,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -320,19 +309,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of the ORM framework Sequelize driver from [the documentation of Sequelize](https://sequelize.org/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-nodejs-typeorm.md b/develop/dev-guide-sample-application-nodejs-typeorm.md index 62f75858c3887..fdc73622ac5e0 100644 --- a/develop/dev-guide-sample-application-nodejs-typeorm.md +++ b/develop/dev-guide-sample-application-nodejs-typeorm.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with TypeORM summary: Learn how to connect to TiDB using TypeORM. This tutorial gives Node.js sample code snippets that work with TiDB using TypeORM. +aliases: ['/tidb/stable/dev-guide-sample-application-nodejs-typeorm/','/tidb/dev/dev-guide-sample-application-nodejs-typeorm/','/tidbcloud/dev-guide-sample-application-nodejs-typeorm/'] --- # Connect to TiDB with TypeORM @@ -27,19 +28,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -161,7 +152,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -366,19 +357,11 @@ For more information, refer to the [TypeORM FAQ](https://typeorm.io/relations-fa ## Next steps - Learn more usage of TypeORM from the [documentation of TypeORM](https://typeorm.io/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-django.md b/develop/dev-guide-sample-application-python-django.md index 60560dd16631a..2e8f56362ddec 100644 --- a/develop/dev-guide-sample-application-python-django.md +++ b/develop/dev-guide-sample-application-python-django.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Django summary: Learn how to connect to TiDB using Django. This tutorial gives Python sample code snippets that work with TiDB using Django. +aliases: ['/tidb/stable/dev-guide-sample-application-python-django/','/tidb/dev/dev-guide-sample-application-python-django/','/tidbcloud/dev-guide-sample-application-python-django/'] --- # Connect to TiDB with Django @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -159,7 +148,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -326,19 +315,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of Django from [the documentation of Django](https://www.djangoproject.com/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-mysql-connector.md b/develop/dev-guide-sample-application-python-mysql-connector.md index f4fd3202ac625..91bc1d8c63615 100644 --- a/develop/dev-guide-sample-application-python-mysql-connector.md +++ b/develop/dev-guide-sample-application-python-mysql-connector.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with MySQL Connector/Python summary: Learn how to connect to TiDB using MySQL Connector/Python. This tutorial gives Python sample code snippets that work with TiDB using MySQL Connector/Python. +aliases: ['/tidb/stable/dev-guide-sample-application-python-mysql-connector/','/tidb/dev/dev-guide-sample-application-python-mysql-connector/','/tidbcloud/dev-guide-sample-application-python-mysql-connector/'] --- # Connect to TiDB with MySQL Connector/Python @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -147,7 +136,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -277,19 +266,11 @@ Unless you need to write complex SQL statements, it is recommended to use [ORM]( ## Next steps - Learn more usage of mysql-connector-python from [the documentation of MySQL Connector/Python](https://dev.mysql.com/doc/connector-python/en/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-mysqlclient.md b/develop/dev-guide-sample-application-python-mysqlclient.md index 4ef648fa74432..a750fff3fab01 100644 --- a/develop/dev-guide-sample-application-python-mysqlclient.md +++ b/develop/dev-guide-sample-application-python-mysqlclient.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with mysqlclient summary: Learn how to connect to TiDB using mysqlclient. This tutorial gives Python sample code snippets that work with TiDB using mysqlclient. +aliases: ['/tidb/stable/dev-guide-sample-application-python-mysqlclient/','/tidb/dev/dev-guide-sample-application-python-mysqlclient/','/tidbcloud/dev-guide-sample-application-python-mysqlclient/'] --- # Connect to TiDB with mysqlclient @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -151,7 +140,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -279,19 +268,11 @@ Unless you need to write complex SQL statements, it is recommended to use [ORM]( ## Next steps - Learn more usage of `mysqlclient` from [the documentation of mysqlclient](https://mysqlclient.readthedocs.io/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-peewee.md b/develop/dev-guide-sample-application-python-peewee.md index 7ba54b1ae3253..b8975396bec9e 100644 --- a/develop/dev-guide-sample-application-python-peewee.md +++ b/develop/dev-guide-sample-application-python-peewee.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with peewee summary: Learn how to connect to TiDB using peewee. This tutorial gives Python sample code snippets that work with TiDB using peewee. +aliases: ['/tidb/stable/dev-guide-sample-application-python-peewee/','/tidb/dev/dev-guide-sample-application-python-peewee/','/tidbcloud/dev-guide-sample-application-python-peewee/'] --- # Connect to TiDB with peewee @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -151,7 +140,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -302,19 +291,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of peewee from [the documentation of peewee](https://docs.peewee-orm.com/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-pymysql.md b/develop/dev-guide-sample-application-python-pymysql.md index bb686aabbc68b..29a112ae97dde 100644 --- a/develop/dev-guide-sample-application-python-pymysql.md +++ b/develop/dev-guide-sample-application-python-pymysql.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with PyMySQL summary: Learn how to connect to TiDB using PyMySQL. This tutorial gives Python sample code snippets that work with TiDB using PyMySQL. +aliases: ['/tidb/stable/dev-guide-sample-application-python-pymysql/','/tidb/dev/dev-guide-sample-application-python-pymysql/','/tidbcloud/dev-guide-sample-application-python-pymysql/'] --- # Connect to TiDB with PyMySQL @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -147,7 +136,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -282,19 +271,11 @@ Unless you need to write complex SQL statements, it is recommended to use [ORM]( ## Next steps - Learn more usage of PyMySQL from [the documentation of PyMySQL](https://pymysql.readthedocs.io). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-python-sqlalchemy.md b/develop/dev-guide-sample-application-python-sqlalchemy.md index 9b9e42892051e..54805cfc7e795 100644 --- a/develop/dev-guide-sample-application-python-sqlalchemy.md +++ b/develop/dev-guide-sample-application-python-sqlalchemy.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with SQLAlchemy summary: Learn how to connect to TiDB using SQLAlchemy. This tutorial gives Python sample code snippets that work with TiDB using SQLAlchemy. +aliases: ['/tidb/stable/dev-guide-sample-application-python-sqlalchemy/','/tidb/dev/dev-guide-sample-application-python-sqlalchemy/','/tidbcloud/dev-guide-sample-application-python-sqlalchemy/'] --- # Connect to TiDB with SQLAlchemy @@ -25,23 +26,11 @@ To complete this tutorial, you need: - [Git](https://git-scm.com/downloads). - A TiDB cluster. - - **If you don't have a TiDB cluster, you can create one as follows:** - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -**If you don't have a TiDB cluster, you can create one as follows:** - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -157,7 +146,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -295,19 +284,11 @@ For more information, refer to [Delete data](/develop/dev-guide-delete-data.md). ## Next steps - Learn more usage of SQLAlchemy from [the documentation of SQLAlchemy](https://www.sqlalchemy.org/). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Single table reading](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-ruby-mysql2.md b/develop/dev-guide-sample-application-ruby-mysql2.md index db52a3bade9d4..e3304cdb1a617 100644 --- a/develop/dev-guide-sample-application-ruby-mysql2.md +++ b/develop/dev-guide-sample-application-ruby-mysql2.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with mysql2 summary: Learn how to connect to TiDB using Ruby mysql2. This tutorial gives Ruby sample code snippets that work with TiDB using mysql2 gem. +aliases: ['/tidb/stable/dev-guide-sample-application-ruby-mysql2/','/tidb/dev/dev-guide-sample-application-ruby-mysql2/','/tidbcloud/dev-guide-sample-application-ruby-mysql2/'] --- # Connect to TiDB with mysql2 @@ -28,19 +29,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -156,7 +147,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -307,19 +298,11 @@ While it is possible to specify the CA certificate path manually, doing so might ## Next steps - Learn more usage of mysql2 driver from [the documentation of mysql2](https://github.com/brianmario/mysql2#readme). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sample-application-ruby-rails.md b/develop/dev-guide-sample-application-ruby-rails.md index 60ce9c365ad3d..12bb58cbd99cc 100644 --- a/develop/dev-guide-sample-application-ruby-rails.md +++ b/develop/dev-guide-sample-application-ruby-rails.md @@ -1,6 +1,7 @@ --- title: Connect to TiDB with Rails framework and ActiveRecord ORM summary: Learn how to connect to TiDB using the Rails framework. This tutorial gives Ruby sample code snippets that work with TiDB using the Rails framework and ActiveRecord ORM. +aliases: ['/tidb/stable/dev-guide-sample-application-ruby-rails/','/tidb/dev/dev-guide-sample-application-ruby-rails/','/tidbcloud/dev-guide-sample-application-ruby-rails/'] --- # Connect to TiDB with Rails Framework and ActiveRecord ORM @@ -28,19 +29,9 @@ To complete this tutorial, you need: **If you don't have a TiDB cluster, you can create one as follows:** - - - (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. - Follow [Deploy a local test TiDB cluster](/quick-start-with-tidb.md#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](/production-deployment-using-tiup.md) to create a local cluster. - - - -- (Recommended) Follow [Creating a {{{ .starter }}} cluster](/develop/dev-guide-build-cluster-in-cloud.md) to create your own TiDB Cloud cluster. -- Follow [Deploy a local test TiDB cluster](https://docs.pingcap.com/tidb/stable/quick-start-with-tidb#deploy-a-local-test-cluster) or [Deploy a production TiDB cluster](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup) to create a local cluster. - - - ## Run the sample app to connect to TiDB This section demonstrates how to run the sample application code and connect to TiDB. @@ -140,7 +131,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele 6. Save the `.env` file.
-
+
1. Run the following command to copy `.env.example` and rename it to `.env`: @@ -281,19 +272,11 @@ While it is possible to specify the CA certificate path manually, this approach ## Next steps - Learn more usage of ActiveRecord ORM from [the documentation of ActiveRecord](https://guides.rubyonrails.org/active_record_basics.html). -- Learn the best practices for TiDB application development with the chapters in the [Developer guide](/develop/dev-guide-overview.md), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). +- Learn the best practices for TiDB application development with the chapters in the [Developer guide](https://docs.pingcap.com/developer/), such as: [Insert data](/develop/dev-guide-insert-data.md), [Update data](/develop/dev-guide-update-data.md), [Delete data](/develop/dev-guide-delete-data.md), [Query data](/develop/dev-guide-get-data-from-single-table.md), [Transactions](/develop/dev-guide-transaction-overview.md), and [SQL performance optimization](/develop/dev-guide-optimize-sql-overview.md). - Learn through the professional [TiDB developer courses](https://www.pingcap.com/education/) and earn [TiDB certifications](https://www.pingcap.com/education/certification/) after passing the exam. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-schema-design-overview.md b/develop/dev-guide-schema-design-overview.md index b83fb6d735f4c..7a116f99da6e4 100644 --- a/develop/dev-guide-schema-design-overview.md +++ b/develop/dev-guide-schema-design-overview.md @@ -1,6 +1,7 @@ --- title: TiDB Database Schema Design Overview summary: Learn the basics on TiDB database schema design. +aliases: ['/tidb/stable/dev-guide-schema-design-overview/','/tidb/dev/dev-guide-schema-design-overview/','/tidbcloud/dev-guide-schema-design-overview/'] --- # TiDB Database Schema Design Overview @@ -47,18 +48,8 @@ There are two common types of indexes: #### Specialized indexes - - To improve query performance of various user scenarios, TiDB provides you with some specialized types of indexes. For details of each type, see [Indexing and constraints](/basic-features.md#indexing-and-constraints). - - - - -To improve query performance of various user scenarios, TiDB provides you with some specialized types of indexes. For details of each type, see [Indexing and constraints](https://docs.pingcap.com/tidb/stable/basic-features#indexing-and-constraints). - - - ### Other supported logical objects TiDB supports the following logical objects at the same level as **table**: @@ -69,18 +60,8 @@ TiDB supports the following logical objects at the same level as **table**: ## Access Control - - TiDB supports both user-based and role-based access control. To allow users to view, modify, or delete data objects and data schemas, you can either grant [privileges](/privilege-management.md) to [users](/user-account-management.md) directly or grant [privileges](/privilege-management.md) to users through [roles](/role-based-access-control.md). - - - - -TiDB supports both user-based and role-based access control. To allow users to view, modify, or delete data objects and data schemas, you can either grant [privileges](https://docs.pingcap.com/tidb/stable/privilege-management) to [users](https://docs.pingcap.com/tidb/stable/user-account-management) directly or grant [privileges](https://docs.pingcap.com/tidb/stable/privilege-management) to users through [roles](https://docs.pingcap.com/tidb/stable/role-based-access-control). - - - ## Database schema changes As a best practice, it is recommended that you use a [MySQL client](https://dev.mysql.com/doc/refman/8.0/en/mysql.html) or a GUI client instead of a driver or ORM to execute database schema changes. @@ -91,14 +72,6 @@ For more information, see [TiDB Limitations](/tidb-limitations.md). ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-sql-development-specification.md b/develop/dev-guide-sql-development-specification.md index c19f431c97150..400080c4d0f5a 100644 --- a/develop/dev-guide-sql-development-specification.md +++ b/develop/dev-guide-sql-development-specification.md @@ -1,6 +1,7 @@ --- title: SQL Development Specifications summary: Learn about the SQL development specifications for TiDB. +aliases: ['/tidb/stable/dev-guide-sql-development-specification/','/tidb/dev/dev-guide-sql-development-specification/','/tidbcloud/dev-guide-sql-development-specification/'] --- # SQL Development Specifications @@ -55,14 +56,6 @@ This document introduces some general development specifications for using SQL. ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-third-party-support.md b/develop/dev-guide-third-party-support.md index ae83c8977ed58..0aac94efcdb0b 100644 --- a/develop/dev-guide-third-party-support.md +++ b/develop/dev-guide-third-party-support.md @@ -1,6 +1,7 @@ --- title: Third-Party Tools Supported by TiDB summary: Learn about third-party tools supported by TiDB. +aliases: ['/tidb/stable/dev-guide-third-party-support/','/tidb/dev/dev-guide-third-party-support/','/tidbcloud/dev-guide-third-party-support/'] --- # Third-Party Tools Supported by TiDB @@ -194,14 +195,6 @@ If you encounter problems when connecting to TiDB using the tools listed in this ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-third-party-tools-compatibility.md b/develop/dev-guide-third-party-tools-compatibility.md index 8e6c5f0bbf1ad..2b5fdfe7ce2bc 100644 --- a/develop/dev-guide-third-party-tools-compatibility.md +++ b/develop/dev-guide-third-party-tools-compatibility.md @@ -1,6 +1,7 @@ --- title: Known Incompatibility Issues with Third-Party Tools summary: Describes TiDB compatibility issues with third-party tools found during testing. +aliases: ['/tidb/stable/dev-guide-third-party-tools-compatibility/','/tidb/dev/dev-guide-third-party-tools-compatibility/','/tidbcloud/dev-guide-third-party-tools-compatibility/'] --- # Known Incompatibility Issues with Third-Party Tools @@ -40,17 +41,10 @@ MySQL maintains a series of [server status variables starting with `Com_`](https **Way to avoid** - +Do not use these variables. One common scenario is monitoring. TiDB is well observable and does not require querying from server status variables. For more information about monitoring services, refer to the following documentation: -Do not use these variables. One common scenario is monitoring. TiDB is well observable and does not require querying from server status variables. For custom monitoring tools, refer to [TiDB Monitoring Framework Overview](/tidb-monitoring-framework.md). - - - - - -Do not use these variables. One common scenario is monitoring. TiDB Cloud is well observable and does not require querying from server status variables. For more information about TiDB Cloud monitoring services, refer to [Monitor a TiDB Cluster](/tidb-cloud/monitor-tidb-cluster.md). - - +- TiDB Cloud documentation: [Monitor a TiDB Cluster](/tidb-cloud/monitor-tidb-cluster.md). +- TiDB Self-Managed documentation: [TiDB Monitoring Framework Overview](/tidb-monitoring-framework.md). ### TiDB distinguishes between `TIMESTAMP` and `DATETIME` in error messages @@ -60,18 +54,8 @@ TiDB error messages distinguish between `TIMESTAMP` and `DATETIME`, while MySQL **Way to avoid** - - Do not use the error messages for string matching. Instead, use [Error Codes](/error-codes.md) for troubleshooting. - - - - -Do not use the error messages for string matching. Instead, use [Error Codes](https://docs.pingcap.com/tidb/stable/error-codes) for troubleshooting. - - - ### TiDB does not support the `CHECK TABLE` statement **Description** @@ -234,14 +218,6 @@ To allow the removal of the `AUTO_INCREMENT` attribute, set `@@tidb_allow_remove ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-tidb-basics.md b/develop/dev-guide-tidb-basics.md new file mode 100644 index 0000000000000..d5f8f10015c77 --- /dev/null +++ b/develop/dev-guide-tidb-basics.md @@ -0,0 +1,46 @@ +--- +title: TiDB basics for Developers +summary: Learn the basics of TiDB for developers, such as transaction mechanisms and how applications interact with TiDB. +--- + +# TiDB basics for Developers + +Before you start working with TiDB, you need to understand some important mechanisms of how TiDB works: + +- Read the [TiDB Transaction Overview](/transaction-overview.md) to understand how transactions work in TiDB, or check out the [Transaction Notes for Application Developers](/develop/dev-guide-transaction-overview.md) to learn about transaction knowledge required for application development. +- Understand [the way applications interact with TiDB](#the-way-applications-interact-with-tidb). +- To learn core components and concepts of building up the distributed database TiDB and TiDB Cloud, refer to the free online course [Introduction to TiDB](https://eng.edu.pingcap.com/catalog/info/id:203/?utm_source=docs-dev-guide). + +## TiDB transaction mechanisms + +TiDB supports distributed transactions and offers both [optimistic transaction](/optimistic-transaction.md) and [pessimistic transaction](/pessimistic-transaction.md) modes. The current version of TiDB uses the **pessimistic transaction** mode by default, which allows you to transact with TiDB as you would with a traditional monolithic database (for example, MySQL). + +You can start a transaction using [`BEGIN`](/sql-statements/sql-statement-begin.md), explicitly specify a **pessimistic transaction** using `BEGIN PESSIMISTIC`, or explicitly specify an **optimistic transaction** using `BEGIN OPTIMISTIC`. After that, you can either commit ([`COMMIT`](/sql-statements/sql-statement-commit.md)) or roll back ([`ROLLBACK`](/sql-statements/sql-statement-rollback.md)) the transaction. + +TiDB guarantees atomicity for all statements between the start of `BEGIN` and the end of `COMMIT` or `ROLLBACK`, that is, all statements that are executed during this period either succeed or fail as a whole. This is used to ensure data consistency you need for application development. + +If you are not sure what an **optimistic transaction** is, do **_NOT_** use it yet. Because **optimistic transactions** require that the application can correctly handle [all errors](https://docs.pingcap.com/tidb/v8.5/error-codes/) returned by the `COMMIT` statement. If you are not sure how your application handles them, use a **pessimistic transaction** instead. + +## The way applications interact with TiDB + +TiDB is highly compatible with the MySQL protocol and supports [most MySQL syntax and features](/mysql-compatibility.md), so most MySQL connection libraries are compatible with TiDB. If your application framework or language does not have an official adaptation from PingCAP, it is recommended that you use MySQL's client libraries. More and more third-party libraries are actively supporting TiDB's different features. + +Since TiDB is compatible with the MySQL protocol and MySQL syntax, most of the ORMs that support MySQL are also compatible with TiDB. + +## Read more + +- [Quick Start](/develop/dev-guide-build-cluster-in-cloud.md) +- [Choose Driver or ORM](/develop/dev-guide-choose-driver-or-orm.md) +- [Connect to TiDB](https://docs.pingcap.com/tidb/v8.5/dev-guide-connect-to-tidb/) +- [Database Schema Design](/develop/dev-guide-schema-design-overview.md) +- [Write Data](/develop/dev-guide-insert-data.md) +- [Read Data](/develop/dev-guide-get-data-from-single-table.md) +- [Transaction](/develop/dev-guide-transaction-overview.md) +- [Optimize](/develop/dev-guide-optimize-sql-overview.md) +- [Example Applications](/develop/dev-guide-sample-application-java-spring-boot.md) + +## Need help? + +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-tidb-crud-sql.md b/develop/dev-guide-tidb-crud-sql.md index ec4bc0e0122c0..01e9aafb708b2 100644 --- a/develop/dev-guide-tidb-crud-sql.md +++ b/develop/dev-guide-tidb-crud-sql.md @@ -1,6 +1,7 @@ --- title: CRUD SQL in TiDB summary: A brief introduction to TiDB's CRUD SQL. +aliases: ['/tidb/stable/dev-guide-tidb-crud-sql/','/tidb/dev/dev-guide-tidb-crud-sql/','/tidbcloud/dev-guide-tidb-crud-sql/'] --- # CRUD SQL in TiDB @@ -9,7 +10,7 @@ This document briefly introduces how to use TiDB's CRUD SQL. ## Before you start -Please make sure you are connected to a TiDB cluster. If not, refer to [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md#step-1-create-a-tidb-cloud-cluster) to create a {{{ .starter }}} cluster. +Please make sure you are connected to a TiDB cluster. If not, refer to [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md#step-1-create-a-tidb-cloud-cluster) to create a {{{ .starter }}} cluster. ## Explore SQL with TiDB @@ -104,14 +105,6 @@ SELECT * FROM person WHERE id < 5; ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-timeouts-in-tidb.md b/develop/dev-guide-timeouts-in-tidb.md index bd2c3828e7d60..9c47b37ec5f3f 100644 --- a/develop/dev-guide-timeouts-in-tidb.md +++ b/develop/dev-guide-timeouts-in-tidb.md @@ -1,6 +1,7 @@ --- title: Timeouts in TiDB summary: Learn about timeouts in TiDB, and solutions for troubleshooting errors. +aliases: ['/tidb/stable/dev-guide-timeouts-in-tidb/','/tidb/dev/dev-guide-timeouts-in-tidb/','/tidbcloud/dev-guide-timeouts-in-tidb/'] --- # Timeouts in TiDB @@ -26,8 +27,6 @@ If you need longer read time temporarily in some cases, you can increase the ret Note that the system variable configuration takes effect globally and immediately. Increasing its value will increase the life time of all existing snapshots, and decreasing it will immediately shorten the life time of all snapshots. Too many MVCC versions will impact the performance of the TiDB cluster. So you need to change this variable back to the previous setting in time. - - > **Tip:** > > Specifically, when Dumpling is exporting data from TiDB (less than 1 TB), if the TiDB version is v4.0.0 or later and Dumpling can access the PD address and the [`INFORMATION_SCHEMA.CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md) table of the TiDB cluster, Dumpling automatically adjusts the GC safe point to block GC without affecting the original cluster. @@ -41,25 +40,6 @@ Note that the system variable configuration takes effect globally and immediatel > > For more details, see [Manually set the TiDB GC time](/dumpling-overview.md#manually-set-the-tidb-gc-time). - - - - -> **Tip:** -> -> Specifically, when Dumpling is exporting data from TiDB (less than 1 TB), if the TiDB version is later than or equal to v4.0.0 and Dumpling can access the PD address of the TiDB cluster, Dumpling automatically extends the GC time without affecting the original cluster. -> -> However, in either of the following scenarios, Dumpling cannot automatically adjust the GC time: -> -> - The data size is very large (more than 1 TB). -> - Dumpling cannot connect directly to PD, for example, the TiDB cluster is on TiDB Cloud or on Kubernetes that is separated from Dumpling. -> -> In such scenarios, you must manually extend the GC time in advance to avoid export failure due to GC during the export process. -> -> For more details, see [Manually set the TiDB GC time](https://docs.pingcap.com/tidb/stable/dumpling-overview#manually-set-the-tidb-gc-time). - - - For more information about GC, see [GC Overview](/garbage-collection-overview.md). ## Transaction timeout @@ -76,26 +56,12 @@ TiDB also provides a system variable (`max_execution_time`, `0` by default, indi ## JDBC query timeout - - Starting from v6.1.0, when the [`enable-global-kill`](/tidb-configuration-file.md#enable-global-kill-new-in-v610) configuration item is set to its default value `true`, you can use the `setQueryTimeout()` method provided by MySQL JDBC to control the query timeout. > **Note:** > > When your TiDB version is earlier than v6.1.0 or [`enable-global-kill`](/tidb-configuration-file.md#enable-global-kill-new-in-v610) is set to `false`, `setQueryTimeout()` does not work for TiDB. This is because the client sends a `KILL` command to the database when it detects the query timeout. However, because the TiDB service is load balanced, TiDB does not execute the `KILL` command to avoid termination of the connection on a wrong TiDB node. In such cases, you can use `max_execution_time` to control query timeout. - - - - -Starting from v6.1.0, when the [`enable-global-kill`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#enable-global-kill-new-in-v610) configuration item is set to its default value `true`, you can use the `setQueryTimeout()` method provided by MySQL JDBC to control the query timeout. - -> **Note:** -> -> When your TiDB version is earlier than v6.1.0 or [`enable-global-kill`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#enable-global-kill-new-in-v610) is set to `false`, `setQueryTimeout()` does not work for TiDB. This is because the client sends a `KILL` command to the database when it detects the query timeout. However, because the TiDB service is load balanced, TiDB does not execute the `KILL` command to avoid termination of the connection on a wrong TiDB node. In such cases, you can use `max_execution_time` to control query timeout. - - - TiDB provides the following MySQL-compatible timeout control parameters. - **wait_timeout**, controls the non-interactive idle timeout for the connection to Java applications. Since TiDB v5.4, the default value of `wait_timeout` is `28800` seconds, which is 8 hours. For TiDB versions earlier than v5.4, the default value is `0`, which means the timeout is unlimited. @@ -109,14 +75,6 @@ However, in a real production environment, idle connections and indefinitely exe ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-transaction-overview.md b/develop/dev-guide-transaction-overview.md index aa32c042aa499..7fdd3b8bd5575 100644 --- a/develop/dev-guide-transaction-overview.md +++ b/develop/dev-guide-transaction-overview.md @@ -1,6 +1,7 @@ --- title: Transaction overview summary: A brief introduction to transactions in TiDB. +aliases: ['/tidb/stable/dev-guide-transaction-overview/','/tidb/dev/dev-guide-transaction-overview/','/tidbcloud/dev-guide-transaction-overview/'] --- # Transaction overview @@ -162,14 +163,6 @@ TiDB implements Snapshot Isolation (SI) level consistency, also known as "repeat ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-transaction-restraints.md b/develop/dev-guide-transaction-restraints.md index 997dc4f36e67c..f4e043ff46191 100644 --- a/develop/dev-guide-transaction-restraints.md +++ b/develop/dev-guide-transaction-restraints.md @@ -1,6 +1,7 @@ --- title: Transaction Restraints summary: Learn about transaction restraints in TiDB. +aliases: ['/tidb/stable/dev-guide-transaction-restraints/','/tidb/dev/dev-guide-transaction-restraints/','/tidbcloud/dev-guide-transaction-restraints/'] --- # Transaction Restraints @@ -731,14 +732,6 @@ This is a known incompatibility issue with MySQL. You can solve this issue by us ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-transaction-troubleshoot.md b/develop/dev-guide-transaction-troubleshoot.md index 000703d0c2679..840e476fc6070 100644 --- a/develop/dev-guide-transaction-troubleshoot.md +++ b/develop/dev-guide-transaction-troubleshoot.md @@ -1,6 +1,7 @@ --- title: Handle Transaction Errors summary: Learn about how to handle transaction errors, such as deadlocks and application retry errors. +aliases: ['/tidb/stable/dev-guide-transaction-troubleshoot/','/tidb/dev/dev-guide-transaction-troubleshoot/','/tidbcloud/dev-guide-transaction-troubleshoot/'] --- # Handle Transaction Errors @@ -91,18 +92,8 @@ Your retry logic must follow the following rules: - `Error 9007: Write conflict`: Write conflict error, usually caused by multiple transactions modifying the same row of data when the optimistic transaction mode is used. - `COMMIT` the transaction at the end of the try block. - - For more information about error codes, see [Error Codes and Troubleshooting](/error-codes.md). - - - - -For more information about error codes, see [Error Codes and Troubleshooting](https://docs.pingcap.com/tidb/stable/error-codes). - - - ```python while True: n++ @@ -129,42 +120,14 @@ while True: > > If you frequently encounter `Error 9007: Write conflict`, you may need to check your schema design and the data access patterns of your workload to find the root cause of the conflict and try to avoid conflicts by a better design. - - For information about how to troubleshoot and resolve transaction conflicts, see [Troubleshoot Lock Conflicts](/troubleshoot-lock-conflicts.md). - - - - -For information about how to troubleshoot and resolve transaction conflicts, see [Troubleshoot Lock Conflicts](https://docs.pingcap.com/tidb/stable/troubleshoot-lock-conflicts). - - - ## See also - - - [Troubleshoot Write Conflicts in Optimistic Transactions](/troubleshoot-write-conflicts.md) - - - - -- [Troubleshoot Write Conflicts in Optimistic Transactions](https://docs.pingcap.com/tidb/stable/troubleshoot-write-conflicts) - - - ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-troubleshoot-overview.md b/develop/dev-guide-troubleshoot-overview.md index 77428c7aaea03..1faa05406f8b6 100644 --- a/develop/dev-guide-troubleshoot-overview.md +++ b/develop/dev-guide-troubleshoot-overview.md @@ -1,6 +1,7 @@ --- title: SQL or Transaction Issues summary: Learn how to troubleshoot SQL or transaction issues that might occur during application development. +aliases: ['/tidb/stable/dev-guide-troubleshoot-overview/','/tidb/dev/dev-guide-troubleshoot-overview/','/tidbcloud/dev-guide-troubleshoot-overview/'] --- # SQL or Transaction Issues @@ -11,22 +12,27 @@ This document introduces problems that may occur during application development If you want to improve SQL query performance, follow the instructions in [SQL Performance Tuning](/develop/dev-guide-optimize-sql-overview.md) to solve performance problems such as full table scans and missing indexes. - - If you still have performance issues, see the following documents: -- [Analyze Slow Queries](/analyze-slow-queries.md) -- [Identify Expensive Queries Using Top SQL](/dashboard/top-sql.md) + -If you have questions about SQL operations, see [SQL FAQs](/faq/sql-faq.md). +
- +- [Slow Queries](/tidb-cloud/tune-performance.md#slow-query) +- [Statement Analysis](/tidb-cloud/tune-performance.md#statement-analysis) +- [Key Visualizer](/tidb-cloud/tune-performance.md#key-visualizer) - +
-If you have questions about SQL operations, see [SQL FAQs](https://docs.pingcap.com/tidb/stable/sql-faq). +
- +- [Analyze Slow Queries](/analyze-slow-queries.md) +- [Identify Expensive Queries Using Top SQL](/dashboard/top-sql.md) + +
+
+ +If you have questions about SQL operations, see [SQL FAQs](/faq/sql-faq.md). ## Troubleshoot transaction issues @@ -35,24 +41,11 @@ See [Handle transaction errors](/develop/dev-guide-transaction-troubleshoot.md). ## See also - [Unsupported features](/mysql-compatibility.md#unsupported-features) - - - -- [Cluster Management FAQs](/faq/manage-cluster-faq.md) -- [TiDB FAQs](/faq/tidb-faq.md) - - +- [FAQs for TiDB Cloud](/tidb-cloud/tidb-cloud-faq.md) +- [FAQs for TiDB Self-Managed](/faq/faq-overview.md) ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-unique-serial-number-generation.md b/develop/dev-guide-unique-serial-number-generation.md index aa4569dfa43b4..70b0a78aab587 100644 --- a/develop/dev-guide-unique-serial-number-generation.md +++ b/develop/dev-guide-unique-serial-number-generation.md @@ -1,6 +1,7 @@ --- title: Unique Serial Number Generation summary: Unique serial number generation solution for developers who generate their own unique IDs. +aliases: ['/tidb/stable/dev-guide-unique-serial-number-generation/','/tidb/dev/dev-guide-unique-serial-number-generation/','/tidbcloud/dev-guide-unique-serial-number-generation/'] --- # Unique Serial Number Generation @@ -52,14 +53,6 @@ Finally, note that the IDs generated by the above two solutions are not random e ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-unstable-result-set.md b/develop/dev-guide-unstable-result-set.md index 2b166f8b75d37..5414e48da6dd8 100644 --- a/develop/dev-guide-unstable-result-set.md +++ b/develop/dev-guide-unstable-result-set.md @@ -1,6 +1,7 @@ --- title: Unstable Result Set summary: Learn how to handle the error of an unstable result set. +aliases: ['/tidb/stable/dev-guide-unstable-result-set/','/tidb/dev/dev-guide-unstable-result-set/','/tidbcloud/dev-guide-unstable-result-set/'] --- # Unstable Result Set @@ -237,14 +238,6 @@ The returned result is related to the distribution of data on the storage node ( ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-update-data.md b/develop/dev-guide-update-data.md index d0540b462296f..427aea2e0792f 100644 --- a/develop/dev-guide-update-data.md +++ b/develop/dev-guide-update-data.md @@ -1,6 +1,7 @@ --- title: Update Data summary: Learn about how to update data and batch update data. +aliases: ['/tidb/stable/dev-guide-update-data/','/tidb/dev/dev-guide-update-data/','/tidbcloud/dev-guide-update-data/'] --- # Update Data @@ -14,7 +15,7 @@ This document describes how to use the following SQL statements to update the da Before reading this document, you need to prepare the following: -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md). - Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md), [Create a Database](/develop/dev-guide-create-database.md), [Create a Table](/develop/dev-guide-create-table.md), and [Create Secondary Indexes](/develop/dev-guide-create-secondary-indexes.md). - If you want to `UPDATE` data, you need to [insert data](/develop/dev-guide-insert-data.md) first. @@ -50,19 +51,8 @@ For detailed information, see [UPDATE syntax](/sql-statements/sql-statement-upda The following are some best practices for updating data: - Always specify the `WHERE` clause in the `UPDATE` statement. If the `UPDATE` statement does not have a `WHERE` clause, TiDB will update **_ALL ROWS_** in the table. - - - - Use [bulk-update](#bulk-update) when you need to update a large number of rows (for example, more than ten thousand). Because TiDB limits the size of a single transaction ([txn-total-size-limit](/tidb-configuration-file.md#txn-total-size-limit), 100 MB by default), too many data updates at once will result in holding locks for too long ([pessimistic transactions](/pessimistic-transaction.md)) or cause conflicts ([optimistic transactions](/optimistic-transaction.md)). - - - - -- Use [bulk-update](#bulk-update) when you need to update a large number of rows (for example, more than ten thousand). Because TiDB limits the size of a single transaction to 100 MB by default, too many data updates at once will result in holding locks for too long ([pessimistic transactions](/pessimistic-transaction.md)) or cause conflicts ([optimistic transactions](/optimistic-transaction.md)). - - - ### `UPDATE` example Suppose an author changes her name to **Helen Haruki**. You need to change the [authors](/develop/dev-guide-bookshop-schema-design.md#authors-table) table. Assume that her unique `id` is **1**, and the filter should be: `id = 1`. @@ -163,18 +153,8 @@ VALUES (?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE `score` = ?, `rated_at` = NOW()" When you need to update multiple rows of data in a table, you can [use `INSERT ON DUPLICATE KEY UPDATE`](#use-insert-on-duplicate-key-update) with the `WHERE` clause to filter the data that needs to be updated. - - However, if you need to update a large number of rows (for example, more than ten thousand), it is recommended that you update the data iteratively, that is, updating only a portion of the data at each iteration until the update is complete. This is because TiDB limits the size of a single transaction ([txn-total-size-limit](/tidb-configuration-file.md#txn-total-size-limit), 100 MB by default). Too many data updates at once will result in holding locks for too long ([pessimistic transactions](/pessimistic-transaction.md), or causing conflicts ([optimistic transactions](/optimistic-transaction.md)). You can use a loop in your program or script to complete the operation. - - - - -However, if you need to update a large number of rows (for example, more than ten thousand), it is recommended that you update the data iteratively, that is, updating only a portion of the data at each iteration until the update is complete. This is because TiDB limits the size of a single transaction to 100 MB by default. Too many data updates at once will result in holding locks for too long ([pessimistic transactions](/pessimistic-transaction.md), or causing conflicts ([optimistic transactions](/optimistic-transaction.md)). You can use a loop in your program or script to complete the operation. - - - This section provides examples of writing scripts to handle iterative updates. This example shows how a combination of `SELECT` and `UPDATE` should be done to complete a bulk-update. ### Write bulk-update loop @@ -450,14 +430,6 @@ In each iteration, `SELECT` queries in order of the primary key. It selects prim ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-common-table-expression.md b/develop/dev-guide-use-common-table-expression.md index 5ba101523e59e..9edba061697a8 100644 --- a/develop/dev-guide-use-common-table-expression.md +++ b/develop/dev-guide-use-common-table-expression.md @@ -1,6 +1,7 @@ --- title: Common Table Expression summary: Learn the CTE feature of TiDB, which help you write SQL statements more efficiently. +aliases: ['/tidb/stable/dev-guide-use-common-table-expression/','/tidb/dev/dev-guide-use-common-table-expression/','/tidbcloud/dev-guide-use-common-table-expression/'] --- # Common Table Expression @@ -217,14 +218,6 @@ The result is as follows: ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-follower-read.md b/develop/dev-guide-use-follower-read.md index 611730161374e..6eaf8fa7f0db4 100644 --- a/develop/dev-guide-use-follower-read.md +++ b/develop/dev-guide-use-follower-read.md @@ -1,6 +1,7 @@ --- title: Follower Read summary: Learn how to use Follower Read to optimize query performance. +aliases: ['/tidb/stable/dev-guide-use-follower-read/','/tidb/dev/dev-guide-use-follower-read/','/tidbcloud/dev-guide-use-follower-read/'] --- # Follower Read @@ -17,21 +18,12 @@ By default, TiDB only reads and writes data on the leader of the same Region. Wh ### Reduce read hotspots - +You can visually analyze whether your application has a hotspot Region by doing one of the following: -You can visually analyze whether your application has a hotspot Region on the [TiDB Dashboard Key Visualizer Page](/dashboard/dashboard-key-visualizer.md). You can check whether a read hotspot occurs by selecting the "metrics selection box" to `Read (bytes)` or `Read (keys)`. +- TiDB Cloud: navigate to the [Key Visualizer in the TiDB Cloud console](/tidb-cloud/tune-performance.md#key-visualizer), and then check whether a read hotspot occurs by selecting the "metrics selection box" to `Read (bytes)` or `Read (keys)`. +- TiDB Self-Managed: navigate to the [Key Visualizer in TiDB Dashboard](/dashboard/dashboard-key-visualizer.md), and then check whether a read hotspot occurs by selecting the "metrics selection box" to `Read (bytes)` or `Read (keys)`. -For more information about handling hotspot, see [TiDB Hotspot Problem Handling](/troubleshoot-hot-spot-issues.md). - - - - - -You can visually analyze whether your application has a hotspot Region on the [TiDB Cloud Key Visualizer Page](/tidb-cloud/tune-performance.md#key-visualizer). You can check whether a read hotspot occurs by selecting the "metrics selection box" to `Read (bytes)` or `Read (keys)`. - -For more information about handling hotspot, see [TiDB Hotspot Problem Handling](https://docs.pingcap.com/tidb/stable/troubleshoot-hot-spot-issues). - - +If hotspot issues do exist, you can troubleshoot them by referring to [Handle TiDB Hotspot Issues](/troubleshoot-hot-spot-issues.md), which helps to avoid hotspot generation at the application level. If read hotspots are unavoidable or the changing cost is very high, you can try using the Follower Read feature to better load the balance of reading requests to the follower Region. @@ -146,31 +138,12 @@ public static class AuthorDAO { ## Read more - [Follower Read](/follower-read.md) - - - - [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md) -- [TiDB Dashboard - Key Visualizer Page](/dashboard/dashboard-key-visualizer.md) - - - - - -- [Troubleshoot Hotspot Issues](https://docs.pingcap.com/tidb/stable/troubleshoot-hot-spot-issues) -- [TiDB Cloud Key Visualizer Page](/tidb-cloud/tune-performance.md#key-visualizer) - - +- [Key Visualizer in the TiDB Cloud console](/tidb-cloud/tune-performance.md#key-visualizer) +- [Key Visualizer in TiDB Dashboard for TiDB Self-Managed](/dashboard/dashboard-key-visualizer.md) ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-stale-read.md b/develop/dev-guide-use-stale-read.md index 9f374c5ac1a7a..e92e988b6ae89 100644 --- a/develop/dev-guide-use-stale-read.md +++ b/develop/dev-guide-use-stale-read.md @@ -1,6 +1,7 @@ --- title: Stale Read summary: Learn how to use Stale Read to accelerate queries under certain conditions. +aliases: ['/tidb/stable/dev-guide-use-stale-read/','/tidb/dev/dev-guide-use-stale-read/','/tidbcloud/dev-guide-use-stale-read/'] --- # Stale Read @@ -500,14 +501,6 @@ public static class StaleReadHelper{ ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-subqueries.md b/develop/dev-guide-use-subqueries.md index 9e6fe2c86b23d..7c775f38e7f6f 100644 --- a/develop/dev-guide-use-subqueries.md +++ b/develop/dev-guide-use-subqueries.md @@ -1,6 +1,7 @@ --- title: Subquery summary: Learn how to use subquery in TiDB. +aliases: ['/tidb/stable/dev-guide-use-subqueries/','/tidb/dev/dev-guide-use-subqueries/','/tidbcloud/dev-guide-use-subqueries/'] --- # Subquery @@ -131,14 +132,6 @@ As a best practice, in actual development, it is recommended to avoid querying t ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-temporary-tables.md b/develop/dev-guide-use-temporary-tables.md index f74168012decc..4ff583b2f7979 100644 --- a/develop/dev-guide-use-temporary-tables.md +++ b/develop/dev-guide-use-temporary-tables.md @@ -1,6 +1,7 @@ --- title: Temporary Tables summary: Learn how to create, view, query, and delete temporary tables. +aliases: ['/tidb/stable/dev-guide-use-temporary-tables/','/tidb/dev/dev-guide-use-temporary-tables/','/tidbcloud/dev-guide-use-temporary-tables/'] --- # Temporary Tables @@ -260,14 +261,6 @@ For limitations of temporary tables in TiDB, see [Compatibility restrictions wit ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) diff --git a/develop/dev-guide-use-views.md b/develop/dev-guide-use-views.md index 83f30d2141cbc..6ebb09088e9cf 100644 --- a/develop/dev-guide-use-views.md +++ b/develop/dev-guide-use-views.md @@ -1,6 +1,7 @@ --- title: Views summary: Learn how to use views in TiDB. +aliases: ['/tidb/stable/dev-guide-use-views/','/tidb/dev/dev-guide-use-views/','/tidbcloud/dev-guide-use-views/'] --- # Views @@ -125,14 +126,6 @@ For limitations of views in TiDB, see [Limitations of Views](/views.md#limitatio ## Need help? - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](/support.md). - - - - - -Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - - \ No newline at end of file +- Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs). +- [Submit a support ticket for TiDB Cloud](https://tidb.support.pingcap.com/servicedesk/customer/portals) +- [Submit a support ticket for TiDB Self-Managed](/support.md) \ No newline at end of file diff --git a/develop/dev-guide-vector-search.md b/develop/dev-guide-vector-search.md new file mode 100644 index 0000000000000..c17526875cc46 --- /dev/null +++ b/develop/dev-guide-vector-search.md @@ -0,0 +1,61 @@ +--- +title: Vector Search +summary: Introduce the vector search feature in TiDB for developers, including concepts, tutorials, integrations, and reference documentation. +--- + +# Vector Search + +[Vector search](/ai/concepts/vector-search-overview.md) enables semantic similarity searches across diverse data types such as documents, images, audio, and video. By leveraging your MySQL expertise, you can build scalable AI applications with advanced search functionality. + +## Get started + +To get started with TiDB vector search, refer to the following tutorials: + +- [Get Started via Python](/ai/quickstart-via-python.md) +- [Get Started via SQL](/ai/quickstart-via-sql.md) + +## Auto Embedding + +The Auto Embedding feature lets you perform vector searches directly with plain text, without providing your own vectors. With this feature, you can insert text data directly and perform semantic searches using text queries, while TiDB automatically converts the text into vectors behind the scenes. + +Currently, TiDB supports various embedding models, such as Amazon Titan, Cohere, Jina AI, OpenAI, Gemini, Hugging Face, and NVIDIA NIM. You can choose the one that best fits your needs. For more information, see [Auto Embedding Overview](/ai/integrations/vector-search-auto-embedding-overview.md). + +## Integrations + +To accelerate your development, you can integrate TiDB vector search with popular AI frameworks (such as LlamaIndex and LangChain), embedding services (such as Jina AI), and ORM libraries (such as SQLAlchemy, Peewee, and Django ORM). You can choose the one that best fits your needs. + +For more information, see [Vector Search Integration Overview](/ai/integrations/vector-search-integration-overview.md). + +## Text search + +Unlike vector search, which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. + +To improve the retrieval quality in RAG scenarios, you can combine vector search with full-text search. + +| Scenario | Documentation | +|---------------|-------------| +| Perform keyword-based search using SQL. | [Full-Text Search with SQL](/ai/guides/vector-search-full-text-search-sql.md) | +| Implement full-text search in Python applications. | [Full-Text Search with Python](/ai/guides/vector-search-full-text-search-python.md) | +| Combine vector and full-text search for better results. | [Hybrid Search](/ai/guides/vector-search-hybrid-search.md) | + +## Improve performance + +To optimize the performance of your vector search queries, you can follow a series of best practices, such as adding vector indexes, monitoring index build progress, reducing dimensions, excluding vector columns, and warming up indexes. + +For more information about these best practices, see [Improve Vector Search Performance](/ai/reference/vector-search-improve-performance.md). + +## Limitations + +Before implementing vector search, be aware of the following limitations: + +- Maximum 16383 dimensions per vector +- Vector columns cannot be primary keys, unique indexes, or partition keys +- No direct casting between vector and other data types (use string as intermediate) + +For a complete list, see [Vector Search Limitations](/ai/reference/vector-search-limitations.md). + +## Reference + +- [Vector Data Types](/ai/reference/vector-search-data-types.md) +- [Vector Functions and Operators](/ai/reference/vector-search-functions-and-operators.md) +- [Vector Index](/ai/reference/vector-search-index.md) diff --git a/tidb-cloud/dev-guide-wordpress.md b/develop/dev-guide-wordpress.md similarity index 97% rename from tidb-cloud/dev-guide-wordpress.md rename to develop/dev-guide-wordpress.md index 3cfdf6c81d9d6..1f37e66bbc400 100644 --- a/tidb-cloud/dev-guide-wordpress.md +++ b/develop/dev-guide-wordpress.md @@ -1,9 +1,10 @@ --- -title: Connect to {{{ .starter }}} with WordPress +title: Integrate WordPress with {{{ .starter }}} summary: Learn how to use {{{ .starter }}} to run WordPress. This tutorial gives step-by-step guidance to run WordPress + {{{ .starter }}} in a few minutes. +aliases: ['/tidbcloud/dev-guide-wordpress/'] --- -# Connect to {{{ .starter }}} with WordPress +# Integrate WordPress with {{{ .starter }}} TiDB is a MySQL-compatible database, {{{ .starter }}} is a fully managed TiDB offering, and [WordPress](https://github.com/WordPress) is a free, open-source content management system (CMS) that lets users create and manage websites. WordPress is written in PHP and uses a MySQL database. diff --git a/best-practices/java-app-best-practices.md b/develop/java-app-best-practices.md similarity index 99% rename from best-practices/java-app-best-practices.md rename to develop/java-app-best-practices.md index 70931657a4ccc..509942cf22940 100644 --- a/best-practices/java-app-best-practices.md +++ b/develop/java-app-best-practices.md @@ -1,6 +1,7 @@ --- title: Best Practices for Developing Java Applications with TiDB summary: This document introduces best practices for developing Java applications with TiDB, covering database-related components, JDBC usage, connection pool configuration, data access framework, Spring Transaction, and troubleshooting tools. TiDB is highly compatible with MySQL, so most MySQL-based Java application best practices also apply to TiDB. +aliases: ['/tidb/stable/java-app-best-practices/','/tidb/dev/java-app-best-practices/'] --- # Best Practices for Developing Java Applications with TiDB diff --git a/tidb-cloud/serverless-driver-drizzle-example.md b/develop/serverless-driver-drizzle-example.md similarity index 94% rename from tidb-cloud/serverless-driver-drizzle-example.md rename to develop/serverless-driver-drizzle-example.md index d67c0037d9d9d..0bb2511dcdc9d 100644 --- a/tidb-cloud/serverless-driver-drizzle-example.md +++ b/develop/serverless-driver-drizzle-example.md @@ -1,11 +1,12 @@ --- title: TiDB Cloud Serverless Driver Drizzle Tutorial summary: Learn how to use TiDB Cloud serverless driver with Drizzle. +aliases: ['/tidbcloud/serverless-driver-drizzle-example/'] --- # TiDB Cloud Serverless Driver Drizzle Tutorial -[Drizzle ORM](https://orm.drizzle.team/) is a lightweight and performant TypeScript ORM with developer experience in mind. Starting from `drizzle-orm@0.31.2`, it supports [drizzle-orm/tidb-serverless](https://orm.drizzle.team/docs/get-started-mysql#tidb-serverless), enabling you to use Drizzle over HTTPS with [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md). +[Drizzle ORM](https://orm.drizzle.team/) is a lightweight and performant TypeScript ORM with developer experience in mind. Starting from `drizzle-orm@0.31.2`, it supports [drizzle-orm/tidb-serverless](https://orm.drizzle.team/docs/get-started-mysql#tidb-serverless), enabling you to use Drizzle over HTTPS with [TiDB Cloud serverless driver](/develop/serverless-driver.md). This tutorial describes how to use TiDB Cloud serverless driver with Drizzle in Node.js environments and edge environments. @@ -97,7 +98,7 @@ To complete this tutorial, you need the following: 1. Create a table in your {{{ .starter }}} cluster. - You can use [SQL Editor in the TiDB Cloud console](/tidb-cloud/explore-data-with-chat2query.md) to execute SQL statements. Here is an example: + You can use [SQL Editor in the TiDB Cloud console](https://docs.pingcap.com/tidbcloud/explore-data-with-chat2query) to execute SQL statements. Here is an example: ```sql CREATE TABLE `test`.`users` ( @@ -207,7 +208,7 @@ To complete this tutorial, you need the following: 1. Create a table in your {{{ .starter }}} cluster. - You can use [SQL Editor in the TiDB Cloud console](/tidb-cloud/explore-data-with-chat2query.md) to execute SQL statements. Here is an example: + You can use [SQL Editor in the TiDB Cloud console](https://docs.pingcap.com/tidbcloud/explore-data-with-chat2query.md) to execute SQL statements. Here is an example: ```sql CREATE TABLE `test`.`users` ( @@ -273,4 +274,4 @@ To complete this tutorial, you need the following: ## What's next - Learn more about [Drizzle](https://orm.drizzle.team/docs/overview) and [drizzle-orm/tidb-serverless](https://orm.drizzle.team/docs/get-started-mysql#tidb-serverless). -- Learn how to [integrate TiDB Cloud with Vercel](/tidb-cloud/integrate-tidbcloud-with-vercel.md). +- Learn how to [integrate TiDB Cloud with Vercel](https://docs.pingcap.com/tidbcloud/integrate-tidbcloud-with-vercel). diff --git a/tidb-cloud/serverless-driver-kysely-example.md b/develop/serverless-driver-kysely-example.md similarity index 92% rename from tidb-cloud/serverless-driver-kysely-example.md rename to develop/serverless-driver-kysely-example.md index 03e0d3c69c0ae..3664ee53c725a 100644 --- a/tidb-cloud/serverless-driver-kysely-example.md +++ b/develop/serverless-driver-kysely-example.md @@ -1,11 +1,12 @@ --- title: TiDB Cloud Serverless Driver Kysely Tutorial summary: Learn how to use TiDB Cloud serverless driver with Kysely. +aliases: ['/tidbcloud/serverless-driver-kysely-example/'] --- # TiDB Cloud Serverless Driver Kysely Tutorial -[Kysely](https://kysely.dev/docs/intro) is a type-safe and autocompletion-friendly TypeScript SQL query builder. TiDB Cloud offers [@tidbcloud/kysely](https://github.com/tidbcloud/kysely), enabling you to use Kysely over HTTPS with [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md). Compared with the traditional TCP way, [@tidbcloud/kysely](https://github.com/tidbcloud/kysely) brings the following benefits: +[Kysely](https://kysely.dev/docs/intro) is a type-safe and autocompletion-friendly TypeScript SQL query builder. TiDB Cloud offers [@tidbcloud/kysely](https://github.com/tidbcloud/kysely), enabling you to use Kysely over HTTPS with [TiDB Cloud serverless driver](/develop/serverless-driver.md). Compared with the traditional TCP way, [@tidbcloud/kysely](https://github.com/tidbcloud/kysely) brings the following benefits: - Better performance in serverless environments. - Ability to use Kysely in edge environments. @@ -89,7 +90,7 @@ To complete this tutorial, you need the following: 1. Create a table in your {{{ .starter }}} cluster and insert some data. - You can use [SQL Editor in the TiDB Cloud console](/tidb-cloud/explore-data-with-chat2query.md) to execute SQL statements. Here is an example: + You can use [SQL Editor in the TiDB Cloud console](https://docs.pingcap.com/tidbcloud/explore-data-with-chat2query) to execute SQL statements. Here is an example: ```sql CREATE TABLE `test`.`person` ( @@ -201,7 +202,7 @@ mysql://[username]:[password]@[host]/[database] 1. Create a table in your {{{ .starter }}} cluster and insert some data. - You can use [SQL Editor in the TiDB Cloud console](/tidb-cloud/explore-data-with-chat2query.md) to execute SQL statements. Here is an example: + You can use [SQL Editor in the TiDB Cloud console](https://docs.pingcap.com/tidbcloud/explore-data-with-chat2query) to execute SQL statements. Here is an example: ```sql CREATE TABLE `test`.`person` ( @@ -296,4 +297,4 @@ mysql://[username]:[password]@[host]/[database] ## What's next - Learn more about [Kysely](https://kysely.dev/docs/intro) and [@tidbcloud/kysely](https://github.com/tidbcloud/kysely) -- Learn how to [integrate TiDB Cloud with Vercel](/tidb-cloud/integrate-tidbcloud-with-vercel.md) +- Learn how to [integrate TiDB Cloud with Vercel](https://docs.pingcap.com/tidbcloud/integrate-tidbcloud-with-vercel) diff --git a/tidb-cloud/serverless-driver-node-example.md b/develop/serverless-driver-node-example.md similarity index 98% rename from tidb-cloud/serverless-driver-node-example.md rename to develop/serverless-driver-node-example.md index c402ef2336bfd..6ccf82fbab52d 100644 --- a/tidb-cloud/serverless-driver-node-example.md +++ b/develop/serverless-driver-node-example.md @@ -1,6 +1,7 @@ --- title: TiDB Cloud Serverless Driver Node.js Tutorial summary: Learn how to use TiDB Cloud serverless driver in a local Node.js project. +aliases: ['/tidbcloud/serverless-driver-node-example/'] --- # TiDB Cloud Serverless Driver Node.js Tutorial diff --git a/tidb-cloud/serverless-driver-prisma-example.md b/develop/serverless-driver-prisma-example.md similarity index 95% rename from tidb-cloud/serverless-driver-prisma-example.md rename to develop/serverless-driver-prisma-example.md index f3963aea5e4e8..e750144db2210 100644 --- a/tidb-cloud/serverless-driver-prisma-example.md +++ b/develop/serverless-driver-prisma-example.md @@ -1,11 +1,12 @@ --- title: TiDB Cloud Serverless Driver Prisma Tutorial summary: Learn how to use TiDB Cloud serverless driver with Prisma ORM. +aliases: ['/tidbcloud/serverless-driver-prisma-example/'] --- # TiDB Cloud Serverless Driver Prisma Tutorial -[Prisma](https://www.prisma.io/docs) is an open source next-generation ORM (Object-Relational Mapping) that helps developers interact with their database in an intuitive, efficient, and safe way. TiDB Cloud offers [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter), enabling you to use [Prisma Client](https://www.prisma.io/docs/concepts/components/prisma-client) over HTTPS with [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md). Compared with the traditional TCP way, [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter) brings the following benefits: +[Prisma](https://www.prisma.io/docs) is an open source next-generation ORM (Object-Relational Mapping) that helps developers interact with their database in an intuitive, efficient, and safe way. TiDB Cloud offers [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter), enabling you to use [Prisma Client](https://www.prisma.io/docs/concepts/components/prisma-client) over HTTPS with [TiDB Cloud serverless driver](/develop/serverless-driver.md). Compared with the traditional TCP way, [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter) brings the following benefits: - Better performance of Prisma Client in serverless environments - Ability to use Prisma Client in edge environments @@ -18,7 +19,7 @@ This tutorial describes how to use [@tidbcloud/prisma-adapter](https://github.co ## Install -You need to install both [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter) and [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md). You can install them using [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or your preferred package manager. +You need to install both [@tidbcloud/prisma-adapter](https://github.com/tidbcloud/prisma-adapter) and [TiDB Cloud serverless driver](/develop/serverless-driver.md). You can install them using [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) or your preferred package manager. Taking npm as an example, you can run the following commands for installation: diff --git a/tidb-cloud/serverless-driver.md b/develop/serverless-driver.md similarity index 96% rename from tidb-cloud/serverless-driver.md rename to develop/serverless-driver.md index 873ce536ef843..632d6da4e311b 100644 --- a/tidb-cloud/serverless-driver.md +++ b/develop/serverless-driver.md @@ -1,7 +1,7 @@ --- title: TiDB Cloud Serverless Driver (Beta) summary: Learn how to connect to {{{ .starter }}} or {{{ .essential }}} from serverless and edge environments. -aliases: ['/tidbcloud/serverless-driver-config'] +aliases: ['/tidbcloud/serverless-driver-config/','/tidbcloud/serverless-driver/'] --- # TiDB Cloud Serverless Driver (Beta) @@ -18,7 +18,7 @@ Traditional TCP-based MySQL drivers are not suitable for serverless functions du > **Note:** > -> If you prefer programming with RESTful API rather than SQL or ORM, you can use [Data Service (beta)](/tidb-cloud/data-service-overview.md). +> If you prefer programming with RESTful API rather than SQL or ORM, you can use [Data Service (beta)](https://docs.pingcap.com/tidbcloud/data-service-overview/). ## Install the serverless driver @@ -84,7 +84,7 @@ export async function GET(request: NextRequest) { } ``` -Learn more about [using TiDB Cloud serverless driver in Vercel](/tidb-cloud/integrate-tidbcloud-with-vercel.md). +Learn more about [using TiDB Cloud serverless driver in Vercel](https://docs.pingcap.com/tidbcloud/integrate-tidbcloud-with-vercel).
@@ -104,7 +104,7 @@ export default { }; ``` -Learn more about [using TiDB Cloud serverless driver in Cloudflare Workers](/tidb-cloud/integrate-tidbcloud-with-cloudflare.md). +Learn more about [using TiDB Cloud serverless driver in Cloudflare Workers](https://docs.pingcap.com/tidbcloud/integrate-tidbcloud-with-cloudflare).
@@ -120,7 +120,7 @@ export default async () => { } ``` -Learn more about [using TiDB Cloud serverless driver in Netlify](/tidb-cloud/integrate-tidbcloud-with-netlify.md#use-the-edge-function). +Learn more about [using TiDB Cloud serverless driver in Netlify](https://docs.pingcap.com/tidbcloud/integrate-tidbcloud-with-netlify#use-the-edge-function).
@@ -331,7 +331,7 @@ TiDB Cloud serverless driver has been integrated with the following ORMs: ## Pricing -The serverless driver itself is free, but accessing data with the driver generates [Request Units (RUs)](/tidb-cloud/tidb-cloud-glossary.md#request-unit-ru) and storage usage. +The serverless driver itself is free, but accessing data with the driver generates [Request Units (RUs)](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary#request-unit-ru) and storage usage. - For {{{ .starter }}} clusters, the pricing follows the [{{{ .starter }}} pricing](https://www.pingcap.com/tidb-cloud-starter-pricing-details/) model. - For {{{ .essential }}} clusters, the pricing follows the [{{{ .essential }}} pricing](https://www.pingcap.com/tidb-cloud-essential-pricing-details/) model. @@ -342,9 +342,9 @@ Currently, using serverless driver has the following limitations: - Up to 10,000 rows can be fetched in a single query. - You can execute only a single SQL statement at a time. Multiple SQL statements in one query are not supported yet. -- Connection with [private endpoints](/tidb-cloud/set-up-private-endpoint-connections-serverless.md) is not supported yet. +- Connection with [private endpoints](https://docs.pingcap.com/tidbcloud/set-up-private-endpoint-connections-serverless.md) is not supported yet. - The server blocks requests from unauthorized browser origins via Cross-Origin Resource Sharing (CORS) to protect your credentials. As a result, you can use the serverless driver only from backend services. ## What's next -- Learn how to [use TiDB Cloud serverless driver in a local Node.js project](/tidb-cloud/serverless-driver-node-example.md). +- Learn how to [use TiDB Cloud serverless driver in a local Node.js project](/develop/serverless-driver-node-example.md). diff --git a/faq/sql-faq.md b/faq/sql-faq.md index f8ada1ade60d7..01cb50d5ac02f 100644 --- a/faq/sql-faq.md +++ b/faq/sql-faq.md @@ -247,7 +247,7 @@ SELECT column_name FROM table_name USE INDEX(index_name)WHERE where_conditio ## DDL Execution -This section lists issues related to DDL statement execution. For detailed explanations on the DDL execution principles, see [Execution Principles and Best Practices of DDL Statements](/ddl-introduction.md). +This section lists issues related to DDL statement execution. For detailed explanations on the DDL execution principles, see [Execution Principles and Best Practices of DDL Statements](/best-practices/ddl-introduction.md). ### How long does it take to perform various DDL operations? diff --git a/glossary.md b/glossary.md index be048d9dc9894..41f50bc71137d 100644 --- a/glossary.md +++ b/glossary.md @@ -95,7 +95,7 @@ For more information, see [Use Dumpling to Export Data](/dumpling-overview.md). ### Data Definition Language (DDL) -Data Definition Language (DDL) is a part of the SQL standard that deals with creating, modifying, and dropping tables and other objects. For more information, see [DDL Introduction](/ddl-introduction.md). +Data Definition Language (DDL) is a part of the SQL standard that deals with creating, modifying, and dropping tables and other objects. For more information, see [DDL Introduction](/best-practices/ddl-introduction.md). ### Data Migration (DM) @@ -411,4 +411,4 @@ Universally Unique Identifier (UUID) is a 128-bit (16-byte) generated ID used to ### Vector search -[Vector search](/vector-search/vector-search-overview.md) is a search method that prioritizes the meaning of your data to deliver relevant results. Unlike traditional full-text search, which relies on exact keyword matching and word frequency, vector search converts various data types (such as text, images, or audio) into high-dimensional vectors and queries based on the similarity between these vectors. This search method captures the semantic meaning and contextual information of the data, leading to a more precise understanding of user intent. Even when the search terms do not exactly match the content in the database, vector search can still provide results that align with the user's intent by analyzing the semantics of the data. +[Vector search](/ai/concepts/vector-search-overview.md) is a search method that prioritizes the meaning of your data to deliver relevant results. Unlike traditional full-text search, which relies on exact keyword matching and word frequency, vector search converts various data types (such as text, images, or audio) into high-dimensional vectors and queries based on the similarity between these vectors. This search method captures the semantic meaning and contextual information of the data, leading to a more precise understanding of user intent. Even when the search terms do not exactly match the content in the database, vector search can still provide results that align with the user's intent by analyzing the semantics of the data. diff --git a/package-lock.json b/package-lock.json index fd224f072eb07..81ec024172e78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,116 @@ "micromark-extension-mdxjs": "^1.0.0", "octokit": "^3.1.0", "unist-util-visit": "^4.1.0" + }, + "devDependencies": { + "@breeswish-org/remark-lint-pingcap-docs-anchor": "1.1.2", + "markdown-link-check": "3.8.1", + "remark-cli": "9.0.0", + "remark-lint": "8.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@breeswish-org/remark-lint-pingcap-docs-anchor": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@breeswish-org/remark-lint-pingcap-docs-anchor/-/remark-lint-pingcap-docs-anchor-1.1.2.tgz", + "integrity": "sha512-MGcmkEdXWAfHWusuIj4qRG6HXKICCGFK7ohp0mWEtwEXrMYeDeQt44rTVTC/HCaTi9qR9kv9pBopb+YIHemdrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "didyoumean2": "^4.1.0", + "github-slugger": "^1.4.0", + "mdast-util-to-string": "^2.0.0", + "remark": "^13.0.0", + "unified": "^9.2.2", + "unified-lint-rule": "^1.0.5", + "unist-util-visit": "^2.0.3" + } + }, + "node_modules/@breeswish-org/remark-lint-pingcap-docs-anchor/node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@breeswish-org/remark-lint-pingcap-docs-anchor/node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@breeswish-org/remark-lint-pingcap-docs-anchor/node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@breeswish-org/remark-lint-pingcap-docs-anchor/node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/@octokit/app": { @@ -457,11 +567,122 @@ "node": ">=8" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "dev": true, + "license": "MIT" + }, "node_modules/axios": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", @@ -472,16 +693,50 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, "node_modules/before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bottleneck": { "version": "2.19.5", "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", @@ -495,6 +750,19 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/btoa-lite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", @@ -505,11 +773,52 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/ccount/-/ccount-2.0.1.tgz", "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==" }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/character-entities": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/character-entities/-/character-entities-2.0.1.tgz", @@ -530,6 +839,31 @@ "resolved": "https://registry.npmmirror.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==" }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -538,6 +872,33 @@ "node": ">=6" } }, + "node_modules/co": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", + "integrity": "sha512-CQsjCRiNObI8AtTsNIBDRMQ4oMR83CzEswHYahClvul7gKk+lDQiOKv+5qh7LQWf5sh6jkZNispz/QlsZxyNgA==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -549,6 +910,59 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", @@ -594,6 +1008,21 @@ "node": ">=6" } }, + "node_modules/didyoumean2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/didyoumean2/-/didyoumean2-4.2.0.tgz", + "integrity": "sha512-o8KZ9RERbXaPgvXklxuLwD4RotaV5trShsNXaA/y1h5e4u6qmtv5I6enJsst9l8R1b/eqFQFwfPAiTf+FgHAQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.2", + "leven": "^3.1.0", + "lodash.deburr": "^4.1.0" + }, + "engines": { + "node": ">=10.13" + } + }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/diff/-/diff-5.0.0.tgz", @@ -602,6 +1031,17 @@ "node": ">=0.3.1" } }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -610,6 +1050,23 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/escape-string-regexp": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", @@ -618,6 +1075,20 @@ "node": ">=12" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/estree-util-is-identifier-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.0.0.tgz", @@ -640,6 +1111,37 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, "node_modules/fault": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/fault/-/fault-2.0.1.tgz", @@ -648,6 +1150,66 @@ "format": "^0.2.0" } }, + "node_modules/figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "deprecated": "This module is no longer supported.", + "dev": true, + "license": "ISC" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", @@ -667,6 +1229,16 @@ } } }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -693,6 +1265,38 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/github-slugger": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", + "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==", + "dev": true, + "license": "ISC" + }, "node_modules/glob": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", @@ -711,16 +1315,90 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/inflight": { - "version": "1.0.6", + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dependencies": { @@ -733,6 +1411,23 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -747,6 +1442,26 @@ "is-decimal": "^2.0.0" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", @@ -774,11 +1489,71 @@ "resolved": "https://registry.npmmirror.com/is-decimal/-/is-decimal-2.0.1.tgz", "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==" }, + "node_modules/is-empty": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-empty/-/is-empty-1.2.0.tgz", + "integrity": "sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-hexadecimal": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==" }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -787,6 +1562,115 @@ "node": ">=0.10.0" } }, + "node_modules/is-relative-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-3.0.0.tgz", + "integrity": "sha512-U1iSYRlY2GIMGuZx7gezlB5dp1Kheaym7zKzO1PV06mOihiWTXejLwm4poEJysPyXF+HtK/BEd0DVlcCh30pEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-absolute-url": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/isemail": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", + "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "punycode": "2.x.x" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true, + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", @@ -802,6 +1686,22 @@ "npm": ">=6" } }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -829,11 +1729,90 @@ "node": ">=6" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/libnpmconfig": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", + "deprecated": "This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config", + "dev": true, + "license": "ISC", + "dependencies": { + "figgy-pudding": "^3.5.1", + "find-up": "^3.0.0", + "ini": "^1.3.5" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/link-check": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/link-check/-/link-check-4.5.4.tgz", + "integrity": "sha512-VdjiYrIBNHtqH7NEvIlF/4i0V9xQWkoBry+65DtmmyKyD5qBZ2U9fCJYx75SI5Ms4ILJzGlNNojPKbPMpg5Spg==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-relative-url": "^3.0.0", + "isemail": "^3.2.0", + "ms": "^2.1.2", + "request": "^2.88.2" + } + }, + "node_modules/load-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-3.0.0.tgz", + "integrity": "sha512-od7eKCCZ62ITvFf8nHHrIiYmgOHb4xVNDRDqxBWSaao5FZyyZVX8OmRCbwjDGPrSrgIulwPNyBsWCGnhiDC0oQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "libnpmconfig": "^1.0.0", + "resolve-from": "^5.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash.deburr": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", + "integrity": "sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==", + "dev": true, + "license": "MIT" + }, "node_modules/longest-streak": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/longest-streak/-/longest-streak-3.0.1.tgz", @@ -847,11 +1826,75 @@ "node": "14 || >=16.14" } }, + "node_modules/markdown-extensions": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-1.1.1.tgz", + "integrity": "sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/markdown-link-check": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.8.1.tgz", + "integrity": "sha512-R6k8ytdJZePDAdb8NT0NvrNvu6n25IwLPIoJ4guHWC5yqyTlnUpRT7j3XE4ioBXwqOhG/LlUcuckD621kZkl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "async": "^3.2.0", + "chalk": "^4.0.0", + "commander": "^5.0.0", + "link-check": "^4.5.0", + "lodash": "^4.17.15", + "markdown-link-extractor": "^1.2.3", + "progress": "^2.0.3", + "request": "^2.88.2" + }, + "bin": { + "markdown-link-check": "markdown-link-check" + } + }, + "node_modules/markdown-link-extractor": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-1.3.1.tgz", + "integrity": "sha512-IosNBtHXplzEq2n9WoSi83LNLCWgLnb+8Xq379Ct5xrLLzmqPUtc+A1oqo6Sd32YfKus9uLedFNSwFK1sCzoNQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "marked": "^4.0.10" + } + }, "node_modules/markdown-table": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/markdown-table/-/markdown-table-3.0.2.tgz", "integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==" }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/mdast-comment-marker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/mdast-comment-marker/-/mdast-comment-marker-1.1.2.tgz", + "integrity": "sha512-vTFXtmbbF3rgnTh3Zl3irso4LtvwUq/jaDvT2D1JqTGAwaipcS7RpTxzi6KjoRqI9n2yuAhzLDAC8xVTF3XYVQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-find-and-replace": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.1.0.tgz", @@ -1512,6 +2555,16 @@ "node": ">=10" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/mri/-/mri-1.2.0.tgz", @@ -1525,6 +2578,26 @@ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, "node_modules/octokit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/octokit/-/octokit-3.1.0.tgz", @@ -1553,6 +2626,45 @@ "wrappy": "1" } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/parse-entities": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/parse-entities/-/parse-entities-4.0.0.tgz", @@ -1568,44 +2680,664 @@ "is-hexadecimal": "^2.0.0" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmmirror.com/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", "dependencies": { - "mri": "^1.1.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/remark": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", + "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-cli": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-cli/-/remark-cli-9.0.0.tgz", + "integrity": "sha512-y6kCXdwZoMoh0Wo4Och1tDW50PmMc86gW6GpF08v9d+xUCEJE2wwXdQ+TnTaUamRnfFdU+fE+eNf2PJ53cyq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "markdown-extensions": "^1.1.0", + "remark": "^13.0.0", + "unified-args": "^8.0.0" + }, + "bin": { + "remark": "cli.js" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-lint": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-8.0.0.tgz", + "integrity": "sha512-ESI8qJQ/TIRjABDnqoFsTiZntu+FRifZ5fJ77yX63eIDijl/arvmDvT+tAf75/Nm5BFL4R2JFUtkHRGVjzYUsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "remark-message-control": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-message-control": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-message-control/-/remark-message-control-6.0.0.tgz", + "integrity": "sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-comment-marker": "^1.0.0", + "unified-message-control": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse/node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse/node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse/node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/remark-parse/node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-parse/node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", + "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-to-markdown": "^0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify/node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remark-stringify/node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" @@ -1617,15 +3349,80 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==", + "dev": true, + "license": "MIT" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" } }, "node_modules/stringify-entities": { @@ -1637,6 +3434,465 @@ "character-entities-legacy": "^3.0.0" } }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-vfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-6.1.0.tgz", + "integrity": "sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^2.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/to-vfile/node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/to-vfile/node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/to-vfile/node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-args": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/unified-args/-/unified-args-8.1.0.tgz", + "integrity": "sha512-t1HPS1cQPsVvt/6EtyWIbQGurza5684WGRigNghZRvzIdHm3LPgMdXPyGx0npORKzdiy5+urkF0rF5SXM8lBuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.0.0", + "chalk": "^3.0.0", + "chokidar": "^3.0.0", + "fault": "^1.0.2", + "json5": "^2.0.0", + "minimist": "^1.2.0", + "text-table": "^0.2.0", + "unified-engine": "^8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-args/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/unified-args/node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified-engine": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-8.2.0.tgz", + "integrity": "sha512-ZlMm62ejrf+tJHdyOjQfljszngQjRor95q2XZMGk6rpJUYi7ZIHY/EXEhOcj9PZkMKKdLIM+dqL4s0ceyk9wbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "concat-stream": "^2.0.0", + "debug": "^4.0.0", + "fault": "^1.0.0", + "figures": "^3.0.0", + "glob": "^7.0.3", + "ignore": "^5.0.0", + "is-buffer": "^2.0.0", + "is-empty": "^1.0.0", + "is-plain-obj": "^2.0.0", + "js-yaml": "^3.6.1", + "load-plugin": "^3.0.0", + "parse-json": "^5.0.0", + "to-vfile": "^6.0.0", + "trough": "^1.0.0", + "unist-util-inspect": "^5.0.0", + "vfile-reporter": "^6.0.0", + "vfile-statistics": "^1.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-engine/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/unified-engine/node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unified-engine/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/unified-engine/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/unified-lint-rule": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.6.tgz", + "integrity": "sha512-YPK15YBFwnsVorDFG/u0cVVQN5G2a3V8zv5/N6KN3TCG+ajKtaALcy7u14DCSrJI+gZeyYquFL9cioJXOGXSvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "wrapped": "^1.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.3.tgz", + "integrity": "sha512-oY5z2n8ugjpNHXOmcgrw0pQeJzavHS0VjPBP21tOcm7rc2C+5Q+kW9j5+gqtf8vfW/8sabbsK5+P+9QPwwEHDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control/node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control/node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control/node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-message-control/node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-inspect": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-5.0.1.tgz", + "integrity": "sha512-fPNWewS593JSmg49HbnE86BJKuBi1/nMWhDSccBvbARfxezEuJV85EaARR9/VplveiwCoLm2kWq+DhP8TBaDpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-empty": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unist-util-is": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/unist-util-is/-/unist-util-is-5.1.1.tgz", @@ -1708,11 +3964,39 @@ "jsonwebtoken": "^9.0.0" } }, - "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/uvu": { "version": "0.5.3", "resolved": "https://registry.npmmirror.com/uvu/-/uvu-0.5.3.tgz", @@ -1730,6 +4014,21 @@ "node": ">=8" } }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "node_modules/vfile": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.2.tgz", @@ -1767,6 +4066,95 @@ "unist-util-stringify-position": "^3.0.0" } }, + "node_modules/vfile-reporter": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.2.tgz", + "integrity": "sha512-GN2bH2gs4eLnw/4jPSgfBjo+XCuvnX9elHICJZjVD4+NM0nsUrMTvdjGY5Sc/XG69XVTgLwj7hknQVc6M9FukA==", + "dev": true, + "license": "MIT", + "dependencies": { + "repeat-string": "^1.5.0", + "string-width": "^4.0.0", + "supports-color": "^6.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-sort": "^2.1.2", + "vfile-statistics": "^1.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-reporter/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/vfile-reporter/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/vfile-reporter/node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-sort": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-2.2.2.tgz", + "integrity": "sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-statistics": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-1.1.4.tgz", + "integrity": "sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/wrapped": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wrapped/-/wrapped-1.0.1.tgz", + "integrity": "sha512-ZTKuqiTu3WXtL72UKCCnQLRax2IScKH7oQ+mvjbpvNE+NJxIWIemDqqM2GxNr4N16NCjOYpIgpin5pStM7kM5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "co": "3.1.0", + "sliced": "^1.0.1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -1784,6 +4172,79 @@ } }, "dependencies": { + "@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true + }, + "@babel/runtime": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "dev": true + }, + "@breeswish-org/remark-lint-pingcap-docs-anchor": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@breeswish-org/remark-lint-pingcap-docs-anchor/-/remark-lint-pingcap-docs-anchor-1.1.2.tgz", + "integrity": "sha512-MGcmkEdXWAfHWusuIj4qRG6HXKICCGFK7ohp0mWEtwEXrMYeDeQt44rTVTC/HCaTi9qR9kv9pBopb+YIHemdrA==", + "dev": true, + "requires": { + "didyoumean2": "^4.1.0", + "github-slugger": "^1.4.0", + "mdast-util-to-string": "^2.0.0", + "remark": "^13.0.0", + "unified": "^9.2.2", + "unified-lint-rule": "^1.0.5", + "unist-util-visit": "^2.0.3" + }, + "dependencies": { + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true + }, + "unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + } + } + }, "@octokit/app": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@octokit/app/-/app-14.0.0.tgz", @@ -2127,11 +4588,90 @@ "indent-string": "^4.0.0" } }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true + }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true + }, + "aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "dev": true + }, "axios": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", @@ -2142,16 +4682,37 @@ "proxy-from-env": "^1.1.0" } }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, "before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true + }, "bottleneck": { "version": "2.19.5", "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", @@ -2165,6 +4726,15 @@ "balanced-match": "^1.0.0" } }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, "btoa-lite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", @@ -2175,11 +4745,39 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true + }, "ccount": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/ccount/-/ccount-2.0.1.tgz", "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==" }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "character-entities": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/character-entities/-/character-entities-2.0.1.tgz", @@ -2200,11 +4798,48 @@ "resolved": "https://registry.npmmirror.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==" }, + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, + "co": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", + "integrity": "sha512-CQsjCRiNObI8AtTsNIBDRMQ4oMR83CzEswHYahClvul7gKk+lDQiOKv+5qh7LQWf5sh6jkZNispz/QlsZxyNgA==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2213,6 +4848,45 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", @@ -2244,11 +4918,32 @@ "resolved": "https://registry.npmmirror.com/dequal/-/dequal-2.0.2.tgz", "integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==" }, + "didyoumean2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/didyoumean2/-/didyoumean2-4.2.0.tgz", + "integrity": "sha512-o8KZ9RERbXaPgvXklxuLwD4RotaV5trShsNXaA/y1h5e4u6qmtv5I6enJsst9l8R1b/eqFQFwfPAiTf+FgHAQQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.10.2", + "leven": "^3.1.0", + "lodash.deburr": "^4.1.0" + } + }, "diff": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/diff/-/diff-5.0.0.tgz", "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -2257,11 +4952,32 @@ "safe-buffer": "^5.0.1" } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "escape-string-regexp": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==" }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, "estree-util-is-identifier-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.0.0.tgz", @@ -2276,6 +4992,30 @@ "@types/unist": "^2.0.0" } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, "fault": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/fault/-/fault-2.0.1.tgz", @@ -2284,11 +5024,58 @@ "format": "^0.2.0" } }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true + }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -2309,6 +5096,28 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "github-slugger": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", + "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==", + "dev": true + }, "glob": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", @@ -2321,6 +5130,54 @@ "once": "^1.3.0" } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true + }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -2340,6 +5197,18 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true + }, "is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -2354,6 +5223,21 @@ "is-decimal": "^2.0.0" } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", @@ -2364,16 +5248,137 @@ "resolved": "https://registry.npmmirror.com/is-decimal/-/is-decimal-2.0.1.tgz", "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==" }, + "is-empty": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-empty/-/is-empty-1.2.0.tgz", + "integrity": "sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-hexadecimal": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==" }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, "is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" }, + "is-relative-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-3.0.0.tgz", + "integrity": "sha512-U1iSYRlY2GIMGuZx7gezlB5dp1Kheaym7zKzO1PV06mOihiWTXejLwm4poEJysPyXF+HtK/BEd0DVlcCh30pEA==", + "dev": true, + "requires": { + "is-absolute-url": "^3.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "isemail": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", + "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "dev": true, + "requires": { + "punycode": "2.x.x" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, "jsonwebtoken": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", @@ -2385,6 +5390,18 @@ "semver": "^7.3.8" } }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, "jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -2409,11 +5426,72 @@ "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.4.tgz", "integrity": "sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==" }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "libnpmconfig": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "find-up": "^3.0.0", + "ini": "^1.3.5" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "link-check": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/link-check/-/link-check-4.5.4.tgz", + "integrity": "sha512-VdjiYrIBNHtqH7NEvIlF/4i0V9xQWkoBry+65DtmmyKyD5qBZ2U9fCJYx75SI5Ms4ILJzGlNNojPKbPMpg5Spg==", + "dev": true, + "requires": { + "is-relative-url": "^3.0.0", + "isemail": "^3.2.0", + "ms": "^2.1.2", + "request": "^2.88.2" + } + }, + "load-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-3.0.0.tgz", + "integrity": "sha512-od7eKCCZ62ITvFf8nHHrIiYmgOHb4xVNDRDqxBWSaao5FZyyZVX8OmRCbwjDGPrSrgIulwPNyBsWCGnhiDC0oQ==", + "dev": true, + "requires": { + "libnpmconfig": "^1.0.0", + "resolve-from": "^5.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "lodash.deburr": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", + "integrity": "sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==", + "dev": true + }, "longest-streak": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/longest-streak/-/longest-streak-3.0.1.tgz", @@ -2424,11 +5502,54 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==" }, + "markdown-extensions": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-1.1.1.tgz", + "integrity": "sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==", + "dev": true + }, + "markdown-link-check": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.8.1.tgz", + "integrity": "sha512-R6k8ytdJZePDAdb8NT0NvrNvu6n25IwLPIoJ4guHWC5yqyTlnUpRT7j3XE4ioBXwqOhG/LlUcuckD621kZkl4w==", + "dev": true, + "requires": { + "async": "^3.2.0", + "chalk": "^4.0.0", + "commander": "^5.0.0", + "link-check": "^4.5.0", + "lodash": "^4.17.15", + "markdown-link-extractor": "^1.2.3", + "progress": "^2.0.3", + "request": "^2.88.2" + } + }, + "markdown-link-extractor": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-1.3.1.tgz", + "integrity": "sha512-IosNBtHXplzEq2n9WoSi83LNLCWgLnb+8Xq379Ct5xrLLzmqPUtc+A1oqo6Sd32YfKus9uLedFNSwFK1sCzoNQ==", + "dev": true, + "requires": { + "marked": "^4.0.10" + } + }, "markdown-table": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/markdown-table/-/markdown-table-3.0.2.tgz", "integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==" }, + "marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true + }, + "mdast-comment-marker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/mdast-comment-marker/-/mdast-comment-marker-1.1.2.tgz", + "integrity": "sha512-vTFXtmbbF3rgnTh3Zl3irso4LtvwUq/jaDvT2D1JqTGAwaipcS7RpTxzi6KjoRqI9n2yuAhzLDAC8xVTF3XYVQ==", + "dev": true + }, "mdast-util-find-and-replace": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.1.0.tgz", @@ -3026,6 +6147,12 @@ "brace-expansion": "^2.0.1" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "mri": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/mri/-/mri-1.2.0.tgz", @@ -3036,6 +6163,18 @@ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, "octokit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/octokit/-/octokit-3.1.0.tgz", @@ -3058,9 +6197,33 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "requires": { - "wrappy": "1" + "wrappy": "1" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "parse-entities": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/parse-entities/-/parse-entities-4.0.0.tgz", @@ -3076,11 +6239,406 @@ "is-hexadecimal": "^2.0.0" } }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, + "picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "dev": true, + "requires": { + "punycode": "^2.3.1" + } + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "remark": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", + "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", + "dev": true, + "requires": { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + } + }, + "remark-cli": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-cli/-/remark-cli-9.0.0.tgz", + "integrity": "sha512-y6kCXdwZoMoh0Wo4Och1tDW50PmMc86gW6GpF08v9d+xUCEJE2wwXdQ+TnTaUamRnfFdU+fE+eNf2PJ53cyq8g==", + "dev": true, + "requires": { + "markdown-extensions": "^1.1.0", + "remark": "^13.0.0", + "unified-args": "^8.0.0" + } + }, + "remark-lint": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/remark-lint/-/remark-lint-8.0.0.tgz", + "integrity": "sha512-ESI8qJQ/TIRjABDnqoFsTiZntu+FRifZ5fJ77yX63eIDijl/arvmDvT+tAf75/Nm5BFL4R2JFUtkHRGVjzYUsg==", + "dev": true, + "requires": { + "remark-message-control": "^6.0.0" + } + }, + "remark-message-control": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-message-control/-/remark-message-control-6.0.0.tgz", + "integrity": "sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==", + "dev": true, + "requires": { + "mdast-comment-marker": "^1.0.0", + "unified-message-control": "^3.0.0" + } + }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "requires": { + "mdast-util-from-markdown": "^0.8.0" + }, + "dependencies": { + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + } + } + }, + "remark-stringify": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", + "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.6.0" + }, + "dependencies": { + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, + "longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true + }, + "mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true + } + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, "sade": { "version": "1.8.1", "resolved": "https://registry.npmmirror.com/sade/-/sade-1.8.1.tgz", @@ -3094,6 +6652,12 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -3112,6 +6676,55 @@ } } }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "stringify-entities": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/stringify-entities/-/stringify-entities-4.0.2.tgz", @@ -3121,6 +6734,335 @@ "character-entities-legacy": "^3.0.0" } }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "to-vfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-6.1.0.tgz", + "integrity": "sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw==", + "dev": true, + "requires": { + "is-buffer": "^2.0.0", + "vfile": "^4.0.0" + }, + "dependencies": { + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + } + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "dependencies": { + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + } + } + }, + "unified-args": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/unified-args/-/unified-args-8.1.0.tgz", + "integrity": "sha512-t1HPS1cQPsVvt/6EtyWIbQGurza5684WGRigNghZRvzIdHm3LPgMdXPyGx0npORKzdiy5+urkF0rF5SXM8lBuQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "chalk": "^3.0.0", + "chokidar": "^3.0.0", + "fault": "^1.0.2", + "json5": "^2.0.0", + "minimist": "^1.2.0", + "text-table": "^0.2.0", + "unified-engine": "^8.0.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "requires": { + "format": "^0.2.0" + } + } + } + }, + "unified-engine": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-8.2.0.tgz", + "integrity": "sha512-ZlMm62ejrf+tJHdyOjQfljszngQjRor95q2XZMGk6rpJUYi7ZIHY/EXEhOcj9PZkMKKdLIM+dqL4s0ceyk9wbA==", + "dev": true, + "requires": { + "concat-stream": "^2.0.0", + "debug": "^4.0.0", + "fault": "^1.0.0", + "figures": "^3.0.0", + "glob": "^7.0.3", + "ignore": "^5.0.0", + "is-buffer": "^2.0.0", + "is-empty": "^1.0.0", + "is-plain-obj": "^2.0.0", + "js-yaml": "^3.6.1", + "load-plugin": "^3.0.0", + "parse-json": "^5.0.0", + "to-vfile": "^6.0.0", + "trough": "^1.0.0", + "unist-util-inspect": "^5.0.0", + "vfile-reporter": "^6.0.0", + "vfile-statistics": "^1.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "requires": { + "format": "^0.2.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "unified-lint-rule": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/unified-lint-rule/-/unified-lint-rule-1.0.6.tgz", + "integrity": "sha512-YPK15YBFwnsVorDFG/u0cVVQN5G2a3V8zv5/N6KN3TCG+ajKtaALcy7u14DCSrJI+gZeyYquFL9cioJXOGXSvg==", + "dev": true, + "requires": { + "wrapped": "^1.0.1" + } + }, + "unified-message-control": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.3.tgz", + "integrity": "sha512-oY5z2n8ugjpNHXOmcgrw0pQeJzavHS0VjPBP21tOcm7rc2C+5Q+kW9j5+gqtf8vfW/8sabbsK5+P+9QPwwEHDA==", + "dev": true, + "requires": { + "unist-util-visit": "^2.0.0", + "vfile-location": "^3.0.0" + }, + "dependencies": { + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true + }, + "unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + } + }, + "vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "dev": true + } + } + }, + "unist-util-inspect": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-5.0.1.tgz", + "integrity": "sha512-fPNWewS593JSmg49HbnE86BJKuBi1/nMWhDSccBvbARfxezEuJV85EaARR9/VplveiwCoLm2kWq+DhP8TBaDpw==", + "dev": true, + "requires": { + "is-empty": "^1.0.0" + } + }, "unist-util-is": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/unist-util-is/-/unist-util-is-5.1.1.tgz", @@ -3195,6 +7137,27 @@ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "uvu": { "version": "0.5.3", "resolved": "https://registry.npmmirror.com/uvu/-/uvu-0.5.3.tgz", @@ -3206,6 +7169,17 @@ "sade": "^1.7.3" } }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "vfile": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.2.tgz", @@ -3235,6 +7209,68 @@ "unist-util-stringify-position": "^3.0.0" } }, + "vfile-reporter": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.2.tgz", + "integrity": "sha512-GN2bH2gs4eLnw/4jPSgfBjo+XCuvnX9elHICJZjVD4+NM0nsUrMTvdjGY5Sc/XG69XVTgLwj7hknQVc6M9FukA==", + "dev": true, + "requires": { + "repeat-string": "^1.5.0", + "string-width": "^4.0.0", + "supports-color": "^6.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-sort": "^2.1.2", + "vfile-statistics": "^1.1.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + } + } + }, + "vfile-sort": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-2.2.2.tgz", + "integrity": "sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA==", + "dev": true + }, + "vfile-statistics": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-1.1.4.tgz", + "integrity": "sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA==", + "dev": true + }, + "wrapped": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wrapped/-/wrapped-1.0.1.tgz", + "integrity": "sha512-ZTKuqiTu3WXtL72UKCCnQLRax2IScKH7oQ+mvjbpvNE+NJxIWIemDqqM2GxNr4N16NCjOYpIgpin5pStM7kM5g==", + "dev": true, + "requires": { + "co": "3.1.0", + "sliced": "^1.0.1" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 7367d12460c5a..4e5b303151bdf 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,11 @@ "micromark-extension-mdxjs": "^1.0.0", "octokit": "^3.1.0", "unist-util-visit": "^4.1.0" + }, + "devDependencies": { + "@breeswish-org/remark-lint-pingcap-docs-anchor": "1.1.2", + "markdown-link-check": "3.8.1", + "remark-cli": "9.0.0", + "remark-lint": "8.0.0" } } diff --git a/performance-tuning-practices.md b/performance-tuning-practices.md index 1704b228e6f9d..7d31749bf1106 100644 --- a/performance-tuning-practices.md +++ b/performance-tuning-practices.md @@ -13,7 +13,7 @@ This document describes how to use these features together to analyze and compar > > [Top SQL](/dashboard/top-sql.md) and [Continuous Profiling](/dashboard/continuous-profiling.md) are not enabled by default. You need to enable them in advance. -By running the same application with different JDBC configurations in these scenarios, this document shows you how the overall system performance is affected by different interactions between applications and databases, so that you can apply [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) for better performance. +By running the same application with different JDBC configurations in these scenarios, this document shows you how the overall system performance is affected by different interactions between applications and databases, so that you can apply [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) for better performance. ## Environment description diff --git a/quick-start-with-tidb.md b/quick-start-with-tidb.md index 9ad84db3de060..489d9012631ef 100644 --- a/quick-start-with-tidb.md +++ b/quick-start-with-tidb.md @@ -492,8 +492,8 @@ If you are ready to deploy a TiDB cluster for the production environment, here a If you are an application developer and want to quickly build an application using TiDB, here are the next steps: -- [Developer Guide Overview](/develop/dev-guide-overview.md) -- [Build a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) +- [Developer Guide Overview](https://docs.pingcap.com/developer/) +- [Create a {{{ .starter }}} Cluster](/develop/dev-guide-build-cluster-in-cloud.md) - [Example Applications](/develop/dev-guide-sample-application-java-jdbc.md) If you are looking for an analytics solution with TiFlash, here are the next steps: diff --git a/releases/release-notes.md b/releases/_index.md similarity index 99% rename from releases/release-notes.md rename to releases/_index.md index fb2435e60d67a..ea2a6547869f7 100644 --- a/releases/release-notes.md +++ b/releases/_index.md @@ -1,6 +1,7 @@ --- title: Release Notes summary: TiDB has released multiple versions, including 8.5.0, 8.4.0-DMR, 8.3.0-DMR, 8.2.0-DMR, 8.1.0, 8.0.0-DMR, 7.6.0-DMR, 7.5.1, 7.5.0, 7.4.0-DMR, 7.3.0-DMR, 7.2.0-DMR, 7.1.4, 7.1.3, 7.1.2, 7.1.1, 7.1.0, 7.0.0-DMR, 6.6.0-DMR, 6.5.9, 6.5.8, 6.5.7, 6.5.6, 6.5.5, 6.5.4, 6.5.3, 6.5.2, 6.5.1, 6.5.0, 6.4.0-DMR, 6.3.0-DMR, 6.2.0-DMR, 6.1.7, 6.1.6, 6.1.5, 6.1.4, 6.1.3, 6.1.2, 6.1.1, 6.1.0, 6.0.0-DMR, 5.4.3, 5.4.2, 5.4.1, 5.4.0, 5.3.4, 5.3.3, 5.3.2, 5.3.1, 5.3.0, 5.2.4, 5.2.3, 5.2.2, 5.2.1, 5.2.0, 5.1.5, 5.1.4, 5.1.3, 5.1.2, 5.1.1, 5.1.0, 5.0.6, 5.0.5, 5.0.4, 5.0.3, 5.0.2, 5.0.1, 5.0.0, 5.0.0-rc, 4.0.16, 4.0.15, 4.0.14, 4.0.13, 4.0.12, 4.0.11, 4.0.10, 4.0.9, 4.0.8, 4.0.7, 4.0.6, 4.0.5, 4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0.0, 4.0.0-rc.2, 4.0.0-rc.1, 4.0.0-rc, 4.0.0-beta.2, 4.0.0-beta.1, 4.0.0-beta, 3.1.2, 3.1.1, 3.1.0, 3.1.0-rc, 3.1.0-beta.2, 3.1.0-beta.1, 3.1.0-beta, 3.0.20, 3.0.19, 3.0.18, 3.0.17, 3.0.16, 3.0.15, 3.0.14, 3.0.13, 3.0.12, 3.0.11, 3.0.10, 3.0.9, 3.0.8, 3.0.7, 3.0.6, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-rc.3, 3.0.0-rc.2, 3.0.0-rc.1, 3.0.0-beta.1, 3.0.0-beta, 2.1.19, 2.1.18, 2.1.17, 2.1.16, 2.1.15, 2.1.14, 2.1.13, 2.1.12, 2.1.11, 2.1.10, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.1.0-rc.5, 2.1.0-rc.4, 2.1.0-rc.3, 2.1.0-rc.2, 2.1.0-rc.1, 2.1.0-beta, 2.0.11, 2.0.10, 2.0.9, 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-rc.5, 2.0.0-rc.4, 2.0.0-rc.3, 2.0.0-rc.1, 1.1.0-beta, 1.1.0-alpha, 1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, Pre-GA, rc4, rc3, rc2, rc1. +aliases: ['/tidb/stable/release-notes/','/tidb/v8.5/release-notes/'] --- # TiDB Release Notes diff --git a/releases/release-5.1.0.md b/releases/release-5.1.0.md index 608bad96342f1..b7de8833254e0 100644 --- a/releases/release-5.1.0.md +++ b/releases/release-5.1.0.md @@ -23,7 +23,7 @@ In v5.1, the key new features or improvements are as follows: > **Note:** > -> When upgrading from an earlier TiDB version to v5.1, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/release-notes.md) for the corresponding version. +> When upgrading from an earlier TiDB version to v5.1, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/_index.md) for the corresponding version. ### System variables diff --git a/releases/release-5.2.0.md b/releases/release-5.2.0.md index 40f4df5a0374a..d3cbda1ce1ff5 100644 --- a/releases/release-5.2.0.md +++ b/releases/release-5.2.0.md @@ -27,7 +27,7 @@ In v5.2, the key new features and improvements are as follows: > **Note:** > -> When upgrading from an earlier TiDB version to v5.2, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Note](/releases/release-notes.md) for the corresponding version. +> When upgrading from an earlier TiDB version to v5.2, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Note](/releases/_index.md) for the corresponding version. ### System variables diff --git a/releases/release-5.3.0.md b/releases/release-5.3.0.md index d461d76f4bb59..ee02eea95c8e3 100644 --- a/releases/release-5.3.0.md +++ b/releases/release-5.3.0.md @@ -26,7 +26,7 @@ In v5.3, the key new features or improvements are as follows: > **Note:** > -> When upgrading from an earlier TiDB version to v5.3.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/release-notes.md) of the corresponding version. +> When upgrading from an earlier TiDB version to v5.3.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/_index.md) of the corresponding version. ### System variables diff --git a/releases/release-5.4.0.md b/releases/release-5.4.0.md index 832ac4884d262..7babe523ea4f9 100644 --- a/releases/release-5.4.0.md +++ b/releases/release-5.4.0.md @@ -27,7 +27,7 @@ In v5.4, the key new features or improvements are as follows: > **Note:** > -> When upgrading from an earlier TiDB version to v5.4.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/release-notes.md) of the corresponding version. +> When upgrading from an earlier TiDB version to v5.4.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/_index.md) of the corresponding version. ### System variables diff --git a/releases/release-6.0.0-dmr.md b/releases/release-6.0.0-dmr.md index 8ceb69dcc9b65..2d70511c8cfad 100644 --- a/releases/release-6.0.0-dmr.md +++ b/releases/release-6.0.0-dmr.md @@ -283,7 +283,7 @@ TiDB v6.0.0 is a DMR, and its version is 6.0.0-DMR. > **Note:** > -> When upgrading from an earlier TiDB version to v6.0.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/release-notes.md) of the corresponding version. +> When upgrading from an earlier TiDB version to v6.0.0, if you want to know the compatibility change notes of all intermediate versions, you can check the [Release Notes](/releases/_index.md) of the corresponding version. ### System variables diff --git a/releases/release-7.0.0.md b/releases/release-7.0.0.md index 53cf17f13a1fc..603c9dc39cc30 100644 --- a/releases/release-7.0.0.md +++ b/releases/release-7.0.0.md @@ -86,7 +86,7 @@ In v7.0.0-DMR, the key new features and improvements are as follows: Starting from TiDB v7.0.0, Fast Online DDL and PITR are fully compatible. When restoring cluster data through PITR, the index operations added via Fast Online DDL during log backup will be automatically replayed to achieve compatibility. - For more information, see [documentation](/ddl-introduction.md). + For more information, see [documentation](/best-practices/ddl-introduction.md). * TiFlash supports null-aware semi join and null-aware anti semi join operators [#6674](https://github.com/pingcap/tiflash/issues/6674) @[gengliqi](https://github.com/gengliqi) @@ -142,7 +142,7 @@ In v7.0.0-DMR, the key new features and improvements are as follows: TiDB v6.5.0 supports creating ordinary secondary indexes via Fast Online DDL. TiDB v7.0.0 supports creating unique indexes via Fast Online DDL. Compared to v6.1.0, adding unique indexes to large tables is expected to be several times faster with improved performance. - For more information, see [documentation](/ddl-introduction.md). + For more information, see [documentation](/best-practices/ddl-introduction.md). ### Reliability @@ -168,7 +168,7 @@ In v7.0.0-DMR, the key new features and improvements are as follows: TiDB v7.0.0 introduces a checkpoint mechanism for [Fast Online DDL](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630), which significantly improves its fault tolerance and automatic recovery capabilities. By periodically recording and synchronizing the DDL progress, ongoing DDL operations can continue to be executed in Fast Online DDL mode even if there is a TiDB DDL Owner failure or switch. This makes the execution of DDL more stable and efficient. - For more information, see [documentation](/ddl-introduction.md). + For more information, see [documentation](/best-practices/ddl-introduction.md). * TiFlash supports spilling to disk [#6528](https://github.com/pingcap/tiflash/issues/6528) @[windtalker](https://github.com/windtalker) diff --git a/releases/release-7.1.0.md b/releases/release-7.1.0.md index e53525e28fc6e..458675ff000dc 100644 --- a/releases/release-7.1.0.md +++ b/releases/release-7.1.0.md @@ -156,7 +156,7 @@ Compared with the previous LTS 6.5.0, 7.1.0 not only includes new features, impr * Support the checkpoint mechanism for Fast Online DDL to improve fault tolerance and automatic recovery capability [#42164](https://github.com/pingcap/tidb/issues/42164) @[tangenta](https://github.com/tangenta) - TiDB v7.1.0 introduces a checkpoint mechanism for [Fast Online DDL](/ddl-introduction.md), which significantly improves the fault tolerance and automatic recovery capability of Fast Online DDL. Even if the TiDB owner node is restarted or changed due to failures, TiDB can still recover progress from checkpoints that are automatically updated on a regular basis, making the DDL execution more stable and efficient. + TiDB v7.1.0 introduces a checkpoint mechanism for [Fast Online DDL](/best-practices/ddl-introduction.md), which significantly improves the fault tolerance and automatic recovery capability of Fast Online DDL. Even if the TiDB owner node is restarted or changed due to failures, TiDB can still recover progress from checkpoints that are automatically updated on a regular basis, making the DDL execution more stable and efficient. For more information, see [documentation](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630). diff --git a/releases/release-7.2.0.md b/releases/release-7.2.0.md index aa2d03d35c080..6c98ccf0f5026 100644 --- a/releases/release-7.2.0.md +++ b/releases/release-7.2.0.md @@ -146,7 +146,7 @@ Quick access: [Quick start](https://docs-archive.pingcap.com/tidb/v7.2/quick-sta ADMIN RESUME DDL JOBS 1,2; ``` - For more information, see [documentation](/ddl-introduction.md#ddl-related-commands). + For more information, see [documentation](/best-practices/ddl-introduction.md#ddl-related-commands). ### Data migration diff --git a/releases/release-7.5.0.md b/releases/release-7.5.0.md index d39ef73b9b7dd..8b09b93c7370c 100644 --- a/releases/release-7.5.0.md +++ b/releases/release-7.5.0.md @@ -108,7 +108,7 @@ Compared with the previous LTS 7.1.0, 7.5.0 includes new features, improvements, ADMIN RESUME DDL JOBS 1,2; ``` - For more information, see [documentation](/ddl-introduction.md#ddl-related-commands). + For more information, see [documentation](/best-practices/ddl-introduction.md#ddl-related-commands). * BR supports backing up and restoring statistics [#48008](https://github.com/pingcap/tidb/issues/48008) @[Leavrth](https://github.com/Leavrth) diff --git a/releases/release-8.2.0.md b/releases/release-8.2.0.md index fc13b08813506..a6b47a2cf8d0b 100644 --- a/releases/release-8.2.0.md +++ b/releases/release-8.2.0.md @@ -226,7 +226,7 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v8.2/quick-start-with- + TiDB - - Support parallel execution of [logical DDL statements (General DDL)](/ddl-introduction.md#types-of-ddl-statements). Compared with v8.1.0, when you use 10 sessions to submit different DDL statements concurrently, the performance is improved by 3 to 6 times [#53246](https://github.com/pingcap/tidb/issues/53246) @[D3Hunter](https://github.com/D3Hunter) + - Support parallel execution of [logical DDL statements (General DDL)](/best-practices/ddl-introduction.md#types-of-ddl-statements). Compared with v8.1.0, when you use 10 sessions to submit different DDL statements concurrently, the performance is improved by 3 to 6 times [#53246](https://github.com/pingcap/tidb/issues/53246) @[D3Hunter](https://github.com/D3Hunter) - Improve the logic of matching multi-column indexes using expressions like `((a = 1 and b = 2 and c > 3) or (a = 4 and b = 5 and c > 6)) and d > 3` to produce a more accurate `Range` [#41598](https://github.com/pingcap/tidb/issues/41598) @[ghazalfamilyusa](https://github.com/ghazalfamilyusa) - Optimize the performance of obtaining data distribution information when performing simple queries on tables with large data volumes [#53850](https://github.com/pingcap/tidb/issues/53850) @[you06](https://github.com/you06) - The aggregated result set can be used as an inner table for IndexJoin, allowing more complex queries to be matched to IndexJoin, thus improving query efficiency through indexing [#37068](https://github.com/pingcap/tidb/issues/37068) @[elsa0520](https://github.com/elsa0520) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 8f13541c78874..9e73a24be1652 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -200,13 +200,13 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v8.4/quick-start-with- Vector search is a search method based on data semantics, which provides more relevant search results. As one of the core functions of AI and large language models (LLMs), vector search can be used in various scenarios such as Retrieval-Augmented Generation (RAG), semantic search, and recommendation systems. - Starting from v8.4.0, TiDB supports [vector data types](/vector-search/vector-search-data-types.md) and [vector search indexes](/vector-search/vector-search-index.md), offering powerful vector search capabilities. TiDB vector data types support up to 16,383 dimensions and support various [distance functions](/vector-search/vector-search-functions-and-operators.md#vector-functions), including L2 distance (Euclidean distance), cosine distance, negative inner product, and L1 distance (Manhattan distance). + Starting from v8.4.0, TiDB supports [vector data types](/ai/reference/vector-search-data-types.md) and [vector search indexes](/ai/reference/vector-search-index.md), offering powerful vector search capabilities. TiDB vector data types support up to 16,383 dimensions and support various [distance functions](/ai/reference/vector-search-functions-and-operators.md#vector-functions), including L2 distance (Euclidean distance), cosine distance, negative inner product, and L1 distance (Manhattan distance). To start vector search, you only need to create a table with vector data types, insert vector data, and then perform a query of vector data. You can also perform mixed queries of vector data and traditional relational data. - To enhance the performance of vector search, you can create and use [vector search indexes](/vector-search/vector-search-index.md). Note that TiDB vector search indexes rely on TiFlash. Before using vector search indexes, make sure that TiFlash nodes are deployed in your TiDB cluster. + To enhance the performance of vector search, you can create and use [vector search indexes](/ai/reference/vector-search-index.md). Note that TiDB vector search indexes rely on TiFlash. Before using vector search indexes, make sure that TiFlash nodes are deployed in your TiDB cluster. - For more information, see [documentation](/vector-search/vector-search-overview.md). + For more information, see [documentation](/ai/concepts/vector-search-overview.md). ### DB operations diff --git a/scripts/verify-internal-links-in-toc.js b/scripts/verify-internal-links-in-toc.js new file mode 100644 index 0000000000000..8f9a1431c7a4b --- /dev/null +++ b/scripts/verify-internal-links-in-toc.js @@ -0,0 +1,344 @@ +import * as fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; +import glob from "glob"; + +import { visit } from "unist-util-visit"; + +import { generateMdAstFromFile } from "./utils.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const ROOT = path.resolve(__dirname, ".."); + +const SPECIAL_IMPLICIT_TARGETS = new Set(["_index.md", "_docHome.md"]); +const EXCLUDED_TOC_FILES = new Set(["TOC-pingkai.md"]); + +const CLOUD_TOC_FILES = [ + "TOC-tidb-cloud.md", + "TOC-tidb-cloud-premium.md", + "TOC-tidb-cloud-starter.md", + "TOC-tidb-cloud-essential.md", +]; + +const PREFIX_TO_TOC = [ + { prefix: "ai/", toc: "TOC-ai.md" }, + { prefix: "api/", toc: "TOC-api.md" }, + { prefix: "develop/", toc: "TOC-develop.md" }, + { prefix: "releases/", toc: "TOC-tidb-releases.md" }, + { prefix: "tidb-cloud/releases/", toc: "TOC-tidb-cloud-releases.md" }, + { prefix: "best-practices/", toc: "TOC-best-practices.md" }, +]; + +const sortByLocale = (left, right) => left.localeCompare(right); + +function isExternalUrl(url = "") { + return ( + url.startsWith("//") || url.includes("://") || url.startsWith("mailto:") + ); +} + +function stripQueryAndHash(url = "") { + const q = url.split("?")[0]; + const [p, hash] = q.split("#"); + return { path: p, hash: hash || "" }; +} + +function isInternalDocLink(url = "") { + if (!url) return false; + if (isExternalUrl(url)) return false; + if (!url.startsWith("/")) return false; + if (url.startsWith("/media/")) return false; + const { path: p } = stripQueryAndHash(url); + return p.endsWith(".md") || p.endsWith(".mdx"); +} + +function toTargetRel(url = "") { + return stripQueryAndHash(url).path.replace(/^\/+/, ""); +} + +function extractInternalDocTargetsFromUrls(urls = []) { + return urls + .filter((url) => isInternalDocLink(url)) + .map((url) => toTargetRel(url)); +} + +function extractInternalDocTargetsFromMarkdownFile(absPath) { + return extractInternalDocTargetsFromUrls(extractUrlsFromMarkdownFile(absPath)); +} + +function sortedValues(values = []) { + return [...values].sort(sortByLocale); +} + +function extractUrlsFromMarkdownFile(absPath) { + const buf = fs.readFileSync(absPath); + const ast = generateMdAstFromFile(buf); + const urls = []; + visit(ast, ["link", "definition"], (node) => { + if (typeof node.url === "string" && node.url.trim()) { + urls.push(node.url.trim()); + } + }); + return urls; +} + +function readTocFiles() { + const tocFiles = glob + .sync("TOC*.md", { cwd: ROOT, nodir: true }) + .filter((f) => !EXCLUDED_TOC_FILES.has(f)) + .sort(sortByLocale); + return tocFiles; +} + +function buildTocIndex(tocFiles) { + const tocToPages = new Map(); // tocFile -> Set(relPathWithoutLeadingSlash) + const anyTocPages = new Set(); + const pageToTocs = new Map(); // pageRel -> Set(tocFile) + + tocFiles.forEach((toc) => { + const tocAbs = path.join(ROOT, toc); + const pages = new Set(); + + extractInternalDocTargetsFromMarkdownFile(tocAbs).forEach((rel) => { + pages.add(rel); + anyTocPages.add(rel); + + const tocs = pageToTocs.get(rel) || new Set(); + tocs.add(toc); + pageToTocs.set(rel, tocs); + }); + + tocToPages.set(toc, pages); + }); + + const cloudTocPages = new Set( + CLOUD_TOC_FILES.flatMap((toc) => [...(tocToPages.get(toc) || new Set())]) + ); + + return { tocToPages, anyTocPages, pageToTocs, cloudTocPages }; +} + +function expectedSetForTarget(targetRel, tocToPages, anyTocPages, cloudTocPages) { + if ( + targetRel === "_index.md" || + targetRel.endsWith("/_index.md") || + targetRel === "_docHome.md" || + targetRel.endsWith("/_docHome.md") + ) { + return { ok: true }; + } + + if ( + targetRel.startsWith("tidb-cloud/") && + !targetRel.startsWith("tidb-cloud/releases/") + ) { + return { + ok: cloudTocPages.has(targetRel), + expectedLabel: "any TiDB Cloud TOC", + }; + } + + const matchedPrefix = PREFIX_TO_TOC.find(({ prefix }) => + targetRel.startsWith(prefix) + ); + if (matchedPrefix) { + const set = tocToPages.get(matchedPrefix.toc) || new Set(); + return { ok: set.has(targetRel), expectedLabel: matchedPrefix.toc }; + } + + // Default: the target appears in any TOC*.md + return { ok: anyTocPages.has(targetRel), expectedLabel: "any TOC*.md" }; +} + +function main() { + process.chdir(ROOT); + + const verbose = + process.env.VERBOSE_TOC === "1" || + process.env.VERBOSE_TOC === "true" || + process.env.VERBOSE === "1" || + process.env.VERBOSE === "true"; + const maxMissing = + Number.parseInt(process.env.TOC_MAX_MISSING || "", 10) || 50; + const maxFiles = + Number.parseInt(process.env.TOC_MAX_FILES || "", 10) || 30; + const maxLinksPerFile = + Number.parseInt(process.env.TOC_MAX_LINKS_PER_FILE || "", 10) || 10; + + const tocFiles = readTocFiles(); + if (tocFiles.length === 0) { + console.error("TOC check error: no TOC*.md files found in repo root."); + process.exit(1); + } + + const { tocToPages, anyTocPages, pageToTocs, cloudTocPages } = + buildTocIndex(tocFiles); + const buildScopePages = sortedValues(anyTocPages); + + const missingScopePages = []; + const violations = []; + + buildScopePages.forEach((sourceRel) => { + const sourceAbs = path.join(ROOT, sourceRel); + if (!fs.existsSync(sourceAbs)) { + missingScopePages.push(sourceRel); + return; + } + + extractInternalDocTargetsFromMarkdownFile(sourceAbs) + .filter((targetRel) => + !SPECIAL_IMPLICIT_TARGETS.has(path.basename(targetRel)) + ) + .forEach((targetRel) => { + const { ok, expectedLabel } = expectedSetForTarget( + targetRel, + tocToPages, + anyTocPages, + cloudTocPages + ); + if (!ok) { + violations.push({ + sourceRel, + targetRel, + expectedLabel, + }); + } + }); + }); + + if (missingScopePages.length > 0) { + // Printed below in a grouped summary. + } + + if (violations.length > 0) { + // Printed below in a grouped summary. + } + + if (missingScopePages.length > 0 || violations.length > 0) { + const byTarget = violations.reduce((groupedMap, violation) => { + const current = groupedMap.get(violation.targetRel) || { + targetRel: violation.targetRel, + expectedLabel: violation.expectedLabel, + sourceFiles: new Set(), + }; + current.sourceFiles.add(violation.sourceRel); + groupedMap.set(violation.targetRel, current); + return groupedMap; + }, new Map()); + + console.error("TOC check report: FAILED"); + console.error( + `- Scope: pages included by TOC*.md (excluding: ${[ + ...EXCLUDED_TOC_FILES, + ].join(", ") || "(none)"})` + ); + console.error(`- In-scope pages: ${buildScopePages.length}`); + console.error( + `- Missing in-scope pages (referenced by TOC but not on disk): ${missingScopePages.length}` + ); + console.error( + `- TOC membership violations: ${violations.length} links across ${byTarget.size} targets` + ); + console.error(""); + + if (missingScopePages.length > 0) { + console.error( + `=== Missing pages referenced by TOC*.md (${missingScopePages.length}) ===` + ); + console.error(""); + missingScopePages.slice(0, maxMissing).forEach((p) => { + const referencedBy = sortedValues(pageToTocs.get(p) || new Set()); + if (referencedBy.length > 0) { + console.error(`- ${p}`); + console.error(` referenced by: ${referencedBy.join(", ")}`); + } else { + console.error(`- ${p}`); + } + }); + if (!verbose && missingScopePages.length > maxMissing) { + console.error( + `- ... and ${missingScopePages.length - maxMissing} more (set TOC_MAX_MISSING or VERBOSE_TOC=1 to show more)` + ); + } + console.error(""); + } + + if (violations.length > 0) { + console.error(`=== TOC membership violations (grouped by target) ===`); + console.error(""); + + const targets = [...byTarget.values()].sort((a, b) => { + const diff = b.sourceFiles.size - a.sourceFiles.size; + if (diff !== 0) return diff; + return sortByLocale(a.targetRel, b.targetRel); + }); + const shownTargets = verbose ? targets : targets.slice(0, maxFiles); + + shownTargets.forEach((item, index) => { + const targetUrl = `/${item.targetRel}`; + const targetTocs = sortedValues( + pageToTocs.get(item.targetRel) || new Set() + ); + const sourceFiles = sortedValues(item.sourceFiles); + + console.error(`Target: ${targetUrl}`); + if (targetTocs.length === 0) { + if (item.expectedLabel === "any TOC*.md") { + console.error(`Issue: Missing from TOC index`); + console.error(`Expected TOC: any TOC*.md`); + } else { + console.error(`Issue: Missing from TOC index`); + console.error(`Expected TOC: ${item.expectedLabel}`); + } + } else { + console.error(`Issue: TOC mismatch`); + console.error(`Current TOC: ${targetTocs.join(", ")}`); + console.error(`Expected TOC: ${item.expectedLabel}`); + } + + console.error(""); + console.error(`Referenced in (${sourceFiles.length}):`); + const shownFiles = verbose + ? sourceFiles + : sourceFiles.slice(0, maxLinksPerFile); + shownFiles.forEach((sourceRel) => { + console.error(` - ${sourceRel}`); + }); + if (!verbose && sourceFiles.length > maxLinksPerFile) { + console.error( + ` - ... and ${sourceFiles.length - maxLinksPerFile} more (set TOC_MAX_LINKS_PER_FILE or VERBOSE_TOC=1)` + ); + } + + if (index < shownTargets.length - 1) { + console.error(""); + } + }); + + if (!verbose && targets.length > maxFiles) { + console.error(""); + console.error( + `... and ${targets.length - maxFiles} more target links (set TOC_MAX_FILES or VERBOSE_TOC=1)` + ); + } + + console.error("=== How to fix ==="); + console.error( + "- If the target page should be part of the site, add it to the expected TOC (per folder mapping)." + ); + console.error( + "- Otherwise, update the link to point to an in-scope page that is included by TOC." + ); + console.error(""); + } + + process.exit(1); + } + + console.log( + `TOC check report: OK. Checked ${buildScopePages.length} in-scope pages (from TOC*.md) and found no TOC membership violations.` + ); +} + +main(); diff --git a/scripts/verify-link-anchors.sh b/scripts/verify-link-anchors.sh index 77faf1fdcd30c..469e68b505ff8 100755 --- a/scripts/verify-link-anchors.sh +++ b/scripts/verify-link-anchors.sh @@ -7,8 +7,24 @@ ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) cd $ROOT -npm install -g remark-cli@9.0.0 remark-lint@8.0.0 breeswish/remark-lint-pingcap-docs-anchor +REMARK_CMD=() +if [ -x "$ROOT/node_modules/.bin/remark" ]; then + # Prefer the repo-local pinned version (installed by `npm ci`). + REMARK_CMD=("$ROOT/node_modules/.bin/remark") +elif command -v remark >/dev/null 2>&1; then + # Fall back to a globally-installed version (less reproducible). + REMARK_CMD=(remark) +else + REMARK_CMD=(npx --no-install remark) +fi echo "info: checking links anchors under $ROOT directory..." -remark --ignore-path .gitignore -u lint -u remark-lint-pingcap-docs-anchor . --frail --quiet +"${REMARK_CMD[@]}" \ + --ignore-path .gitignore \ + --ignore-pattern '.*/**' \ + -u lint \ + -u @breeswish-org/remark-lint-pingcap-docs-anchor \ + . \ + --frail \ + --quiet diff --git a/scripts/verify-links.sh b/scripts/verify-links.sh index 119eb1fec53be..1cb3d7b156ac4 100755 --- a/scripts/verify-links.sh +++ b/scripts/verify-links.sh @@ -15,7 +15,17 @@ ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) cd $ROOT -npm install -g markdown-link-check@3.8.1 +MLC_CMD=() +if [ -x "$ROOT/node_modules/.bin/markdown-link-check" ]; then + # Prefer the repo-local pinned version (installed by `npm ci`). + MLC_CMD=("$ROOT/node_modules/.bin/markdown-link-check") +elif command -v markdown-link-check >/dev/null 2>&1; then + # Fall back to a globally-installed version (less reproducible). + MLC_CMD=(markdown-link-check) +else + # As a last resort, rely on `npx` without installing. + MLC_CMD=(npx --no-install markdown-link-check) +fi VERBOSE=${VERBOSE:-} CONFIG_TMP=$(mktemp) @@ -49,7 +59,7 @@ fi while read -r tasks; do for task in $tasks; do ( - output=$(markdown-link-check --config "$CONFIG_TMP" "$task" -q) + output=$("${MLC_CMD[@]}" --config "$CONFIG_TMP" "$task" -q) if [ $? -ne 0 ]; then printf "$output" >> $ERROR_REPORT fi @@ -59,7 +69,7 @@ while read -r tasks; do ) & done wait -done <<<"$(find "." -type f -not -path './node_modules/*' -name '*.md' | xargs -n 10)" +done <<<"$(find "." -type f -name '*.md' -not -path './node_modules/*' -not -path './tmp/*' -not -path './.*/*' | xargs -n 10)" error_files=$(cat $ERROR_REPORT | grep 'FILE: ' | wc -l) error_output=$(cat $ERROR_REPORT) diff --git a/sql-statements/sql-statement-admin-show-ddl.md b/sql-statements/sql-statement-admin-show-ddl.md index c62b7b558e2b1..7ce45927da1cf 100644 --- a/sql-statements/sql-statement-admin-show-ddl.md +++ b/sql-statements/sql-statement-admin-show-ddl.md @@ -69,7 +69,7 @@ The `ADMIN SHOW DDL JOBS` statement is used to view the 10 jobs in the current D - `add index`: for [`ADD INDEX`](/sql-statements/sql-statement-add-index.md) operations. - `SCHEMA_STATE`: the current state of the schema object that the DDL operates on. If `JOB_TYPE` is `ADD INDEX`, it is the state of the index; if `JOB_TYPE` is `ADD COLUMN`, it is the state of the column; if `JOB_TYPE` is `CREATE TABLE`, it is the state of the table. Common states include the following: - `none`: indicates that it does not exist. Generally, after the `DROP` operation or after the `CREATE` operation fails and rolls back, it will become the `none` state. - - `delete only`, `write only`, `delete reorganization`, `write reorganization`: these four states are intermediate states. For their specific meanings, see [How the Online DDL Asynchronous Change Works in TiDB](/ddl-introduction.md#how-the-online-ddl-asynchronous-change-works-in-tidb). As the intermediate state conversion is fast, these states are generally not visible during operation. Only when performing `ADD INDEX` operation can the `write reorganization` state be seen, indicating that index data is being added. + - `delete only`, `write only`, `delete reorganization`, `write reorganization`: these four states are intermediate states. For their specific meanings, see [How the Online DDL Asynchronous Change Works in TiDB](/best-practices/ddl-introduction.md#how-the-online-ddl-asynchronous-change-works-in-tidb). As the intermediate state conversion is fast, these states are generally not visible during operation. Only when performing `ADD INDEX` operation can the `write reorganization` state be seen, indicating that index data is being added. - `public`: indicates that it exists and is available to users. Generally, after `CREATE TABLE` and `ADD INDEX` (or `ADD COLUMN`) operations are completed, it will become the `public` state, indicating that the newly created table, column, and index can be read and written normally. - `SCHEMA_ID`: the ID of the database where the DDL operation is performed. - `TABLE_ID`: the ID of the table where the DDL operation is performed. @@ -247,7 +247,7 @@ This statement is a TiDB extension to MySQL syntax. ## See also -* [DDL introduction](/ddl-introduction.md) +* [DDL introduction](/best-practices/ddl-introduction.md) * [`ADMIN CANCEL DDL`](/sql-statements/sql-statement-admin-cancel-ddl.md) * [`ADMIN PAUSE DDL`](/sql-statements/sql-statement-admin-pause-ddl.md) * [`ADMIN RESUME DDL`](/sql-statements/sql-statement-admin-resume-ddl.md) diff --git a/system-variable-reference.md b/system-variable-reference.md index 65fd4b7e1cfd0..c6f179d0efec5 100644 --- a/system-variable-reference.md +++ b/system-variable-reference.md @@ -440,7 +440,7 @@ Referenced in: Referenced in: -- [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) +- [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) - [Limited SQL features on TiDB Cloud](https://docs.pingcap.com/tidbcloud/limited-sql-features) - [System Variables](/system-variables.md#interactive_timeout) - [TiDB Cluster Management FAQs](/faq/manage-cluster-faq.md) @@ -527,7 +527,7 @@ Referenced in: Referenced in: -- [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) +- [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - [Optimizer Hints](/optimizer-hints.md) - [SQL Plan Management (SPM)](/sql-plan-management.md) @@ -724,11 +724,10 @@ Referenced in: - [Connect to TiDB with PyMySQL](/develop/dev-guide-sample-application-python-pymysql.md) - [Connect to TiDB with SQLAlchemy](/develop/dev-guide-sample-application-python-sqlalchemy.md) - [Connect to TiDB with peewee](/develop/dev-guide-sample-application-python-peewee.md) -- [Get Started with TiDB + AI via Python](/vector-search/vector-search-get-started-using-python.md) -- [Integrate TiDB Vector Search with Jina AI Embeddings API](/vector-search/vector-search-integrate-with-jinaai-embedding.md) -- [Integrate TiDB Vector Search with SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) -- [Integrate Vector Search with LangChain](/vector-search/vector-search-integrate-with-langchain.md) -- [Integrate Vector Search with LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) +- [Integrate TiDB Vector Search with Jina AI Embeddings API](/ai/integrations/vector-search-integrate-with-jinaai-embedding.md) +- [Integrate TiDB Vector Search with SQLAlchemy](/ai/integrations/vector-search-integrate-with-sqlalchemy.md) +- [Integrate Vector Search with LangChain](/ai/integrations/vector-search-integrate-with-langchain.md) +- [Integrate Vector Search with LlamaIndex](/ai/integrations/vector-search-integrate-with-llamaindex.md) - [System Variables](/system-variables.md#ssl_ca) ### ssl_cert @@ -1211,7 +1210,7 @@ Referenced in: - [ADMIN ALTER DDL JOBS](/sql-statements/sql-statement-admin-alter-ddl.md) - [ADMIN SHOW DDL [JOBS|JOB QUERIES]](/sql-statements/sql-statement-admin-show-ddl.md) -- [Best Practices for DDL Execution in TiDB](/ddl-introduction.md) +- [Best Practices for DDL Execution in TiDB](/best-practices/ddl-introduction.md) - [CREATE INDEX](/sql-statements/sql-statement-create-index.md) - [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/online-workloads-and-add-index-operations.md) - [Limited SQL features on TiDB Cloud](https://docs.pingcap.com/tidbcloud/limited-sql-features) @@ -1257,7 +1256,7 @@ Referenced in: - [ADMIN ALTER DDL JOBS](/sql-statements/sql-statement-admin-alter-ddl.md) - [ADMIN SHOW DDL [JOBS|JOB QUERIES]](/sql-statements/sql-statement-admin-show-ddl.md) -- [Best Practices for DDL Execution in TiDB](/ddl-introduction.md) +- [Best Practices for DDL Execution in TiDB](/best-practices/ddl-introduction.md) - [CREATE INDEX](/sql-statements/sql-statement-create-index.md) - [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/online-workloads-and-add-index-operations.md) - [Limited SQL features on TiDB Cloud](https://docs.pingcap.com/tidbcloud/limited-sql-features) @@ -1682,7 +1681,7 @@ Referenced in: Referenced in: -- [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) +- [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - [System Variables](/system-variables.md#tidb_enable_lazy_cursor_fetch-new-in-v830) - [TiDB 8.3.0 Release Notes](/releases/release-8.3.0.md) @@ -2046,7 +2045,7 @@ Referenced in: Referenced in: -- [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) +- [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - [Enable Encryption for Disk Spill](/enable-disk-spill-encrypt.md) - [Explain Statements That Use Joins](/explain-joins.md) @@ -3544,7 +3543,7 @@ Referenced in: - [Optimizer Hints](/optimizer-hints.md) - [SHOW [GLOBAL|SESSION] VARIABLES](/sql-statements/sql-statement-show-variables.md) - [System Variables](/system-variables.md#tidb_replica_read-new-in-v40) -- [TiDB Best Practices on Public Cloud](/best-practices-on-public-cloud.md) +- [TiDB Best Practices on Public Cloud](/best-practices/best-practices-on-public-cloud.md) - [TiDB 8.5.4 Release Notes](/releases/release-8.5.4.md) - [TiDB 8.5.3 Release Notes](/releases/release-8.5.3.md) - [TiDB 7.0.0 Release Notes](/releases/release-7.0.0.md) @@ -4098,7 +4097,7 @@ Referenced in: - [Limited SQL features on TiDB Cloud](https://docs.pingcap.com/tidbcloud/limited-sql-features) - [System Variables](/system-variables.md#tidb_tso_client_batch_max_wait_time-new-in-v530) -- [TiDB Best Practices on Public Cloud](/best-practices-on-public-cloud.md) +- [TiDB Best Practices on Public Cloud](/best-practices/best-practices-on-public-cloud.md) - [TiDB 5.3 Release Notes](/releases/release-5.3.0.md) ### tidb_tso_client_rpc_mode @@ -4502,7 +4501,7 @@ Referenced in: Referenced in: -- [Best Practices for Developing Java Applications with TiDB](/best-practices/java-app-best-practices.md) +- [Best Practices for Developing Java Applications with TiDB](/develop/java-app-best-practices.md) - [Connection Pools and Connection Parameters](/develop/dev-guide-connection-parameters.md) - [Limited SQL features on TiDB Cloud](https://docs.pingcap.com/tidbcloud/limited-sql-features) - [System Variables](/system-variables.md#wait_timeout) diff --git a/telemetry.md b/telemetry.md index 77053acf23918..6f3a4c9f9adb3 100644 --- a/telemetry.md +++ b/telemetry.md @@ -16,7 +16,7 @@ When the telemetry feature is enabled, TiUP and TiSpark collect usage informatio ## What is shared when telemetry is enabled? -The following sections describe the shared usage information in detail for TiUP and TiSpark. The usage details that get shared might change over time. These changes (if any) will be announced in [release notes](/releases/release-notes.md). +The following sections describe the shared usage information in detail for TiUP and TiSpark. The usage details that get shared might change over time. These changes (if any) will be announced in [release notes](/releases/_index.md). > **Note:** > diff --git a/ticdc/ticdc-compatibility.md b/ticdc/ticdc-compatibility.md index 112c0990f8dbb..1857238e04f41 100644 --- a/ticdc/ticdc-compatibility.md +++ b/ticdc/ticdc-compatibility.md @@ -85,7 +85,7 @@ If the upstream cluster contains a global temporary table, the downstream TiDB c ### Compatibility with vector data types -Starting from v8.4.0, TiCDC supports replicating tables with [vector data types](/vector-search/vector-search-data-types.md) to downstream (experimental). +Starting from v8.4.0, TiCDC supports replicating tables with [vector data types](/ai/reference/vector-search-data-types.md) to downstream (experimental). When the downstream is Kafka or a storage service (such as Amazon S3, GCS, Azure Blob Storage, or NFS), TiCDC converts vector data types into string types before writing to the downstream. diff --git a/tidb-cloud/ai-feature-concepts.md b/tidb-cloud/ai-feature-concepts.md index 8fb3b7e33f0be..48a60ef7a9ea6 100644 --- a/tidb-cloud/ai-feature-concepts.md +++ b/tidb-cloud/ai-feature-concepts.md @@ -23,7 +23,7 @@ Unlike traditional full-text search, which relies on exact keyword matching and Even when the search terms do not exactly match the content in the database, vector search can still provide results that align with the user's intent by analyzing the semantics of the data. For example, a full-text search for "a swimming animal" only returns results containing these exact keywords. In contrast, vector search can return results for other swimming animals, such as fish or ducks, even if these results do not contain the exact keywords. -For more information, see [Vector Search (Beta) Overview](/vector-search/vector-search-overview.md). +For more information, see [Vector Search (Beta) Overview](/ai/concepts/vector-search-overview.md). ## AI integrations @@ -31,13 +31,13 @@ For more information, see [Vector Search (Beta) Overview](/vector-search/vector- TiDB provides official support for several popular AI frameworks, enabling you to easily integrate AI applications developed based on these frameworks with TiDB Vector Search. -For a list of supported AI frameworks, see [Vector Search Integration Overview](/vector-search/vector-search-integration-overview.md#ai-frameworks). +For a list of supported AI frameworks, see [Vector Search Integration Overview](/ai/integrations/vector-search-integration-overview.md#ai-frameworks). ### Embedding models and services A vector embedding, also known as an embedding, is a sequence of numbers that represents real-world objects in a high-dimensional space. It captures the meaning and context of unstructured data, such as documents, images, audio, and videos. -Embedding models are algorithms that transform data into [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding). The choice of an appropriate embedding model is crucial for ensuring the accuracy and relevance of semantic search results. +Embedding models are algorithms that transform data into [vector embeddings](/ai/concepts/vector-search-overview.md#vector-embedding). The choice of an appropriate embedding model is crucial for ensuring the accuracy and relevance of semantic search results. TiDB Vector Search supports storing vectors of up to 16383 dimensions, which accommodates most embedding models. For unstructured text data, you can find top-performing text embedding models on the [Massive Text Embedding Benchmark (MTEB) Leaderboard](https://huggingface.co/spaces/mteb/leaderboard). @@ -47,4 +47,4 @@ Object Relational Mapping (ORM) libraries are tools that facilitate the interact TiDB lets you integrate vector search with ORM libraries to manage vector data alongside traditional relational data. This integration is particularly useful for applications that need to store and query vector embeddings generated by AI models. By using ORM libraries, developers can seamlessly interact with vector data stored in TiDB, leveraging the database's capabilities to perform complex vector operations like nearest neighbor search. -For a list of supported ORM libraries, see [Vector Search Integration Overview](/vector-search/vector-search-integration-overview.md#object-relational-mapping-orm-libraries). \ No newline at end of file +For a list of supported ORM libraries, see [Vector Search Integration Overview](/ai/integrations/vector-search-integration-overview.md#object-relational-mapping-orm-libraries). \ No newline at end of file diff --git a/tidb-cloud/api-overview.md b/tidb-cloud/api-overview.md deleted file mode 100644 index dcae121d64d39..0000000000000 --- a/tidb-cloud/api-overview.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: TiDB Cloud API Overview -summary: Learn about what is TiDB Cloud API, its features, and how to use API to manage your TiDB Cloud clusters. ---- - -# TiDB Cloud API Overview (Beta) - -> **Note:** -> -> TiDB Cloud API is in beta. - -The TiDB Cloud API is a [REST interface](https://en.wikipedia.org/wiki/Representational_state_transfer) that provides you with programmatic access to manage administrative objects within TiDB Cloud. Through this API, you can automatically and efficiently manage resources such as Projects, Clusters, Backups, Restores, Imports, Billings, and resources in the [Data Service](/tidb-cloud/data-service-overview.md). - -The API has the following features: - -- **JSON entities.** All entities are expressed in JSON. -- **HTTPS-only.** You can only access the API via HTTPS, ensuring all the data sent over the network is encrypted with TLS. -- **Key-based access and digest authentication.** Before you access TiDB Cloud API, you must generate an API key, refer to [API Key Management](https://docs.pingcap.com/tidbcloud/api/v1beta#section/Authentication/API-key-management). All requests are authenticated through [HTTP Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication), ensuring the API key is never sent over the network. - -The TiDB Cloud API is available in two versions: - -- v1beta1 - - Cluster-level resources: - - [TiDB Cloud Starter or Essential Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta1/serverless): manage clusters, branches, data export tasks, and data import tasks for TiDB Cloud Starter or Essential clusters. - - [TiDB Cloud Dedicated Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta1/dedicated): manage clusters, regions, private endpoint connections, and data import tasks for TiDB Cloud Dedicated clusters. - - Organization or project-level resources: - - [Billing](https://docs.pingcap.com/tidbcloud/api/v1beta1/billing): manage billing for TiDB Cloud clusters. - - [Data Service](https://docs.pingcap.com/tidbcloud/api/v1beta1/dataservice): manage resources in the Data Service for TiDB Cloud clusters. - - [IAM](https://docs.pingcap.com/tidbcloud/api/v1beta1/iam): manage API keys for TiDB Cloud clusters. - - [MSP (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta1/msp) -- [v1beta](https://docs.pingcap.com/tidbcloud/api/v1beta) - - [Project](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Project) - - [Cluster](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Cluster) - - [Backup](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Backup) - - [Import (Deprecated)](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Import) - - [Restore](https://docs.pingcap.com/tidbcloud/api/v1beta/#tag/Restore) diff --git a/tidb-cloud/architecture-concepts.md b/tidb-cloud/architecture-concepts.md index a6f5976542d6a..3cd1090afd695 100644 --- a/tidb-cloud/architecture-concepts.md +++ b/tidb-cloud/architecture-concepts.md @@ -88,7 +88,7 @@ For more information, see [TiDB Cloud CLI Reference](/tidb-cloud/cli-reference.m The TiDB Cloud API is a REST-based interface that provides programmatic access to manage resources across {{{ .starter }}} and TiDB Cloud Dedicated. It enables automated and efficient handling of tasks such as managing projects, clusters, backups, restores, data imports, billing, and other resources in [TiDB Cloud Data Service](/tidb-cloud/data-service-overview.md). -For more information, see [TiDB Cloud API Overview](/tidb-cloud/api-overview.md). +For more information, see [TiDB Cloud API Overview](https://docs.pingcap.com/api/tidb-cloud-api-overview). ## Nodes diff --git a/tidb-cloud/connect-to-tidb-cluster-serverless.md b/tidb-cloud/connect-to-tidb-cluster-serverless.md index f38134683130b..9dd93545e9e71 100644 --- a/tidb-cloud/connect-to-tidb-cluster-serverless.md +++ b/tidb-cloud/connect-to-tidb-cluster-serverless.md @@ -9,9 +9,10 @@ This document describes how to connect to your {{{ .starter }}} or {{{ .essentia > **Tip:** > -> To learn how to connect to a TiDB Cloud Dedicated cluster, see [Connect to Your TiDB Cloud Dedicated Cluster](/tidb-cloud/connect-to-tidb-cluster.md). +> - To learn how to connect to a TiDB Cloud Dedicated cluster, see [Connect to Your TiDB Cloud Dedicated Cluster](/tidb-cloud/connect-to-tidb-cluster.md). +> - This document focuses on the network connection methods for {{{ .starter }}} and {{{ .essential }}}. To connect to TiDB via a specific tool, driver, or ORM, see [Connect to TiDB](/develop/dev-guide-connect-to-tidb.md). -## Connection methods +## Network connection methods After your {{{ .starter }}} or {{{ .essential }}} cluster is created on TiDB Cloud, you can connect to it via one of the following methods: @@ -23,7 +24,7 @@ After your {{{ .starter }}} or {{{ .essential }}} cluster is created on TiDB Clo TiDB Cloud provides a Data Service feature that enables you to connect to your {{{ .starter }}} cluster hosted on AWS via an HTTPS request using a custom API endpoint. Unlike direct connections, Data Service accesses your cluster data via a RESTful API rather than raw SQL. -- [Serverless Driver (beta)](/tidb-cloud/serverless-driver.md) +- [Serverless Driver (beta)](/develop/serverless-driver.md) TiDB Cloud provides a serverless driver for JavaScript, which allows you to connect to your {{{ .starter }}} or {{{ .essential }}} cluster in edge environments with the same experience as direct connections. diff --git a/tidb-cloud/connect-to-tidb-cluster.md b/tidb-cloud/connect-to-tidb-cluster.md index 36180d7333285..92b06eb3e36c5 100644 --- a/tidb-cloud/connect-to-tidb-cluster.md +++ b/tidb-cloud/connect-to-tidb-cluster.md @@ -9,9 +9,10 @@ This document introduces the methods to connect to your TiDB Cloud Dedicated clu > **Tip:** > -> To learn how to connect to a {{{ .starter }}} or {{{ .essential }}} cluster, see [Connect to Your {{{ .starter }}} or Essential Cluster](/tidb-cloud/connect-to-tidb-cluster-serverless.md). +> - To learn how to connect to a {{{ .starter }}} or {{{ .essential }}} cluster, see [Connect to Your {{{ .starter }}} or Essential Cluster](/tidb-cloud/connect-to-tidb-cluster-serverless.md). +> - This document focuses on the network connection methods for TiDB Cloud Dedicated. To connect to TiDB via a specific tool, driver, or ORM, see [Connect to TiDB](/develop/dev-guide-connect-to-tidb.md). -After your TiDB Cloud Dedicated cluster is created on TiDB Cloud, you can connect to it via one of the following methods: +After your TiDB Cloud Dedicated cluster is created on TiDB Cloud, you can connect to it via one of the following network connection methods: - Direct connections diff --git a/tidb-cloud/connected-ai-chat-in-im.md b/tidb-cloud/connected-ai-chat-in-im.md index 1c2eb3e30d283..210a0c44f0c1d 100644 --- a/tidb-cloud/connected-ai-chat-in-im.md +++ b/tidb-cloud/connected-ai-chat-in-im.md @@ -5,7 +5,7 @@ summary: Introduces detailed information about the AI chat in Instant Message (I # Connected: AI chat in IM -The AI chat in Instant Message (IM) powered by PingCAP, is an offering to invite TiDB AI assistant chatbot to specific IM channels for preliminary technical support and consultation. This service is based on Graph RAG (Retrieval-Augmented Generation) built on top of [TiDB Vector Search](/vector-search/vector-search-overview.md). +The AI chat in Instant Message (IM) powered by PingCAP, is an offering to invite TiDB AI assistant chatbot to specific IM channels for preliminary technical support and consultation. This service is based on Graph RAG (Retrieval-Augmented Generation) built on top of [TiDB Vector Search](/ai/concepts/vector-search-overview.md). ## Limitation diff --git a/tidb-cloud/data-service-manage-endpoint.md b/tidb-cloud/data-service-manage-endpoint.md index 84fd09a3ff20b..6f78f9ddc1d8d 100644 --- a/tidb-cloud/data-service-manage-endpoint.md +++ b/tidb-cloud/data-service-manage-endpoint.md @@ -44,7 +44,7 @@ In TiDB Cloud Data Service, you can generate one or multiple endpoints automatic For each operation you select, TiDB Cloud Data Service will generate a corresponding endpoint. If you select a batch operation (such as `POST (Batch Create)`), the generated endpoint lets you operate on multiple rows in a single request. - If the table you selected contains [vector data types](/vector-search/vector-search-data-types.md), you can enable the **Vector Search Operations** option and select a vector distance function to generate a vector search endpoint that automatically calculates vector distances based on your selected distance function. The supported [vector distance functions](/vector-search/vector-search-functions-and-operators.md) include the following: + If the table you selected contains [vector data types](/ai/reference/vector-search-data-types.md), you can enable the **Vector Search Operations** option and select a vector distance function to generate a vector search endpoint that automatically calculates vector distances based on your selected distance function. The supported [vector distance functions](/ai/reference/vector-search-functions-and-operators.md) include the following: - `VEC_L2_DISTANCE` (default): calculates the L2 distance (Euclidean distance) between two vectors. - `VEC_COSINE_DISTANCE`: calculates the cosine distance between two vectors. diff --git a/tidb-cloud/integrate-tidbcloud-with-cloudflare.md b/tidb-cloud/integrate-tidbcloud-with-cloudflare.md index 8517167c94643..61e0f65650f9d 100644 --- a/tidb-cloud/integrate-tidbcloud-with-cloudflare.md +++ b/tidb-cloud/integrate-tidbcloud-with-cloudflare.md @@ -7,7 +7,7 @@ summary: Learn how to deploy Cloudflare Workers with TiDB Cloud. [Cloudflare Workers](https://workers.cloudflare.com/) is a platform that allows you to run code in response to specific events, such as HTTP requests or changes to a database. Cloudflare Workers is easy to use and can be used to build a variety of applications, including custom APIs, serverless functions, and microservices. It is particularly useful for applications that require low-latency performance or need to scale quickly. -You may find it hard to connect to TiDB Cloud from Cloudflare Workers because Cloudflare Workers runs on the V8 engine which cannot make direct TCP connections. You can use [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md) to help you connect to Cloudflare Workers over HTTP connection. +You may find it hard to connect to TiDB Cloud from Cloudflare Workers because Cloudflare Workers runs on the V8 engine which cannot make direct TCP connections. You can use [TiDB Cloud serverless driver](/develop/serverless-driver.md) to help you connect to Cloudflare Workers over HTTP connection. This document shows how to connect to Cloudflare Workers with TiDB Cloud serverless driver step by step. diff --git a/tidb-cloud/integrate-tidbcloud-with-n8n.md b/tidb-cloud/integrate-tidbcloud-with-n8n.md index debe0979737a6..c852784ed8c22 100644 --- a/tidb-cloud/integrate-tidbcloud-with-n8n.md +++ b/tidb-cloud/integrate-tidbcloud-with-n8n.md @@ -21,7 +21,7 @@ This document introduces how to build an auto-workflow: create a {{{ .starter }} 4. Enter a description for the API key, and then click **Next**. 5. Copy the created API key for later use in n8n, and then click **Done**. -For more information, see [TiDB Cloud API Overview](/tidb-cloud/api-overview.md). +For more information, see [TiDB Cloud API Overview](https://docs.pingcap.com/api/tidb-cloud-api-overview). ## Step 1: Install n8n diff --git a/tidb-cloud/integrate-tidbcloud-with-netlify.md b/tidb-cloud/integrate-tidbcloud-with-netlify.md index 68bd3b22852b0..ebd8ccfc1b553 100644 --- a/tidb-cloud/integrate-tidbcloud-with-netlify.md +++ b/tidb-cloud/integrate-tidbcloud-with-netlify.md @@ -226,7 +226,7 @@ For a TiDB Cloud Dedicated cluster, you can get the connection string only from ## Use the edge function -The example app mentioned in the section above runs on the Netlify serverless function. This section shows you how to use the edge function with [TiDB Cloud serverless driver](/tidb-cloud/serverless-driver.md). The edge function is a feature provided by Netlify, which allows you to run serverless functions on the edge of the Netlify CDN. +The example app mentioned in the section above runs on the Netlify serverless function. This section shows you how to use the edge function with [TiDB Cloud serverless driver](/develop/serverless-driver.md). The edge function is a feature provided by Netlify, which allows you to run serverless functions on the edge of the Netlify CDN. To use the edge function, take the following steps: diff --git a/tidb-cloud/integrate-tidbcloud-with-vercel.md b/tidb-cloud/integrate-tidbcloud-with-vercel.md index 6f6ddf090d64a..e9500016a5ef5 100644 --- a/tidb-cloud/integrate-tidbcloud-with-vercel.md +++ b/tidb-cloud/integrate-tidbcloud-with-vercel.md @@ -18,7 +18,7 @@ This guide describes how to connect your TiDB Cloud clusters to Vercel projects For both of the preceding methods, TiDB Cloud provides the following options for programmatically connecting to your database: -- Cluster: connect your TiDB Cloud cluster to your Vercel project with direct connections or [serverless driver](/tidb-cloud/serverless-driver.md). +- Cluster: connect your TiDB Cloud cluster to your Vercel project with direct connections or [serverless driver](/develop/serverless-driver.md). - [Data App](/tidb-cloud/data-service-manage-data-app.md): access data of your TiDB Cloud cluster through a collection of HTTP endpoints. ## Prerequisites diff --git a/tidb-cloud/releases/_index.md b/tidb-cloud/releases/_index.md new file mode 100644 index 0000000000000..8aa2b1df1a0af --- /dev/null +++ b/tidb-cloud/releases/_index.md @@ -0,0 +1,16 @@ +--- +title: TiDB Cloud Releases +summary: Learn about TiDB Cloud release notes and maintenance notifications. +--- + +# TiDB Cloud Releases + +[TiDB Cloud](https://www.pingcap.com/tidb/cloud/) is a fully managed Database-as-a-Service (DBaaS) that brings [TiDB](https://docs.pingcap.com/tidb/stable/overview), an open-source Hybrid Transactional and Analytical Processing (HTAP) database, to your cloud. TiDB Cloud offers an easy way to deploy and manage databases to let you focus on your applications, not the complexities of databases. This document provides an overview of TiDB Cloud release notes and maintenance notifications. + +## Release notes + +TiDB Cloud release notes provide information about new features and improvements in each release. For detailed release notes, see [TiDB Cloud Release Notes](/tidb-cloud/releases/tidb-cloud-release-notes.md). + +## Maintenance notifications + +TiDB Cloud maintenance notifications provide information about scheduled maintenance activities that might affect your TiDB Cloud services. diff --git a/tidb-cloud/notification-2023-08-31-console-maintenance.md b/tidb-cloud/releases/notification-2023-08-31-console-maintenance.md similarity index 100% rename from tidb-cloud/notification-2023-08-31-console-maintenance.md rename to tidb-cloud/releases/notification-2023-08-31-console-maintenance.md diff --git a/tidb-cloud/notification-2023-09-26-console-maintenance.md b/tidb-cloud/releases/notification-2023-09-26-console-maintenance.md similarity index 100% rename from tidb-cloud/notification-2023-09-26-console-maintenance.md rename to tidb-cloud/releases/notification-2023-09-26-console-maintenance.md diff --git a/tidb-cloud/notification-2023-11-14-scale-feature-maintenance.md b/tidb-cloud/releases/notification-2023-11-14-scale-feature-maintenance.md similarity index 100% rename from tidb-cloud/notification-2023-11-14-scale-feature-maintenance.md rename to tidb-cloud/releases/notification-2023-11-14-scale-feature-maintenance.md diff --git a/tidb-cloud/notification-2024-04-09-monitoring-features-maintenance.md b/tidb-cloud/releases/notification-2024-04-09-monitoring-features-maintenance.md similarity index 100% rename from tidb-cloud/notification-2024-04-09-monitoring-features-maintenance.md rename to tidb-cloud/releases/notification-2024-04-09-monitoring-features-maintenance.md diff --git a/tidb-cloud/notification-2024-04-11-dm-feature-maintenance.md b/tidb-cloud/releases/notification-2024-04-11-dm-feature-maintenance.md similarity index 100% rename from tidb-cloud/notification-2024-04-11-dm-feature-maintenance.md rename to tidb-cloud/releases/notification-2024-04-11-dm-feature-maintenance.md diff --git a/tidb-cloud/notification-2024-04-16-monitoring-features-maintenance.md b/tidb-cloud/releases/notification-2024-04-16-monitoring-features-maintenance.md similarity index 100% rename from tidb-cloud/notification-2024-04-16-monitoring-features-maintenance.md rename to tidb-cloud/releases/notification-2024-04-16-monitoring-features-maintenance.md diff --git a/tidb-cloud/notification-2024-04-18-dm-feature-maintenance.md b/tidb-cloud/releases/notification-2024-04-18-dm-feature-maintenance.md similarity index 100% rename from tidb-cloud/notification-2024-04-18-dm-feature-maintenance.md rename to tidb-cloud/releases/notification-2024-04-18-dm-feature-maintenance.md diff --git a/tidb-cloud/notification-2024-09-15-console-maintenance.md b/tidb-cloud/releases/notification-2024-09-15-console-maintenance.md similarity index 100% rename from tidb-cloud/notification-2024-09-15-console-maintenance.md rename to tidb-cloud/releases/notification-2024-09-15-console-maintenance.md diff --git a/tidb-cloud/release-notes-2020.md b/tidb-cloud/releases/release-notes-2020.md similarity index 100% rename from tidb-cloud/release-notes-2020.md rename to tidb-cloud/releases/release-notes-2020.md diff --git a/tidb-cloud/release-notes-2021.md b/tidb-cloud/releases/release-notes-2021.md similarity index 100% rename from tidb-cloud/release-notes-2021.md rename to tidb-cloud/releases/release-notes-2021.md diff --git a/tidb-cloud/release-notes-2022.md b/tidb-cloud/releases/release-notes-2022.md similarity index 99% rename from tidb-cloud/release-notes-2022.md rename to tidb-cloud/releases/release-notes-2022.md index e198a23cd4c78..4d7231e518870 100644 --- a/tidb-cloud/release-notes-2022.md +++ b/tidb-cloud/releases/release-notes-2022.md @@ -292,7 +292,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c * The TiDB Cloud API (beta) is now available to all users. - You can start using the API by creating an API key in the TiDB Cloud console. For more information, refer to [API documentation](/tidb-cloud/api-overview.md). + You can start using the API by creating an API key in the TiDB Cloud console. For more information, refer to [API documentation](https://docs.pingcap.com/api/tidb-cloud-api-overview). ## September 15, 2022 @@ -340,7 +340,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c **API changes** -* Support increasing the storage of a TiKV or TiFlash node through the [TiDB Cloud API](/tidb-cloud/api-overview.md). You can use the `storage_size_gib` field of the API endpoint to do the scaling. +* Support increasing the storage of a TiKV or TiFlash node through the [TiDB Cloud API](https://docs.pingcap.com/api/tidb-cloud-api-overview). You can use the `storage_size_gib` field of the API endpoint to do the scaling. Currently, TiDB Cloud API is still in beta and only available upon request. diff --git a/tidb-cloud/release-notes-2023.md b/tidb-cloud/releases/release-notes-2023.md similarity index 99% rename from tidb-cloud/release-notes-2023.md rename to tidb-cloud/releases/release-notes-2023.md index 9acda9e3c5938..45b7f18594bec 100644 --- a/tidb-cloud/release-notes-2023.md +++ b/tidb-cloud/releases/release-notes-2023.md @@ -142,11 +142,11 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c The 2 vCPU option is no longer available on the **Create Cluster** page or the **Modify Cluster** page. -- Release [TiDB Cloud serverless driver (beta)](/tidb-cloud/serverless-driver.md) for JavaScript. +- Release [TiDB Cloud serverless driver (beta)](/develop/serverless-driver.md) for JavaScript. TiDB Cloud serverless driver for JavaScript allows you to connect to your [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#starter) cluster over HTTPS. It is particularly useful in edge environments where TCP connections are limited, such as [Vercel Edge Function](https://vercel.com/docs/functions/edge-functions) and [Cloudflare Workers](https://workers.cloudflare.com/). - For more information, see [TiDB Cloud serverless driver (beta)](/tidb-cloud/serverless-driver.md). + For more information, see [TiDB Cloud serverless driver (beta)](/develop/serverless-driver.md). **Console changes** diff --git a/tidb-cloud/release-notes-2024.md b/tidb-cloud/releases/release-notes-2024.md similarity index 95% rename from tidb-cloud/release-notes-2024.md rename to tidb-cloud/releases/release-notes-2024.md index 06797ede1ff99..c5fec11e25766 100644 --- a/tidb-cloud/release-notes-2024.md +++ b/tidb-cloud/releases/release-notes-2024.md @@ -196,7 +196,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c - [Data Service (beta)](https://tidbcloud.com/project/data-service) supports automatically generating vector search endpoints. - If your table contains [vector data types](/vector-search/vector-search-data-types.md), you can automatically generate a vector search endpoint that calculates vector distances based on your selected distance function. + If your table contains [vector data types](/ai/reference/vector-search-data-types.md), you can automatically generate a vector search endpoint that calculates vector distances based on your selected distance function. This feature enables seamless integration with AI platforms such as [Dify](https://docs.dify.ai/guides/tools) and [GPTs](https://openai.com/blog/introducing-gpts), enhancing your applications with advanced natural language processing and AI capabilities for more complex tasks and intelligent solutions. @@ -242,12 +242,12 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c The vector search (beta) feature provides an advanced search solution for performing semantic similarity searches across various data types, including documents, images, audio, and video. This feature enables developers to easily build scalable applications with generative artificial intelligence (AI) capabilities using familiar MySQL skills. Key features include: - - [Vector data types](/vector-search/vector-search-data-types.md), [vector index](/vector-search/vector-search-index.md), and [vector functions and operators](/vector-search/vector-search-functions-and-operators.md). - - Ecosystem integrations with [LangChain](/vector-search/vector-search-integrate-with-langchain.md), [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md), and [JinaAI](/vector-search/vector-search-integrate-with-jinaai-embedding.md). - - Programming language support for Python: [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md), [Peewee](/vector-search/vector-search-integrate-with-peewee.md), and [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md). - - Sample applications and tutorials: perform semantic searches for documents using [Python](/vector-search/vector-search-get-started-using-python.md) or [SQL](/vector-search/vector-search-get-started-using-sql.md). + - [Vector data types](/ai/reference/vector-search-data-types.md), [vector index](/ai/reference/vector-search-index.md), and [vector functions and operators](/ai/reference/vector-search-functions-and-operators.md). + - Ecosystem integrations with [LangChain](/ai/integrations/vector-search-integrate-with-langchain.md), [LlamaIndex](/ai/integrations/vector-search-integrate-with-llamaindex.md), and [JinaAI](/ai/integrations/vector-search-integrate-with-jinaai-embedding.md). + - Programming language support for Python: [SQLAlchemy](/ai/integrations/vector-search-integrate-with-sqlalchemy.md), [Peewee](/ai/integrations/vector-search-integrate-with-peewee.md), and [Django ORM](/ai/integrations/vector-search-integrate-with-django-orm.md). + - Sample applications and tutorials: perform semantic searches for documents using [Python](/ai/quickstart-via-python.md) or [SQL](/ai/quickstart-via-sql.md). - For more information, see [Vector search (beta) overview](/vector-search/vector-search-overview.md). + For more information, see [Vector search (beta) overview](/ai/concepts/vector-search-overview.md). - [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#starter) now offers weekly email reports for organization owners. @@ -346,7 +346,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c **CLI changes** -- Introduce [TiDB Cloud CLI 1.0.0-beta.1](https://github.com/tidbcloud/tidbcloud-cli), built upon the new [TiDB Cloud API](/tidb-cloud/api-overview.md). The new CLI brings the following new features: +- Introduce [TiDB Cloud CLI 1.0.0-beta.1](https://github.com/tidbcloud/tidbcloud-cli), built upon the new [TiDB Cloud API](https://docs.pingcap.com/api/tidb-cloud-api-overview). The new CLI brings the following new features: - [Export data from TiDB Cloud Serverless clusters](/tidb-cloud/serverless-export.md) - [Import data from local storage into TiDB Cloud Serverless clusters](/tidb-cloud/ticloud-import-start.md) diff --git a/tidb-cloud/release-notes-2025.md b/tidb-cloud/releases/release-notes-2025.md similarity index 99% rename from tidb-cloud/release-notes-2025.md rename to tidb-cloud/releases/release-notes-2025.md index 41a7c5e2887c3..e7137b685bb5d 100644 --- a/tidb-cloud/release-notes-2025.md +++ b/tidb-cloud/releases/release-notes-2025.md @@ -81,7 +81,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c - **Python**: Django, mysqlclient, MySQL Connector/Python, peewee, PyMySQL, SQLAlchemy - **Node.js**: mysql.js, Next.js, node-mysql2, Prisma, Sequelize, TypeORM - **Ruby**: mysql2, Rails - - Move the [Vercel](/tidb-cloud/integrate-tidbcloud-with-vercel.md) and [AWS Bedrock](/tidb-cloud/vector-search-integrate-with-amazon-bedrock.md) integration entries to the cluster level to improve discoverability. + - Move the [Vercel](/tidb-cloud/integrate-tidbcloud-with-vercel.md) and [AWS Bedrock](/ai/integrations/vector-search-integrate-with-amazon-bedrock.md) integration entries to the cluster level to improve discoverability. - Add **Suggest Integration** for requesting new integrations. **API changes** @@ -623,7 +623,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c - Relevance-based ranking: results are ranked using the industry-standard BM25 algorithm for optimal relevance. - Native SQL compatibility: seamlessly use SQL features such as filtering, grouping, and joining with full-text search. - To get started, see [Full Text Search with SQL](/tidb-cloud/vector-search-full-text-search-sql.md) or [Full Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md). + To get started, see [Full Text Search with SQL](/ai/guides/vector-search-full-text-search-sql.md) or [Full Text Search with Python](/ai/guides/vector-search-full-text-search-python.md). - Increase the maximum TiFlash node storage for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) cluster: diff --git a/tidb-cloud/tidb-cloud-release-notes.md b/tidb-cloud/releases/tidb-cloud-release-notes.md similarity index 100% rename from tidb-cloud/tidb-cloud-release-notes.md rename to tidb-cloud/releases/tidb-cloud-release-notes.md diff --git a/tidb-cloud/serverless-limitations.md b/tidb-cloud/serverless-limitations.md index 3e1f70befb7a9..81ce6a1b483bf 100644 --- a/tidb-cloud/serverless-limitations.md +++ b/tidb-cloud/serverless-limitations.md @@ -22,7 +22,7 @@ We are constantly filling in the feature gaps between {{{ .starter }}}/Essential - Only [Public Endpoint](/tidb-cloud/connect-via-standard-connection-serverless.md) and [Private Endpoint](/tidb-cloud/set-up-private-endpoint-connections-serverless.md) can be used. You cannot use [VPC Peering](/tidb-cloud/set-up-vpc-peering-connections.md) to connect to {{{ .starter }}} or {{{ .essential }}} clusters. - No [Firewall Rules](/tidb-cloud/configure-serverless-firewall-rules-for-public-endpoints.md) support for Private Endpoint. -- Your database client connections might be terminated unexpectedly if they remain open for more than 30 minutes. This can occur when a TiDB server shuts down, restarts, or undergoes maintenance, potentially causing application disruptions. To avoid this issue, configure a maximum connection lifetime. It is recommended to start with 5 minutes and increase it gradually if it affects tail latency. For more information, see [Recommended settings for connection pools](/develop/dev-guide-connection-parameters.md#connection-pools-and-connection-parameters). +- Your database client connections might be terminated unexpectedly if they remain open for more than 30 minutes. This can occur when a TiDB server shuts down, restarts, or undergoes maintenance, potentially causing application disruptions. To avoid this issue, configure a maximum connection lifetime. It is recommended to start with 5 minutes and increase it gradually if it affects tail latency. For more information, see [Recommended settings for connection pools](/develop/dev-guide-connection-parameters.md). > **Note:** > diff --git a/tidb-cloud/tidb-cloud-faq.md b/tidb-cloud/tidb-cloud-faq.md index 398dda747d204..6486aaadf8ad9 100644 --- a/tidb-cloud/tidb-cloud-faq.md +++ b/tidb-cloud/tidb-cloud-faq.md @@ -44,7 +44,7 @@ No. - For new TiDB Cloud Dedicated clusters, the default TiDB version is [v8.5.5](https://docs.pingcap.com/tidb/v8.5/release-8.5.5) starting from January 15, 2026. - For {{{ .starter }}} and {{{ .essential }}} clusters, the TiDB version is [v7.5.2](https://docs.pingcap.com/tidb/v7.5/release-7.5.2) starting from April 22, 2025. -For more information, see [TiDB Cloud Release Notes](/tidb-cloud/tidb-cloud-release-notes.md). +For more information, see [TiDB Cloud Release Notes](/tidb-cloud/releases/tidb-cloud-release-notes.md). ### What companies are using TiDB or TiDB Cloud in production? diff --git a/tidb-cloud/tidb-cloud-glossary.md b/tidb-cloud/tidb-cloud-glossary.md index 9568224f6f37f..83280669d6bc8 100644 --- a/tidb-cloud/tidb-cloud-glossary.md +++ b/tidb-cloud/tidb-cloud-glossary.md @@ -63,9 +63,9 @@ For more information, see [Manage an endpoint](/tidb-cloud/data-service-manage-e ### Full-text search -Unlike [Vector Search](/vector-search/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. +Unlike [Vector Search](/ai/concepts/vector-search-overview.md), which focuses on semantic similarity, full-text search lets you retrieve documents for exact keywords. In Retrieval-Augmented Generation (RAG) scenarios, you can use full-text search together with vector search to improve the retrieval quality. -For more information, see [Full-Text Search with SQL](/tidb-cloud/vector-search-full-text-search-sql.md) and [Full-Text Search with Python](/tidb-cloud/vector-search-full-text-search-python.md). +For more information, see [Full-Text Search with SQL](https://docs.pingcap.com/developer/vector-search-full-text-search-sql) and [Full-Text Search with Python](https://docs.pingcap.com/developer/vector-search-full-text-search-python). ## M @@ -190,7 +190,7 @@ A list of IP addresses and Classless Inter-Domain Routing (CIDR) addresses that ### Vector search -[Vector search](/vector-search/vector-search-overview.md) is a search method that prioritizes the meaning of your data to deliver relevant results. Unlike traditional full-text search, which relies on exact keyword matching and word frequency, vector search converts various data types (such as text, images, or audio) into high-dimensional vectors and queries based on the similarity between these vectors. This search method captures the semantic meaning and contextual information of the data, leading to a more precise understanding of user intent. Even when the search terms do not exactly match the content in the database, vector search can still provide results that align with the user's intent by analyzing the semantics of the data. +[Vector search](/ai/concepts/vector-search-overview.md) is a search method that prioritizes the meaning of your data to deliver relevant results. Unlike traditional full-text search, which relies on exact keyword matching and word frequency, vector search converts various data types (such as text, images, or audio) into high-dimensional vectors and queries based on the similarity between these vectors. This search method captures the semantic meaning and contextual information of the data, leading to a more precise understanding of user intent. Even when the search terms do not exactly match the content in the database, vector search can still provide results that align with the user's intent by analyzing the semantics of the data. ### Virtual Private Cloud diff --git a/tidb-cloud/use-tidb-cloud-with-ai-tools.md b/tidb-cloud/use-tidb-cloud-with-ai-tools.md index 4ace2be44d854..e60899cefda3d 100644 --- a/tidb-cloud/use-tidb-cloud-with-ai-tools.md +++ b/tidb-cloud/use-tidb-cloud-with-ai-tools.md @@ -159,5 +159,5 @@ To add the TiDB MCP plugin to Windsurf, update your `mcp_config.json` file as fo ## See also -- [Try Out TiDB + Vector Search](/vector-search/vector-search-get-started-using-python.md) -- [Developer Guide Overview](/develop/dev-guide-overview.md) +- [Try Out TiDB + Vector Search](/ai/quickstart-via-python.md) +- [Developer Guide Overview](https://docs.pingcap.com/developer/) diff --git a/tidb-cloud/vector-search-auto-embedding-gemini.md b/tidb-cloud/vector-search-auto-embedding-gemini.md deleted file mode 100644 index 845ee06de8fd9..0000000000000 --- a/tidb-cloud/vector-search-auto-embedding-gemini.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: Gemini Embeddings -summary: Learn how to use Google Gemini embedding models in TiDB Cloud. ---- - -# Gemini Embeddings - -This document describes how to use Gemini embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. - -> **Note:** -> -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. - -## Available models - -All Gemini models are available for use with the `gemini/` prefix if you bring your own Gemini API key (BYOK). For example: - -**gemini-embedding-001** - -- Name: `gemini/gemini-embedding-001` -- Dimensions: 128–3072 (default: 3072) -- Distance metric: Cosine, L2 -- Maximum input text tokens: 2,048 -- Price: Charged by Google -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ - -For a full list of available models, see [Gemini documentation](https://ai.google.dev/gemini-api/docs/embeddings). - -## SQL usage example - -To use Gemini models, you must specify a [Gemini API key](https://ai.google.dev/gemini-api/docs/api-key) as follows: - -> **Note:** -> -> Replace `'your-gemini-api-key-here'` with your actual Gemini API key. - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_GEMINI_API_KEY = 'your-gemini-api-key-here'; - -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(3072) GENERATED ALWAYS AS (EMBED_TEXT( - "gemini/gemini-embedding-001", - `content` - )) STORED -); - -INSERT INTO sample - (`id`, `content`) -VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); - - -SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) -LIMIT 2; -``` - -Result: - -``` -+------+----------------------------------------------------------------+ -| id | content | -+------+----------------------------------------------------------------+ -| 1 | Java: Object-oriented language for cross-platform development. | -| 4 | Java's syntax is used in Android apps. | -+------+----------------------------------------------------------------+ -``` - -## Options - -All [Gemini options](https://ai.google.dev/gemini-api/docs/embeddings) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. - -**Example: Specify the task type to improve quality** - -```sql -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( - "gemini/gemini-embedding-001", - `content`, - '{"task_type": "SEMANTIC_SIMILARITY"}' - )) STORED -); -``` - -**Example: Use an alternative dimension** - -```sql -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(768) GENERATED ALWAYS AS (EMBED_TEXT( - "gemini/gemini-embedding-001", - `content`, - '{"output_dimensionality": 768}' - )) STORED -); -``` - -For all available options, see [Gemini documentation](https://ai.google.dev/gemini-api/docs/embeddings). - -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). - -## See also - -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) diff --git a/tidb-cloud/vector-search-auto-embedding-jina-ai.md b/tidb-cloud/vector-search-auto-embedding-jina-ai.md deleted file mode 100644 index c607dd445489f..0000000000000 --- a/tidb-cloud/vector-search-auto-embedding-jina-ai.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Jina AI Embeddings -summary: Learn how to use Jina AI embedding models in TiDB Cloud. ---- - -# Jina AI Embeddings - -This document describes how to use Jina AI embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. - -> **Note:** -> -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. - -## Available models - -All Jina AI models are available for use with the `jina_ai/` prefix if you bring your own Jina AI API key (BYOK). For example: - -**jina-embeddings-v4** - -- Name: `jina_ai/jina-embeddings-v4` -- Dimensions: 2048 -- Distance metric: Cosine, L2 -- Maximum input text tokens: 32,768 -- Price: Charged by Jina AI -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ - -**jina-embeddings-v3** - -- Name: `jina_ai/jina-embeddings-v3` -- Dimensions: 1024 -- Distance metric: Cosine, L2 -- Maximum input text tokens: 8,192 -- Price: Charged by Jina AI -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ - -For a full list of available models, see [Jina AI Documentation](https://jina.ai/embeddings/). - -## SQL usage example - -To use Jina AI models, you must specify a [Jina AI API key](https://jina.ai/) as follows: - -> **Note:** -> -> Replace `'your-jina-ai-api-key-here'` with your actual Jina AI API key. - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_JINA_AI_API_KEY = 'your-jina-ai-api-key-here'; - -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(2048) GENERATED ALWAYS AS (EMBED_TEXT( - "jina_ai/jina-embeddings-v4", - `content` - )) STORED -); - -INSERT INTO sample - (`id`, `content`) -VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); - - -SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) -LIMIT 2; -``` - -Result: - -``` -+------+----------------------------------------------------------------+ -| id | content | -+------+----------------------------------------------------------------+ -| 1 | Java: Object-oriented language for cross-platform development. | -| 4 | Java's syntax is used in Android apps. | -+------+----------------------------------------------------------------+ -``` - -## Options - -All [Jina AI options](https://jina.ai/embeddings/) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. - -**Example: Specify "downstream task" for better performance** - -```sql -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(2048) GENERATED ALWAYS AS (EMBED_TEXT( - "jina_ai/jina-embeddings-v4", - `content`, - '{"task": "retrieval.passage", "task@search": "retrieval.query"}' - )) STORED -); -``` - -**Example: Use an alternative dimension** - -```sql -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(768) GENERATED ALWAYS AS (EMBED_TEXT( - "jina_ai/jina-embeddings-v3", - `content`, - '{"dimensions":768}' - )) STORED -); -``` - -For all available options, see [Jina AI Documentation](https://jina.ai/embeddings/). - -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/integrations/embedding-jinaai/). - -## See Also - -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) diff --git a/tidb-cloud/vector-search-auto-embedding-nvidia-nim.md b/tidb-cloud/vector-search-auto-embedding-nvidia-nim.md deleted file mode 100644 index ab29e926b2561..0000000000000 --- a/tidb-cloud/vector-search-auto-embedding-nvidia-nim.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: NVIDIA NIM Embeddings -summary: Learn how to use NVIDIA NIM embedding models in TiDB Cloud. ---- - -# NVIDIA NIM Embeddings - -This document describes how to use NVIDIA NIM embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. - -> **Note:** -> -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. - -## Available models - -Embedding models hosted on NVIDIA NIM are available for use with the `nvidia_nim/` prefix if you bring your own [NVIDIA NIM API key](https://build.nvidia.com/settings/api-keys) (BYOK). - -For your convenience, the following section takes a popular model as an example to show how to use it with Auto Embedding. For a full list of available models, see [NVIDIA NIM Text-to-embedding Models](https://build.nvidia.com/models?filters=usecase%3Ausecase_text_to_embedding). - -## bge-m3 - -- Name: `nvidia_nim/baai/bge-m3` -- Dimensions: 1024 -- Distance metric: Cosine, L2 -- Maximum input text tokens: 8,192 -- Price: Charged by NVIDIA -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ -- Docs: - -Example: - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_NVIDIA_NIM_API_KEY = 'your-nvidia-nim-api-key-here'; - -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( - "nvidia_nim/baai/bge-m3", - `content` - )) STORED -); - -INSERT INTO sample - (`id`, `content`) -VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); - - -SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) -LIMIT 2; -``` - -Result: - -``` -+------+----------------------------------------------------------------+ -| id | content | -+------+----------------------------------------------------------------+ -| 1 | Java: Object-oriented language for cross-platform development. | -| 4 | Java's syntax is used in Android apps. | -+------+----------------------------------------------------------------+ -``` - -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). - -## See also - -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) diff --git a/tidb-cloud/vector-search-auto-embedding-openai.md b/tidb-cloud/vector-search-auto-embedding-openai.md deleted file mode 100644 index f545d4a38ff58..0000000000000 --- a/tidb-cloud/vector-search-auto-embedding-openai.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: OpenAI Embeddings -summary: Learn how to use OpenAI embedding models in TiDB Cloud. ---- - -# OpenAI Embeddings - -This document describes how to use OpenAI embedding models with [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries. - -> **Note:** -> -> [Auto Embedding](/tidb-cloud/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS. - -## Available models - -All OpenAI models are available for use with the `openai/` prefix if you bring your own OpenAI API key (BYOK). For example: - -**text-embedding-3-small** - -- Name: `openai/text-embedding-3-small` -- Dimensions: 512-1536 (default: 1536) -- Distance metric: Cosine, L2 -- Price: Charged by OpenAI -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ - -**text-embedding-3-large** - -- Name: `openai/text-embedding-3-large` -- Dimensions: 256-3072 (default: 3072) -- Distance metric: Cosine, L2 -- Price: Charged by OpenAI -- Hosted by TiDB Cloud: ❌ -- Bring Your Own Key: ✅ - -For a full list of available models, see [OpenAI Documentation](https://platform.openai.com/docs/guides/embeddings). - -## SQL usage example - -To use OpenAI models, you must specify an [OpenAI API key](https://platform.openai.com/api-keys) as follows: - -> **Note:** -> -> Replace `'your-openai-api-key-here'` with your actual OpenAI API key. - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_KEY = 'your-openai-api-key-here'; - -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(3072) GENERATED ALWAYS AS (EMBED_TEXT( - "openai/text-embedding-3-large", - `content` - )) STORED -); - -INSERT INTO sample - (`id`, `content`) -VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); - - -SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) -LIMIT 2; -``` - -Result: - -``` -+------+----------------------------------------------------------------+ -| id | content | -+------+----------------------------------------------------------------+ -| 1 | Java: Object-oriented language for cross-platform development. | -| 4 | Java's syntax is used in Android apps. | -+------+----------------------------------------------------------------+ -``` - -## Use Azure OpenAI - -To use OpenAI embedding models on Azure, set the global variable `TIDB_EXP_EMBED_OPENAI_API_BASE` to the URL of your Azure resource. For example: - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_KEY = 'your-openai-api-key-here'; -SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_BASE = 'https://.openai.azure.com/openai/v1'; - -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(3072) GENERATED ALWAYS AS (EMBED_TEXT( - "openai/text-embedding-3-large", - `content` - )) STORED -); - -INSERT INTO sample - (`id`, `content`) -VALUES - (1, "Java: Object-oriented language for cross-platform development."), - (2, "Java coffee: Bold Indonesian beans with low acidity."), - (3, "Java island: Densely populated, home to Jakarta."), - (4, "Java's syntax is used in Android apps."), - (5, "Dark roast Java beans enhance espresso blends."); - -SELECT `id`, `content` FROM sample -ORDER BY - VEC_EMBED_COSINE_DISTANCE( - embedding, - "How to start learning Java programming?" - ) -LIMIT 2; -``` - -Note that even if your resource URL appears as `https://.cognitiveservices.azure.com/`, you must use `https://.openai.azure.com/openai/v1` as the API base to ensure OpenAI-compatible request and response formats. - -To switch from Azure OpenAI to OpenAI directly, set `TIDB_EXP_EMBED_OPENAI_API_BASE` to an empty string: - -```sql -SET @@GLOBAL.TIDB_EXP_EMBED_OPENAI_API_BASE = ''; -``` - -> **Note:** -> -> - For security reasons, you can only set the API base to an Azure OpenAI URL or the OpenAI URL. Arbitrary base URLs are not allowed. -> - To use another OpenAI-compatible embedding service, contact [TiDB Cloud Support](/tidb-cloud/tidb-cloud-support.md). - -## Options - -All [OpenAI embedding options](https://platform.openai.com/docs/api-reference/embeddings/create) are supported via the `additional_json_options` parameter of the `EMBED_TEXT()` function. - -**Example: Use an alternative dimension for text-embedding-3-large** - -```sql -CREATE TABLE sample ( - `id` INT, - `content` TEXT, - `embedding` VECTOR(1024) GENERATED ALWAYS AS (EMBED_TEXT( - "openai/text-embedding-3-large", - `content`, - '{"dimensions": 1024}' - )) STORED -); -``` - -For all available options, see [OpenAI Documentation](https://platform.openai.com/docs/api-reference/embeddings/create). - -## Python usage example - -See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/). - -## See also - -- [Auto Embedding Overview](/tidb-cloud/vector-search-auto-embedding-overview.md) -- [Vector Search](/vector-search/vector-search-overview.md) -- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) -- [Hybrid Search](/tidb-cloud/vector-search-hybrid-search.md) diff --git a/tidb-distributed-execution-framework.md b/tidb-distributed-execution-framework.md index 2637cf6f0283b..13966615eb748 100644 --- a/tidb-distributed-execution-framework.md +++ b/tidb-distributed-execution-framework.md @@ -121,7 +121,7 @@ As shown in the preceding diagram, the execution of tasks in the DXF is mainly h -* [Execution Principles and Best Practices of DDL Statements](/ddl-introduction.md) +* [Execution Principles and Best Practices of DDL Statements](/best-practices/ddl-introduction.md) diff --git a/tidb-lightning/data-import-best-practices.md b/tidb-lightning/data-import-best-practices.md index fedfa093ad805..9b49044c53716 100644 --- a/tidb-lightning/data-import-best-practices.md +++ b/tidb-lightning/data-import-best-practices.md @@ -146,7 +146,7 @@ If the PD Scatter Region latency during the import process exceeds 30 minutes, c ### Disable the analyze operation -In the case of a large single table (for example, with over 1 billion rows and more than 50 columns), it is recommended to disable the `analyze` operation (`analyze="off"`) during the import process, and manually execute the [`ANALYZE TABLE`](/sql-statements//sql-statement-analyze-table.md) statement after the import is completed. +For a large single table (for example, with over 1 billion rows and more than 50 columns), it is recommended to disable the `analyze` operation (`analyze="off"`) during the import process, and manually execute the [`ANALYZE TABLE`](/sql-statements/sql-statement-analyze-table.md) statement after the import is completed. For more information about the configuration of `analyze`, see [TiDB Lightning task configuration](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-task). diff --git a/tiflash-upgrade-guide.md b/tiflash-upgrade-guide.md index 953fd410d8c98..18ae00dac61c7 100644 --- a/tiflash-upgrade-guide.md +++ b/tiflash-upgrade-guide.md @@ -136,7 +136,7 @@ Starting from v7.4, to reduce the read and write amplification generated during ## From v7.x to v8.4 or a later version -Starting from v8.4, the underlying storage format of TiFlash is updated to support [vector search](/vector-search/vector-search-overview.md). Therefore, after TiFlash is upgraded to v8.4 or a later version, in-place downgrading to the original version is not supported. +Starting from v8.4, the underlying storage format of TiFlash is updated to support [vector search](/ai/concepts/vector-search-overview.md). Therefore, after TiFlash is upgraded to v8.4 or a later version, in-place downgrading to the original version is not supported. **Workaround for downgrading TiFlash in testing or other special scenarios** diff --git a/tiflash/tiflash-supported-pushdown-calculations.md b/tiflash/tiflash-supported-pushdown-calculations.md index 17ab8642f5c9b..de4cf7dce4641 100644 --- a/tiflash/tiflash-supported-pushdown-calculations.md +++ b/tiflash/tiflash-supported-pushdown-calculations.md @@ -42,7 +42,7 @@ TiFlash supports the following push-down expressions: | [Regular expression functions and operators](/functions-and-operators/string-functions.md) | `REGEXP`, `REGEXP_LIKE()`, `REGEXP_INSTR()`, `REGEXP_SUBSTR()`, `REGEXP_REPLACE()`, `RLIKE` | | [Date functions](/functions-and-operators/date-and-time-functions.md) | `DATE_FORMAT()`, `TIMESTAMPDIFF()`, `FROM_UNIXTIME()`, `UNIX_TIMESTAMP(int)`, `UNIX_TIMESTAMP(decimal)`, `STR_TO_DATE(date)`, `STR_TO_DATE(datetime)`, `DATEDIFF()`, `YEAR()`, `MONTH()`, `DAY()`, `EXTRACT(datetime)`, `DATE()`, `HOUR()`, `MICROSECOND()`, `MINUTE()`, `SECOND()`, `SYSDATE()`, `DATE_ADD/ADDDATE(datetime, int)`, `DATE_ADD/ADDDATE(string, int/real)`, `DATE_SUB/SUBDATE(datetime, int)`, `DATE_SUB/SUBDATE(string, int/real)`, `QUARTER()`, `DAYNAME()`, `DAYOFMONTH()`, `DAYOFWEEK()`, `DAYOFYEAR()`, `LAST_DAY()`, `MONTHNAME()`, `TO_SECONDS()`, `TO_DAYS()`, `FROM_DAYS()`, `WEEKOFYEAR()` | | [JSON function](/functions-and-operators/json-functions.md) | `JSON_LENGTH()`, `->`, `->>`, `JSON_EXTRACT()`, `JSON_ARRAY()`, `JSON_DEPTH()`, `JSON_VALID()`, `JSON_KEYS()`, `JSON_CONTAINS_PATH()`, `JSON_UNQUOTE()` | -| [Vector function](/vector-search/vector-search-functions-and-operators.md) | `VEC_L2_DISTANCE`, `VEC_COSINE_DISTANCE`, `VEC_NEGATIVE_INNER_PRODUCT`, `VEC_L1_DISTANCE`, `VEC_DIMS`, `VEC_L2_NORM`, `VEC_AS_TEXT` | +| [Vector function](/ai/reference/vector-search-functions-and-operators.md) | `VEC_L2_DISTANCE`, `VEC_COSINE_DISTANCE`, `VEC_NEGATIVE_INNER_PRODUCT`, `VEC_L1_DISTANCE`, `VEC_DIMS`, `VEC_L2_NORM`, `VEC_AS_TEXT` | | [Conversion functions](/functions-and-operators/cast-functions-and-operators.md) | `CAST(int AS DOUBLE), CAST(int AS DECIMAL)`, `CAST(int AS STRING)`, `CAST(int AS TIME)`, `CAST(double AS INT)`, `CAST(double AS DECIMAL)`, `CAST(double AS STRING)`, `CAST(double AS TIME)`, `CAST(string AS INT)`, `CAST(string AS DOUBLE), CAST(string AS DECIMAL)`, `CAST(string AS TIME)`, `CAST(decimal AS INT)`, `CAST(decimal AS STRING)`, `CAST(decimal AS TIME)`, `CAST(decimal AS DOUBLE)`, `CAST(time AS INT)`, `CAST(time AS DECIMAL)`, `CAST(time AS STRING)`, `CAST(time AS REAL)`, `CAST(json AS JSON)`, `CAST(json AS STRING)`, `CAST(int AS JSON)`, `CAST(real AS JSON)`, `CAST(decimal AS JSON)`, `CAST(string AS JSON)`, `CAST(time AS JSON)`, `CAST(duration AS JSON)` | | [Aggregate functions](/functions-and-operators/aggregate-group-by-functions.md) | `MIN()`, `MAX()`, `SUM()`, `COUNT()`, `AVG()`, `APPROX_COUNT_DISTINCT()`, `GROUP_CONCAT()` | | [Miscellaneous functions](/functions-and-operators/miscellaneous-functions.md) | `INET_NTOA()`, `INET_ATON()`, `INET6_NTOA()`, `INET6_ATON()` | diff --git a/upgrade-tidb-using-tiup.md b/upgrade-tidb-using-tiup.md index 20be62fe6c136..6d550447cb7a3 100644 --- a/upgrade-tidb-using-tiup.md +++ b/upgrade-tidb-using-tiup.md @@ -51,7 +51,7 @@ This document applies to upgrading to TiDB v8.5.x from the following versions: v - TiDB currently does not support version downgrade or rolling back to an earlier version after the upgrade. - Support upgrading the versions of TiCDC, TiFlash, and other components. - When upgrading TiFlash from versions earlier than v6.3.0 to v6.3.0 and later versions, note that the CPU must support the AVX2 instruction set under the Linux AMD64 architecture and the ARMv8 instruction set architecture under the Linux ARM64 architecture. For details, see the description in [v6.3.0 Release Notes](/releases/release-6.3.0.md#others). -- For detailed compatibility changes of different versions, see the [Release Notes](/releases/release-notes.md) of each version. Modify your cluster configuration according to the "Compatibility Changes" section of the corresponding release notes. +- For detailed compatibility changes of different versions, see the [Release Notes](/releases/_index.md) of each version. Modify your cluster configuration according to the "Compatibility Changes" section of the corresponding release notes. - When updating clusters from versions earlier than v5.3 to v5.3 or later versions, note that there is a time format change in the alerts generated by the default deployed Prometheus. This format change is introduced starting from Prometheus v2.27.1. For more information, see [Prometheus commit](https://github.com/prometheus/prometheus/commit/7646cbca328278585be15fa615e22f2a50b47d06). ## Preparations @@ -62,7 +62,7 @@ This section introduces the preparation works needed before upgrading your TiDB Review compatibility changes in TiDB release notes. If any changes affect your upgrade, take actions accordingly. -The following provides release notes you need to know when you upgrade from v8.4.0 to the current version (v{{{ .tidb-version }}}). If you are upgrading from v8.3.0 or earlier versions to the current version, you might also need to check the [release notes](/releases/release-notes.md) of the intermediate versions. +The following provides release notes you need to know when you upgrade from v8.4.0 to the current version (v{{{ .tidb-version }}}). If you are upgrading from v8.3.0 or earlier versions to the current version, you might also need to check the [release notes](/releases/_index.md) of the intermediate versions. - TiDB v8.5.0 [compatibility changes](/releases/release-8.5.0.md#compatibility-changes) - TiDB v8.5.1 [release notes](/releases/release-8.5.1.md) @@ -315,7 +315,7 @@ Re-execute the `tiup cluster upgrade` command to resume the upgrade. The upgrade ### How to fix the issue that the upgrade gets stuck when upgrading to v6.2.0 or later versions? -Starting from v6.2.0, TiDB enables the [concurrent DDL framework](/ddl-introduction.md#how-the-online-ddl-asynchronous-change-works-in-tidb) by default to execute concurrent DDLs. This framework changes the DDL job storage from a KV queue to a table queue. This change might cause the upgrade to get stuck in some scenarios. The following are some scenarios that might trigger this issue and the corresponding solutions: +Starting from v6.2.0, TiDB enables the [concurrent DDL framework](/best-practices/ddl-introduction.md#how-the-online-ddl-asynchronous-change-works-in-tidb) by default to execute concurrent DDLs. This framework changes the DDL job storage from a KV queue to a table queue. This change might cause the upgrade to get stuck in some scenarios. The following are some scenarios that might trigger this issue and the corresponding solutions: - Upgrade gets stuck due to plugin loading diff --git a/variables.json b/variables.json index 28fe30c11607c..2e2509e7ab677 100644 --- a/variables.json +++ b/variables.json @@ -2,6 +2,7 @@ "tidb": "TiDB", "tidb-version": "8.5.5", "tidb-release-date": "2026-01-15", + "tidb-operator-version": "v1.6.4", "self-managed": "TiDB Self-Managed", "starter": "TiDB Cloud Starter", "essential": "TiDB Cloud Essential", diff --git a/vector-search/vector-search-limitations.md b/vector-search/vector-search-limitations.md deleted file mode 100644 index 531b5c962d45b..0000000000000 --- a/vector-search/vector-search-limitations.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Vector Search Limitations -summary: Learn the limitations of the TiDB vector search. ---- - -# Vector Search Limitations - -This document describes the known limitations of TiDB vector search. - - - -> **Warning:** -> -> The vector search feature is experimental. It is not recommended that you use it in the production environment. This feature might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - - - -> **Note:** -> -> The vector search feature is in beta. It might be changed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - - - -> **Note:** -> -> The vector search feature is available on TiDB Self-Managed, [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter), [{{{ .essential }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#essential), and [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated). For TiDB Self-Managed and TiDB Cloud Dedicated, the TiDB version must be v8.4.0 or later (v8.5.0 or later is recommended). - -## Vector data type limitations - -- Each [vector](/vector-search/vector-search-data-types.md) supports up to 16383 dimensions. -- Vector data types cannot store `NaN`, `Infinity`, or `-Infinity` values. -- Vector data types cannot store double-precision floating-point numbers. If you insert or store double-precision floating-point numbers in vector columns, TiDB converts them to single-precision floating-point numbers. -- Vector columns cannot be used as primary keys or as part of a primary key. -- Vector columns cannot be used as unique indexes or as part of a unique index. -- Vector columns cannot be used as partition keys or as part of a partition key. -- Currently, TiDB does not support modifying a vector column to other data types (such as `JSON` and `VARCHAR`). - -## Vector index limitations - -See [Vector search restrictions](/vector-search/vector-search-index.md#restrictions). - -## Compatibility with TiDB tools - - - -- Make sure that you are using v8.4.0 or a later version of BR to back up and restore data. Restoring tables with vector data types to TiDB clusters earlier than v8.4.0 is not supported. -- TiDB Data Migration (DM) does not support migrating or replicating MySQL vector data types to TiDB. -- When TiCDC replicates vector data to a downstream that does not support vector data types, it will change the vector data types to another type. For more information, see [Compatibility with vector data types](/ticdc/ticdc-compatibility.md#compatibility-with-vector-data-types). - - - - - -- The Data Migration feature in the TiDB Cloud console does not support migrating or replicating MySQL vector data types to TiDB Cloud. - - - -## Feedback - -We value your feedback and are always here to help: - - - -- [Join our Discord](https://discord.gg/zcqexutz2R) - - - - - -- [Join our Discord](https://discord.gg/zcqexutz2R) -- [Visit our Support Portal](https://tidb.support.pingcap.com/) - -