diff --git a/.github/vale-styles/Yugabyte/spelling-exceptions.txt b/.github/vale-styles/Yugabyte/spelling-exceptions.txt index ed8d8c34020a..4db775383484 100644 --- a/.github/vale-styles/Yugabyte/spelling-exceptions.txt +++ b/.github/vale-styles/Yugabyte/spelling-exceptions.txt @@ -205,6 +205,7 @@ downvoted downvotes Dpl Dreamweaver +Ebean Ecto Elasticsearch enablement @@ -425,6 +426,7 @@ Nokogiri Northwind noteable noteables +Npgsql npm nullability nullable diff --git a/CMakeLists.txt b/CMakeLists.txt index 911305b32af2..ac6a74bd0ef1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -607,6 +607,7 @@ include_directories(src) include_directories("src/inline-thirdparty/usearch") include_directories("src/inline-thirdparty/fp16") +include_directories("src/inline-thirdparty/hnswlib") enable_testing() diff --git a/docs/content/preview/architecture/design-goals.md b/docs/content/preview/architecture/design-goals.md index 7d1afa71a34e..2477b434d6e0 100644 --- a/docs/content/preview/architecture/design-goals.md +++ b/docs/content/preview/architecture/design-goals.md @@ -78,7 +78,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat ## Heterogeneous workload support -Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](../../tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads. +Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads. ## Transaction isolation levels diff --git a/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md b/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md index 04e3af3cdb5a..a98621e67100 100644 --- a/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md +++ b/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md @@ -88,7 +88,7 @@ To set up unidirectional transactional replication, do the following: Checkpointing of yugabyte completed. Bootstrap is not required for setting up xCluster replication ``` -1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby. +1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby. 1. Set up the xCluster replication group. @@ -117,7 +117,7 @@ list_xcluster_outbound_replication_groups [namespace_id] You should see output similar to the following: ```output -1 Outbound Replication Groups found: +1 Outbound Replication Groups found: [repl_group1] ``` @@ -132,7 +132,7 @@ list_universe_replications [namespace_id] You should see output similar to the following: ```output -1 Universe Replication Groups found: +1 Universe Replication Groups found: [repl_group1] ``` diff --git a/docs/content/preview/develop/_index.md b/docs/content/preview/develop/_index.md index 790c42a446a8..ee96a1d598fb 100644 --- a/docs/content/preview/develop/_index.md +++ b/docs/content/preview/develop/_index.md @@ -77,5 +77,5 @@ To learn more about how to use browser-based IDEs, see [Cloud-native development Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more. {{}} -For step-by-step guides for various frameworks, see [Tutorials](../tutorials/). +For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/). {{}} diff --git a/docs/content/preview/drivers-orms/csharp/_index.md b/docs/content/preview/drivers-orms/csharp/_index.md index fa448b53744d..ab1b530afdf3 100644 --- a/docs/content/preview/drivers-orms/csharp/_index.md +++ b/docs/content/preview/drivers-orms/csharp/_index.md @@ -21,8 +21,8 @@ The following projects can be used to implement C# applications using the Yugaby | Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | | :------ | :----------------------- | :-------------------- | :--------------------------- | -| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/)
[Reference](../../reference/drivers/csharp/yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later | -| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/)
[Reference](../../reference/drivers/csharp/postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later | +| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/)
[Reference](yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later | +| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/)
[Reference](postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later | | YugabyteDB C# Driver for YCQL | [Documentation](ycql/) | [3.6.0](https://github.com/yugabyte/cassandra-csharp-driver/releases/tag/3.6.0) | | | Project | Documentation and Guides | Example Apps | @@ -32,17 +32,18 @@ The following projects can be used to implement C# applications using the Yugaby Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](ysql/) or [Use an ORM](entityframework/). -For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/csharp/yb-npgsql-reference/) pages. - ## Prerequisites To develop C# applications for YugabyteDB, you need the following: -- **.NET SDK**\ +- **.NET SDK** + Install .NET SDK 6.0 or later. To download it for your supported OS, visit [Download .NET](https://dotnet.microsoft.com/en-us/download). -- **Create a C# project**\ +- **Create a C# project** + For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page. + - To create a C# project in Visual Studio, select [Console Application](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio?pivots=dotnet-6-0) as template when creating a new project. - If you are not using an IDE, use the following dotnet command: @@ -51,9 +52,10 @@ To develop C# applications for YugabyteDB, you need the following: ``` - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). ## Next step -- [Connect an app](ysql/) +[Connect an app](ysql/) diff --git a/docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md b/docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md similarity index 96% rename from docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md rename to docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md index e3193f770cc4..b296faccbf00 100644 --- a/docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md +++ b/docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md @@ -3,13 +3,15 @@ title: PostgreSQL Npgsql Driver headerTitle: C# Drivers linkTitle: C# Drivers description: C# PostgreSQL Npgsql Driver for YSQL -headcontent: C# Drivers for YSQL +badges: ysql +aliases: + - /preview/reference/drivers/csharp/postgres-npgsql-reference/ menu: preview: name: C# Drivers - identifier: ref-postgres-npgsql-driver - parent: drivers - weight: 620 + identifier: ref-2-postgres-npgsql-driver + parent: csharp-drivers + weight: 100 type: docs --- @@ -31,11 +33,11 @@ type: docs -Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256). +Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). For details on Npgsql, refer to the [Npgsql documentation](https://www.npgsql.org/doc/). -For building a sample C# application with Npgsql, see [Connect an application](../../../../drivers-orms/csharp/postgres-npgsql/). +For building a sample C# application with Npgsql, see [Connect an application](../postgres-npgsql/). ## Download the driver dependency diff --git a/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md b/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md index c09722d55759..029b586f010f 100644 --- a/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md +++ b/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a C# application using PostgreSQL Npgsql driver menu: preview: - identifier: postgres-npgsql-driver + identifier: csharp-2-postgres-npgsql-driver parent: csharp-drivers - weight: 420 + weight: 500 type: docs --- @@ -113,7 +113,7 @@ var connStringBuilder = new NpgsqlConnectionStringBuilder(); YugabyteDB Aeon clusters require SSL. Refer to [Connect applications](../../../yugabyte-cloud/cloud-connect/connect-applications/) for instructions on how to obtain the cluster connection parameters and download the CA certificate. -Refer to [Configure SSL/TLS](../../../reference/drivers/csharp/postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL. +Refer to [Configure SSL/TLS](../postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL. ### Step 3: Write your application @@ -290,8 +290,3 @@ John 35 CSharp + SSL ``` If you receive no output or an error, check the parameters in the connection string. - -## Learn more - -- [PostgreSQL Npgsql driver reference](../../../reference/drivers/csharp/postgres-npgsql-reference/) -- Build C# applications using [EntityFramework ORM](../entityframework) diff --git a/docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md b/docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md similarity index 91% rename from docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md rename to docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md index 753128ddf566..40ba1ba6e2b6 100644 --- a/docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md +++ b/docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md @@ -3,13 +3,16 @@ title: YugabyteDB Npgsql Smart Driver headerTitle: C# Drivers linkTitle: C# Drivers description: C# Npgsql Smart Driver for YSQL -headcontent: C# Drivers for YSQL +badges: ysql +aliases: + - /preview/reference/drivers/csharp/ + - /preview/reference/drivers/csharp/yb-npgsql-reference/ menu: preview: name: C# Drivers - identifier: ref-yb-npgsql-driver - parent: drivers - weight: 600 + identifier: ref-1-yb-npgsql-driver + parent: csharp-drivers + weight: 100 type: docs --- @@ -31,12 +34,12 @@ type: docs -Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features. +Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features. For more information on the Yugabyte Npgsql smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/csharp/ysql/) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../ysql/) - [GitHub repository](https://github.com/yugabyte/npgsql) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -79,7 +82,7 @@ var connStringBuilder = "Host=127.0.0.1,127.0.0.2,127.0.0.3;Port=5433;Database=y NpgsqlConnection conn = new NpgsqlConnection(connStringBuilder) ``` -You can specify [multiple hosts](../../../../drivers-orms/csharp/ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers. +You can specify [multiple hosts](../ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers. To specify topology keys, you set the `Topology Keys` property to comma separated values, as per the following example: diff --git a/docs/content/preview/drivers-orms/csharp/ycql.md b/docs/content/preview/drivers-orms/csharp/ycql.md index 017ffec99b69..281e4fe13674 100644 --- a/docs/content/preview/drivers-orms/csharp/ycql.md +++ b/docs/content/preview/drivers-orms/csharp/ycql.md @@ -5,7 +5,7 @@ linkTitle: Connect an app description: Connect a C# application using YugabyteDB YCQL driver menu: preview: - identifier: csharp-driver-ycql + identifier: csharp-3-driver-ycql parent: csharp-drivers weight: 500 type: docs diff --git a/docs/content/preview/drivers-orms/csharp/ysql.md b/docs/content/preview/drivers-orms/csharp/ysql.md index 4a1f8e9c64f2..9ea7b6e7b5d4 100644 --- a/docs/content/preview/drivers-orms/csharp/ysql.md +++ b/docs/content/preview/drivers-orms/csharp/ysql.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a C# application using Npgsql Smart Driver menu: preview: - identifier: csharp-driver-ysql + identifier: csharp-1-driver-ysql parent: csharp-drivers - weight: 400 + weight: 500 type: docs --- @@ -204,5 +204,3 @@ John 35 CSharp - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) -- [YugabyteDB Npgsql Smart Driver reference](../../../reference/drivers/csharp/yb-npgsql-reference/) -- Build C# applications using [Entity Framework ORM](../entityframework) diff --git a/docs/content/preview/drivers-orms/elixir/_index.md b/docs/content/preview/drivers-orms/elixir/_index.md index 4ef208f8f341..7dc9b388bf69 100644 --- a/docs/content/preview/drivers-orms/elixir/_index.md +++ b/docs/content/preview/drivers-orms/elixir/_index.md @@ -28,10 +28,12 @@ Learn how to establish a connection to a YugabyteDB database and begin basic CRU To develop Elixir applications for YugabyteDB, you need the following: -- **Elixir**\ +- **Elixir** + Install the latest versions of [Elixir, Erlang VM, IEx and Mix](https://elixir-lang.org/docs.html) (tested with Elixir 1.17.1 and Erlang/OTP 26 erts-14.2.5). - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). diff --git a/docs/content/preview/drivers-orms/go/_index.md b/docs/content/preview/drivers-orms/go/_index.md index dba7e17c68b8..29dcc4e8d7d4 100644 --- a/docs/content/preview/drivers-orms/go/_index.md +++ b/docs/content/preview/drivers-orms/go/_index.md @@ -19,35 +19,37 @@ The following projects can be used to implement Golang applications using the Yu | Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | | ------- | ------------------------ | ------------------------ | ---------------------| -| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/)
[Reference](../../reference/drivers/go/yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above -| PGX Driver | [Documentation](pgx/)
[Reference](../../reference/drivers/go/pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above -| PQ Driver | [Documentation](pq/)
[Reference](../../reference/drivers/go/pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above +| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/)
[Reference](yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above | +| PGX Driver | [Documentation](pgx/)
[Reference](pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above | +| PQ Driver | [Documentation](pq/)
[Reference](pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above | | YugabyteDB Go Driver for YCQL | [Documentation](ycql) | [3.16.3](https://github.com/yugabyte/gocql) | | | Project | Documentation and Guides | Example Apps | | ------- | ------------------------ | ------------- | -| GORM [Recommended] | [Documentation](gorm/)
[Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm) -| GO-PG | [Documentation](pg/) | +| GORM [Recommended] | [Documentation](gorm/)
[Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm) | +| GO-PG | [Documentation](pg/) | | Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yb-pgx/) or [Use an ORM](gorm/). -For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/go/pgx-reference/) pages. - ## Prerequisites To develop Golang applications for YugabyteDB, you need the following: -- **Go**\ - Install the latest Go (1.16 or later) on your system.\ +- **Go** + + Install the latest Go (1.16 or later) on your system. + Run `go --version` in a terminal to check your version of Go. To install Go, visit [Go Downloads](https://golang.org/dl/). -- **Create a Go project**\ +- **Create a Go project** + For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page. - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). ## Next step -- [Connect an app](yb-pgx/) +[Connect an app](yb-pgx/) diff --git a/docs/content/preview/drivers-orms/go/pg.md b/docs/content/preview/drivers-orms/go/pg.md index fb43f7606a56..6faab66f2cfa 100644 --- a/docs/content/preview/drivers-orms/go/pg.md +++ b/docs/content/preview/drivers-orms/go/pg.md @@ -8,7 +8,7 @@ menu: preview: identifier: pg-orm parent: go-drivers - weight: 610 + weight: 600 type: docs --- @@ -84,11 +84,11 @@ db := pg.Connect(opt) #### Use SSL -For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes. +For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](yb-pgx-reference/#configure-ssl-tls) for the default and supported modes. ```sh $ export PGSSLMODE=verify-ca -$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. +$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. ``` | Environment Variable | Description | @@ -224,7 +224,7 @@ func main() { #### Using pg.Options() -If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use pg.Options() instead of pg.ParseURL() to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon): +If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use `pg.Options()` instead of `pg.ParseURL()` to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon): ```sh $ export PGHOST=127.0.0.1 @@ -234,7 +234,7 @@ $ export PGPASSWORD=password#with%special^chars $ export PGDATABASE=yugabyte ``` -To use pg.Options(), replace the main function in your file with the following: +To use `pg.Options()`, replace the main function in your file with the following: ```go /* Modify the main() from the ybsql_hello_world.go script by replacing the first few lines and enabling pg.Options() */ diff --git a/docs/content/preview/reference/drivers/go/pgx-reference.md b/docs/content/preview/drivers-orms/go/pgx-reference.md similarity index 94% rename from docs/content/preview/reference/drivers/go/pgx-reference.md rename to docs/content/preview/drivers-orms/go/pgx-reference.md index 9369f0bad28c..ba067b7112c8 100644 --- a/docs/content/preview/reference/drivers/go/pgx-reference.md +++ b/docs/content/preview/drivers-orms/go/pgx-reference.md @@ -3,13 +3,15 @@ title: PGX Driver headerTitle: Go Drivers linkTitle: Go Drivers description: Go PGX Driver for YSQL -headcontent: Go Drivers for YSQL +badges: ysql +aliases: + - /preview/reference/drivers/go/pgx-reference/ menu: preview: name: Go Drivers - identifier: ref-pgx-go-driver - parent: drivers - weight: 610 + identifier: ref-2-pgx-go-driver + parent: go-drivers + weight: 100 type: docs --- @@ -41,7 +43,7 @@ The [PGX driver](https://github.com/jackc/pgx/) is one of the most popular and a The driver allows Go programmers to connect to YugabyteDB to execute DMLs and DDLs using the PGX APIs. It also supports the standard `database/sql` package. -For a tutorial on building a sample Go application with PGX, see [Connect an application](../../../../drivers-orms/go/pgx/). +For a tutorial on building a sample Go application with PGX, see [Connect an application](../pgx/). ## Fundamentals @@ -108,7 +110,7 @@ if err != nil { The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code. -Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/). +Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/). ### Read and write data @@ -211,7 +213,7 @@ For more details, see [pgxpool package doc](https://pkg.go.dev/github.com/jackc/ To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. -To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/). +To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/). For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side. @@ -244,7 +246,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will ## Transaction and isolation levels -YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. +YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. The PGX driver provides `conn.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.` diff --git a/docs/content/preview/drivers-orms/go/pgx.md b/docs/content/preview/drivers-orms/go/pgx.md index edd90300303a..e754eee3baa0 100644 --- a/docs/content/preview/drivers-orms/go/pgx.md +++ b/docs/content/preview/drivers-orms/go/pgx.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a Go application using PGX Driver menu: preview: - identifier: pgx-driver + identifier: go-2-pgx-driver parent: go-drivers - weight: 410 + weight: 500 type: docs --- @@ -98,19 +98,19 @@ conn, err := pgx.Connect(context.Background(), url) | Parameter | Description | Default | | :-------- | :---------- | :------ | -| user | User connecting to the database | yugabyte -| password | User password | yugabyte -| host | Hostname of the YugabyteDB instance | localhost -| port | Listen port for YSQL | 5433 -| dbname | Database name | yugabyte +| user | User connecting to the database | yugabyte | +| password | User password | yugabyte | +| host | Hostname of the YugabyteDB instance | localhost | +| port | Listen port for YSQL | 5433 | +| dbname | Database name | yugabyte | #### Use SSL -For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pgx-reference/#configure-ssl-tls) for the default and supported modes. +For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pgx-reference/#configure-ssl-tls) for the default and supported modes. ```sh $ export PGSSLMODE=verify-ca -$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. +$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. ``` | Environment variable | Description | @@ -232,7 +232,4 @@ Query for id=1 returned: Row[John, 35, Go] ## Learn more - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- [YugabyteDB PGX driver reference](../../../reference/drivers/go/pgx-reference/) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) -- Build Go applications using [GORM](../gorm/) -- Build Go applications using [PG](../pg/) diff --git a/docs/content/preview/reference/drivers/go/pq-reference.md b/docs/content/preview/drivers-orms/go/pq-reference.md similarity index 92% rename from docs/content/preview/reference/drivers/go/pq-reference.md rename to docs/content/preview/drivers-orms/go/pq-reference.md index efef08eafccc..481711ff6139 100644 --- a/docs/content/preview/reference/drivers/go/pq-reference.md +++ b/docs/content/preview/drivers-orms/go/pq-reference.md @@ -3,13 +3,15 @@ title: PQ Driver headerTitle: Go Drivers linkTitle: Go Drivers description: Go PQ Driver for YSQL -headcontent: Go Drivers for YSQL +badges: ysql +aliases: + - /preview/reference/drivers/go/pq-reference/ menu: preview: name: Go Drivers - identifier: ref-pq-go-driver - parent: drivers - weight: 620 + identifier: ref-3-pq-go-driver + parent: go-drivers + weight: 100 type: docs --- @@ -39,9 +41,9 @@ type: docs The [PQ driver](https://github.com/lib/pq/) is a popular driver for PostgreSQL that can used for connecting to YugabyteDB YSQL. -The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256). +The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). -For a tutorial on building a sample Go application with pq, see [Connect an application](../../../../drivers-orms/go/pq/). +For a tutorial on building a sample Go application with pq, see [Connect an application](../pq/). ## Fundamentals @@ -126,7 +128,7 @@ if _, err := db.Exec(createStmt); err != nil { The `db.Exec()` function also returns an `error` object which, if not `nil`, needs to handled in your code. -Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/). +Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/). ### Read and write data @@ -193,7 +195,7 @@ if err != nil { To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB Cluster. -To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/). +To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/). For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables at the client side. @@ -226,7 +228,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will ## Transaction and isolation levels -YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. +YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. The PQ driver provides `db.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.` diff --git a/docs/content/preview/drivers-orms/go/pq.md b/docs/content/preview/drivers-orms/go/pq.md index b349d31c3d43..1d0424e10297 100644 --- a/docs/content/preview/drivers-orms/go/pq.md +++ b/docs/content/preview/drivers-orms/go/pq.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a Go application using PQ driver menu: preview: - identifier: pq-driver + identifier: go-3-pq-driver parent: go-drivers - weight: 420 + weight: 500 type: docs --- @@ -105,19 +105,19 @@ if err != nil { | Parameter | Description | Default | | :-------- | :---------- | :------ | -| user | User connecting to the database | yugabyte -| password | User password | yugabyte -| host | Hostname of the YugabyteDB instance | localhost -| port | Listen port for YSQL | 5433 -| dbname | Database name | yugabyte +| user | User connecting to the database | yugabyte | +| password | User password | yugabyte | +| host | Hostname of the YugabyteDB instance | localhost | +| port | Listen port for YSQL | 5433 | +| dbname | Database name | yugabyte | #### Use SSL -For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pq-reference/#ssl-modes) for the default and supported modes. +For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pq-reference/#ssl-modes) for the default and supported modes. ```sh $ export PGSSLMODE=verify-ca -$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. +$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. ``` | Environment Variable | Description | @@ -234,7 +234,4 @@ Query for id=1 returned: Row[John, 35, Go] ## Learn more - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- [YugabyteDB PQ driver reference](../../../reference/drivers/go/pq-reference/) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) -- Build Go applications using [GORM](../gorm/) -- Build Go applications using [PG](../pg/) diff --git a/docs/content/preview/reference/drivers/go/yb-pgx-reference.md b/docs/content/preview/drivers-orms/go/yb-pgx-reference.md similarity index 87% rename from docs/content/preview/reference/drivers/go/yb-pgx-reference.md rename to docs/content/preview/drivers-orms/go/yb-pgx-reference.md index e00a372449cf..78d0134eff6a 100644 --- a/docs/content/preview/reference/drivers/go/yb-pgx-reference.md +++ b/docs/content/preview/drivers-orms/go/yb-pgx-reference.md @@ -3,13 +3,16 @@ title: PGX Smart Driver headerTitle: Go Drivers linkTitle: Go Drivers description: Go PGX Smart Driver for YSQL -headcontent: Go Drivers for YSQL +badges: ysql +aliases: + - /preview/reference/drivers/go/ + - /preview/reference/drivers/go/yb-pgx-reference/ menu: preview: name: Go Drivers - identifier: ref-yb-pgx-go-driver - parent: drivers - weight: 600 + identifier: ref-1-yb-pgx-go-driver + parent: go-drivers + weight: 100 type: docs --- @@ -37,12 +40,12 @@ type: docs -YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features. +YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features. For more information on the YugabyteDB PGX smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/go/yb-pgx) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../yb-pgx) - [GitHub repository](https://github.com/yugabyte/pgx) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -84,7 +87,7 @@ url := fmt.Sprintf("%s?load_balance=true", baseUrl) conn, err := pgx.Connect(context.Background(), url) ``` -You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers. +You can specify [multiple hosts](../yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers. To specify topology keys, you set the `topology_keys` property to comma separated values, as per the following example: @@ -114,7 +117,7 @@ if err != nil { The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code. -Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/). +Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/). ### Read and write data @@ -234,9 +237,9 @@ For more details, see the [pgxpool package](https://pkg.go.dev/github.com/jackc/ ## Configure SSL/TLS -To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/). +To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/). -Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). +Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side. @@ -263,7 +266,7 @@ $ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded ## Transaction and isolation levels -YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. +YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. The PGX driver provides the `conn.Begin()` function to start a transaction. The `conn.BeginEx()` function can create a transaction with a specified isolation level. diff --git a/docs/content/preview/drivers-orms/go/yb-pgx.md b/docs/content/preview/drivers-orms/go/yb-pgx.md index 2cb1005b056d..28c463a96001 100644 --- a/docs/content/preview/drivers-orms/go/yb-pgx.md +++ b/docs/content/preview/drivers-orms/go/yb-pgx.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a Go application using YugabyteDB PGX Smart Driver menu: preview: - identifier: yb-pgx-driver + identifier: go-1-yb-pgx-driver parent: go-drivers - weight: 400 + weight: 500 type: docs --- @@ -81,7 +81,7 @@ cd yb-pgx go mod init hello ``` -Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../../../reference/drivers/go/yb-pgx-reference/#use-pgxpool-api) to learn more. +Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../yb-pgx-reference/#use-pgxpool-api) to learn more. ### Step 2: Set up the database connection @@ -93,14 +93,14 @@ The following table describes the connection parameters required to connect, inc | Parameter | Description | Default | | :-------- | :---------- | :------ | -| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost -| port | Listen port for YSQL | 5433 -| user | User connecting to the database | yugabyte -| password | User password | yugabyte -| dbname | Database name | yugabyte -| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true' -| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300 -| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`. +| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost | +| port | Listen port for YSQL | 5433 | +| user | User connecting to the database | yugabyte | +| password | User password | yugabyte | +| dbname | Database name | yugabyte | +| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true' | +| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300 | +| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`. | The following is an example connection string for connecting to YugabyteDB with uniform load balancing: @@ -178,11 +178,11 @@ The hosts are only used during the initial connection attempt. If the first host #### Use SSL -For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes. +For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../yb-pgx-reference/#configure-ssl-tls) for the default and supported modes. ```sh $ export PGSSLMODE=verify-ca -$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. +$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly. ``` | Environment Variable | Description | @@ -681,7 +681,4 @@ Closing the application ... ## Learn more - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- [YugabyteDB PGX smart driver reference](../../../reference/drivers/go/yb-pgx-reference/) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) -- Build Go applications using [GORM](../gorm/) -- Build Go applications using [PG](../pg/) diff --git a/docs/content/preview/drivers-orms/go/ycql.md b/docs/content/preview/drivers-orms/go/ycql.md index 6e8e46f5b202..800260eee11f 100644 --- a/docs/content/preview/drivers-orms/go/ycql.md +++ b/docs/content/preview/drivers-orms/go/ycql.md @@ -7,7 +7,7 @@ aliases: - /preview/tutorials/build-apps/go/cloud-ycql-go/ menu: preview: - identifier: yb-pgx-driver-ycql + identifier: go-4-yb-pgx-driver-ycql parent: go-drivers weight: 500 type: docs diff --git a/docs/content/preview/drivers-orms/java/_index.md b/docs/content/preview/drivers-orms/java/_index.md index 14a40695cc29..2444974428c2 100644 --- a/docs/content/preview/drivers-orms/java/_index.md +++ b/docs/content/preview/drivers-orms/java/_index.md @@ -21,12 +21,12 @@ The following projects can be used to implement Java applications using the Yuga | Driver | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | | ------- | ------------------------ | ------------------------ | ---------------------| -| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/)
[Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/)
[Reference](../../reference/drivers/java/yugabyte-jdbc-reference/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above | +| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/)
[Reference](yugabyte-jdbc-reference/)
[Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above | | YugabyteDB R2DBC Driver | [Documentation](yb-r2dbc/) | [1.1.0-yb-1-ea](https://mvnrepository.com/artifact/com.yugabyte/r2dbc-postgresql) | 2.18 and above | -| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/)
[Reference](../../reference/drivers/java/postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above | -| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) | -| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql)
[Reference](../../reference/drivers/ycql-client-drivers/#java) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | | -| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x)
[Reference](../../reference/drivers/ycql-client-drivers/#java) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | | +| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/)
[Reference](postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above | +| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) | | +| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | | +| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | | | Projects | Documentation and Guides | Example Apps | | ------- | ------------------------ | ------------ | @@ -38,8 +38,6 @@ The following projects can be used to implement Java applications using the Yuga Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-jdbc/) or [Use an ORM](hibernate/). -For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/java/yugabyte-jdbc-reference/) pages. - ## Prerequisites To develop Java driver applications for YugabyteDB, you need the following: @@ -90,4 +88,4 @@ To develop Java driver applications for YugabyteDB, you need the following: ## Next step -- [Connect an app](yugabyte-jdbc/) +[Connect an app](yugabyte-jdbc/) diff --git a/docs/content/preview/drivers-orms/java/hibernate.md b/docs/content/preview/drivers-orms/java/hibernate.md index e4fda803bb11..bee912438672 100644 --- a/docs/content/preview/drivers-orms/java/hibernate.md +++ b/docs/content/preview/drivers-orms/java/hibernate.md @@ -8,7 +8,7 @@ menu: preview: identifier: java-orm parent: java-drivers - weight: 500 + weight: 600 type: docs --- diff --git a/docs/content/preview/drivers-orms/java/mybatis.md b/docs/content/preview/drivers-orms/java/mybatis.md index 4c7467491746..04ab4ba12510 100644 --- a/docs/content/preview/drivers-orms/java/mybatis.md +++ b/docs/content/preview/drivers-orms/java/mybatis.md @@ -8,7 +8,7 @@ menu: preview: identifier: java-orm-mybatis parent: java-drivers - weight: 700 + weight: 600 type: docs --- @@ -99,32 +99,32 @@ Create the XML file `UserMapper.xml` in the resources folder of your Java projec insert into users (email, first_name, last_name) values (#{email}, #{firstName}, #{lastName}) - + - + - + - + delete from users where user_id = #{userId}; - + ``` ### Step 4: Configure the data mappers and datasource in MyBatis configuration file -All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework. +All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework. In `mybatis-config.xml`, define the User data mapper and the datasource for connecting to the YugabyteDB database. @@ -178,9 +178,9 @@ import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; public class MybatisUtil { - + private static SqlSessionFactory sqlSessionFactory; - + public static SqlSessionFactory getSessionFactory() { String resource = "mybatis-config.xml"; InputStream inputStream; @@ -217,32 +217,32 @@ public class UserDAO { } public void save(final User entity) { - + try (SqlSession session = sqlSessionFactory.openSession()) { session.insert("mybatis.mapper.UserMapper.save", entity); session.commit(); - } catch (RuntimeException rte) {} + } catch (RuntimeException rte) {} } public User findById(final Long id) { - + User user = null; try (SqlSession session = sqlSessionFactory.openSession()) { user = session.selectOne("mybatis.mapper.UserMapper.findById", id); - - } catch (RuntimeException rte) {} - + + } catch (RuntimeException rte) {} + return user; } public List findAll() { - + List users = null; try (SqlSession session = sqlSessionFactory.openSession()) { users = session.selectList("mybatis.mapper.UserMapper.findAll"); } catch (RuntimeException rte) {} - + return users; } @@ -266,7 +266,7 @@ import java.sql.SQLException; import org.apache.ibatis.session.SqlSessionFactory; public class MyBatisExample { - + public static void main(String[] args) throws ClassNotFoundException, SQLException { SqlSessionFactory sessionFactory = MybatisUtil.getSessionFactory(); @@ -277,7 +277,7 @@ public class MyBatisExample { user.setEmail("demo@yugabyte.com"); user.setFirstName("Alice"); user.setLastName("yugabeing"); - + // Save an user userDAO.save(user); System.out.println("Inserted user record: " + user.getFirstName()); diff --git a/docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md b/docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md similarity index 94% rename from docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md rename to docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md index 92d39dc268c4..98c3a5364dba 100644 --- a/docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md +++ b/docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md @@ -3,13 +3,15 @@ title: PostgreSQL JDBC Driver headerTitle: JDBC Drivers linkTitle: JDBC Drivers description: Java JDBC Driver for YSQL -headcontent: JDBC Drivers for YSQL +badges: ysql +aliases: +- /preview/reference/drivers/java/postgres-jdbc-reference/ menu: preview: name: JDBC Drivers - identifier: ref-postgres-jdbc-driver - parent: drivers - weight: 600 + identifier: ref-2-postgres-jdbc-driver + parent: java-drivers + weight: 100 type: docs --- @@ -31,9 +33,9 @@ type: docs -The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256). +The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). -For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../../../../drivers-orms/java/postgres-jdbc/). +For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../postgres-jdbc/). ## Download the driver dependency @@ -117,7 +119,7 @@ try { } ``` -`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/). +`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/). ### Read and write data @@ -189,7 +191,7 @@ try { ## Configure SSL/TLS -To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/). +To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/). Generally, when configuring the Java client to use SSL, all the certificates required for connecting to the database are available on the Classpath of the Java application, or in the default PostgreSQL working directory `(~/.postgresql/)` of the VM or container where the application is hosted. @@ -224,7 +226,7 @@ YugabyteDB cluster can be configured to authenticate the identity of the JDBC cl Steps for configuring the JDBC client for server authentication are as follows: -1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)). +1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)). 1. If you do not have access to the system `cacerts` Java truststore you can create your own truststore. @@ -268,7 +270,7 @@ Steps for configuring the JDBC client for server authentication are as follows: Steps for configuring the JDBC client for server authentication in a Kubernetes cluster are as follows: -1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](../../../../quick-start/kubernetes/). +1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](../../../quick-start/kubernetes/). ```sh $ kubectl create namespace yb-demo @@ -346,7 +348,7 @@ Connection conn = DriverManager.getConnection(jdbc:postgresql://localhost:5433/y ## Transaction and isolation levels -YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. +YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. JDBC Driver `java.sql.Connection` interface provides `connection.setAutoCommit()`, `connection.commit()` and `connection.rollback()` methods for enabling transactional access to YugabyteDB Database. diff --git a/docs/content/preview/drivers-orms/java/postgres-jdbc.md b/docs/content/preview/drivers-orms/java/postgres-jdbc.md index dd4ea5598a52..668175720ec7 100644 --- a/docs/content/preview/drivers-orms/java/postgres-jdbc.md +++ b/docs/content/preview/drivers-orms/java/postgres-jdbc.md @@ -3,9 +3,10 @@ title: PostgreSQL JDBC driver for YSQL headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using PostgreSQL JDBC driver +badges: ysql menu: preview: - identifier: postgres-jdbc-driver + identifier: java-driver-3-jdbc-postgres parent: java-drivers weight: 500 type: docs @@ -68,7 +69,7 @@ To start building your application, make sure you have met the [prerequisites](. If you're building the application with SSL, do the following additional steps: -- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../../../reference/drivers/java/postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../../../reference/drivers/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications). +- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications). - Install [OpenSSL](https://www.openssl.org/) 1.1.1 or later. ### Step 1: Set up the client dependency @@ -107,7 +108,6 @@ Java applications can connect to and query the YugabyteDB database using the `ja Use the `DriverManager.getConnection` method to create a connection object for the YugabyteDB Database. This can be used to perform DDLs and DMLs against the database. - | JDBC parameter | Description | Default | | :------------- | :---------- | :------ | | hostname | Hostname of the YugabyteDB instance | localhost | @@ -222,8 +222,5 @@ If there is no output or you get an error, verify that the connection string in ## Learn more -- [PostgreSQL JDBC driver reference](../../../reference/drivers/java/postgres-jdbc-reference/) - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) - [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/) -- Build Java applications using [Hibernate ORM](../hibernate/) -- Build Java applications using [Ebean ORM](../ebean/) diff --git a/docs/content/preview/drivers-orms/java/yb-r2dbc.md b/docs/content/preview/drivers-orms/java/yb-r2dbc.md index 726c9fd83062..cb7e05b96923 100644 --- a/docs/content/preview/drivers-orms/java/yb-r2dbc.md +++ b/docs/content/preview/drivers-orms/java/yb-r2dbc.md @@ -3,11 +3,12 @@ title: YugabyteDB R2DBC Smart Driver headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using YugabyteDB R2DBC Smart Driver for YSQL +badges: ysql menu: preview: - identifier: r2dbc-driver + identifier: java-driver-2-r2dbc parent: java-drivers - weight: 600 + weight: 500 type: docs --- diff --git a/docs/content/preview/drivers-orms/java/ycql-4.x.md b/docs/content/preview/drivers-orms/java/ycql-4.x.md index 12b8ff0b735f..6cf1cc11a636 100644 --- a/docs/content/preview/drivers-orms/java/ycql-4.x.md +++ b/docs/content/preview/drivers-orms/java/ycql-4.x.md @@ -3,6 +3,7 @@ title: Java Driver 4.15 for YCQL headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using YCQL 4.15 driver +badges: ycql menu: preview: identifier: ycql-java-driver-4.x diff --git a/docs/content/preview/drivers-orms/java/ycql.md b/docs/content/preview/drivers-orms/java/ycql.md index e90b0ba12a6a..47b205573232 100644 --- a/docs/content/preview/drivers-orms/java/ycql.md +++ b/docs/content/preview/drivers-orms/java/ycql.md @@ -3,6 +3,7 @@ title: Java Driver 3.10 for YCQL headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using YCQL 3.10 driver +badges: ycql aliases: - /preview/tutorials/build-apps/java/ycql menu: diff --git a/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md b/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md index 2b6813a786e5..f3c7e689c7f1 100644 --- a/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md +++ b/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md @@ -3,11 +3,12 @@ title: Vert.x PG Client for YSQL headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using Vert.x PG driver +badges: ysql menu: preview: - identifier: vertx-pg-client + identifier: java-driver-4-vertx-pg-client parent: java-drivers - weight: 600 + weight: 500 type: docs --- diff --git a/docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md b/docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md similarity index 95% rename from docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md rename to docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md index 6aa41a03f852..e549e88e16dd 100644 --- a/docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md +++ b/docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md @@ -3,13 +3,15 @@ title: YugabyteDB JDBC Smart Driver headerTitle: JDBC Drivers linkTitle: JDBC Drivers description: YugabyteDB JDBC Smart Driver for YSQL reference -headcontent: JDBC Drivers for YSQL +badges: ysql +aliases: +- /preview/reference/drivers/java/yugabyte-jdbc-reference/ menu: - stable: + preview: name: JDBC Drivers - identifier: ref-yugabyte-jdbc-driver - parent: drivers - weight: 500 + identifier: ref-1-yugabyte-jdbc-driver + parent: java-drivers + weight: 100 type: docs --- @@ -31,12 +33,12 @@ type: docs -YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features. +YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features. For more information on the YugabyteDB Java smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/java/yugabyte-jdbc) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../yugabyte-jdbc) - [GitHub repository](https://github.com/yugabyte/pgjdbc) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -71,7 +73,7 @@ To get the driver and HikariPool, add the following dependencies to the Gradle p ```java // https://mvnrepository.com/artifact/org.postgresql/postgresql -implementation 'com.yugabyte:jdbc-yugabytedb:42.3.0' +implementation 'com.yugabyte:jdbc-yugabytedb:42.3.5-yb-5' implementation 'com.zaxxer:HikariCP:4.0.3' ``` @@ -169,7 +171,7 @@ To use the driver, do the following: ## Try it out -This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility. +This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility. Next, you use [yb-sample-apps](https://github.com/yugabyte/yb-sample-apps/tree/master) to demonstrate the driver's load balancing features and create a Maven project to learn how to use the driver in an application. @@ -267,7 +269,7 @@ To access sample applications that use the YugabyteDB JDBC driver, visit [Yugaby To use the samples, complete the following steps: -- Install YugabyteDB by following the instructions in [Quick start](/preview/quick-start/). +- Install YugabyteDB by following the instructions in [Quick start](../../../quick-start/). - Build the examples by running `mvn package`. diff --git a/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md b/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md index aa7f498707f4..8609236a5d87 100644 --- a/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md +++ b/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md @@ -3,6 +3,7 @@ title: JDBC smart driver for YSQL headerTitle: Connect an application linkTitle: Connect an app description: Connect a Java application using YugabyteDB JDBC Smart Driver +badges: ysql aliases: - /develop/client-drivers/java/ - /preview/develop/client-drivers/java/ @@ -11,9 +12,9 @@ aliases: - /preview/integrations/jdbc-drivers/ menu: preview: - identifier: yugabyte-jdbc-driver + identifier: java-driver-1-yugabyte-jdbc parent: java-drivers - weight: 400 + weight: 500 type: docs --- @@ -252,8 +253,5 @@ If you receive no output or an error, check the parameters in the connection str ## Learn more - [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- Refer to [YugabyteDB JDBC driver reference](../../../reference/drivers/java/yugabyte-jdbc-reference/) and [Try it out](../../../reference/drivers/java/yugabyte-jdbc-reference/#try-it-out) for detailed smart driver examples. - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) - [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/) -- Build Java applications using [Hibernate ORM](../hibernate/) -- Build Java applications using [Ebean ORM](../ebean/) diff --git a/docs/content/preview/drivers-orms/nodejs/_index.md b/docs/content/preview/drivers-orms/nodejs/_index.md index 57081d9d4f1c..436db474b6b1 100644 --- a/docs/content/preview/drivers-orms/nodejs/_index.md +++ b/docs/content/preview/drivers-orms/nodejs/_index.md @@ -19,32 +19,33 @@ The following projects are recommended for implementing Node applications using | Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | | :------ | :----------------------- | :----------------------- | :--------------------| -| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/)
[Reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above | -| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/)
[Reference](../../reference/drivers/nodejs/postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above | +| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/)
[Reference](yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above | +| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/)
[Reference](postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above | | YugabyteDB Node.js Driver for YCQL | [Documentation](ycql/) | [4.0.0](https://github.com/yugabyte/cassandra-nodejs-driver) | | | Project | Documentation and Guides | Example Apps | | :------ | :----------------------- | :----------- | | Sequelize | [Documentation](sequelize/)
[Hello World](../orms/nodejs/ysql-sequelize/) | [Sequelize ORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/node/sequelize) | -| Prisma | [Documentation](prisma/)
[Hello World](../orms/nodejs/ysql-prisma/)
| [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma) +| Prisma | [Documentation](prisma/)
[Hello World](../orms/nodejs/ysql-prisma/)
| [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma) | Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-node-driver/) or [Use an ORM](sequelize/). -For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) pages. - ## Prerequisites To develop Node.js applications for YugabyteDB, you need the following: -- **Node.js**\ - To download and install Node.js, refer to the [Node.js](https://nodejs.org/en/download/) documentation.\ +- **Node.js** + + To download and install Node.js, refer to the [Node.js](https://nodejs.org/en/download/) documentation. + To check the version of node, use the following command: ```sh node -v ``` -- **Create a node.js project**\ +- **Create a node.js project** + Create a file with the `.js` extension (for example `app.js`), which can be run using the following command: ```sh @@ -52,9 +53,10 @@ To develop Node.js applications for YugabyteDB, you need the following: ``` - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). ## Next step -- [Connect an app](yugabyte-node-driver/) +[Connect an app](yugabyte-node-driver/) diff --git a/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md b/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md index 8a4062d02987..c3e43bb6d3c0 100644 --- a/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md +++ b/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect a node.js application using node-postgres Driver menu: preview: - identifier: postgres-node-driver + identifier: node-driver-2-postgres parent: nodejs-drivers - weight: 600 + weight: 500 type: docs --- @@ -117,7 +117,7 @@ const config = { If you created a cluster on YugabyteDB Aeon, use the cluster credentials and [download the SSL Root certificate](../../../yugabyte-cloud/cloud-connect/connect-applications/). -Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL. +Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL. ### Step 3: Write your application @@ -275,7 +275,4 @@ If there is no output or you get an error, verify the parameters included in the ## Learn more -- [PostgreSQL node-postgres driver reference](../../../reference/drivers/nodejs/postgres-pg-reference/) -- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- Build Node.js applications using [Sequelize ORM](../sequelize/) -- Build Node.js applications using [Prisma ORM](../prisma/) +[YugabyteDB smart drivers for YSQL](../../smart-drivers/) diff --git a/docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md b/docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md similarity index 91% rename from docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md rename to docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md index 6afc25d6515f..3b2ea4c49645 100644 --- a/docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md +++ b/docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md @@ -3,13 +3,15 @@ title: PostgreSQL node-postgres Driver headerTitle: Node.js Drivers linkTitle: Node.js Drivers description: PostgreSQL node-postgres Driver for YSQL -headcontent: Node.js Drivers for YSQL +badges: ysql +aliases: +- /preview/reference/drivers/nodejs/postgres-pg-reference/ menu: preview: name: Node.js Drivers - identifier: ref-postgres-pg-driver - parent: drivers - weight: 600 + identifier: ref-2-postgres-pg-driver + parent: nodejs-drivers + weight: 100 type: docs --- @@ -28,11 +30,11 @@ type: docs -The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256). +The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). For details on installing and using node-postgres, see the [node-postgres documentation](https://node-postgres.com/). -For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../../../../drivers-orms/nodejs/postgres-node-driver/). +For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../postgres-node-driver/). ## Fundamentals @@ -93,7 +95,7 @@ client }) ``` -Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/). +Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/). ### Read and write data @@ -140,9 +142,9 @@ client ## Configure SSL/TLS -To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/). +To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/). -Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). +Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). The node-postgres driver allows you to avoid including the parameters like `sslcert`, `sslkey`, `sslrootcert`, or `sslmode` in the connection string. You can pass the object which includes `connectionString` and `ssl` object which has various fields including the following: @@ -239,7 +241,7 @@ client.connect() ## Transaction and isolation levels -YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. +YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access. Node-postgres driver allows transaction using the queries, executed using `client.query()`. diff --git a/docs/content/preview/drivers-orms/nodejs/sequelize.md b/docs/content/preview/drivers-orms/nodejs/sequelize.md index fc9d2404208c..c70094823990 100644 --- a/docs/content/preview/drivers-orms/nodejs/sequelize.md +++ b/docs/content/preview/drivers-orms/nodejs/sequelize.md @@ -10,7 +10,7 @@ menu: preview: identifier: sequelize-1 parent: nodejs-drivers - weight: 500 + weight: 600 type: docs --- diff --git a/docs/content/preview/drivers-orms/nodejs/ycql.md b/docs/content/preview/drivers-orms/nodejs/ycql.md index e86c99464d95..82dd441e24eb 100644 --- a/docs/content/preview/drivers-orms/nodejs/ycql.md +++ b/docs/content/preview/drivers-orms/nodejs/ycql.md @@ -5,9 +5,9 @@ linkTitle: Connect an app description: Connect an application using YugabyteDB Node.js driver for YCQL menu: preview: - identifier: ycql-node-driver + identifier: node-driver-3-ycql parent: nodejs-drivers - weight: 600 + weight: 500 type: docs --- diff --git a/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md b/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md index 31f31ad5138f..6e3735fce3d4 100644 --- a/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md +++ b/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md @@ -5,7 +5,7 @@ linkTitle: Connect an app description: Connect an application using YugabyteDB Node.js smart driver for YSQL menu: preview: - identifier: yugabyte-node-driver + identifier: node-driver-1-yugabyte parent: nodejs-drivers weight: 500 type: docs @@ -105,7 +105,7 @@ postgresql://yugabyte:yugabyte@128.0.0.1:5433/yugabyte?loadBalance=true&ssl=true sslmode=verify-full&sslrootcert=~/.postgresql/root.crt ``` -Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL. +Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL. #### Use SSL with YugabyteDB Aeon @@ -220,7 +220,4 @@ If there is no output or you get an error, verify the parameters included in the ## Learn more -- Refer to [YugabyteDB node-postgres smart driver reference](../../../reference/drivers/nodejs/yugabyte-pg-reference/) and [Try it out](../../../reference/drivers/nodejs/yugabyte-pg-reference/#try-it-out) for detailed smart driver examples. -- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- Build Node.js applications using [Sequelize ORM](../sequelize/) -- Build Node.js applications using [Prisma ORM](../prisma/) +[YugabyteDB smart drivers for YSQL](../../smart-drivers/) diff --git a/docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md b/docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md similarity index 93% rename from docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md rename to docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md index 964cedc9d3f4..c1a2500ebf64 100644 --- a/docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md +++ b/docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md @@ -3,13 +3,15 @@ title: YugabyteDB node-postgres Smart Driver reference headerTitle: Node.js Drivers linkTitle: Node.js Drivers description: YugabyteDB node-postgres smart driver for YSQL -headcontent: Node.js Drivers for YSQL +badges: ysql +aliases: +- /preview/reference/drivers/nodejs/yugabyte-pg-reference/ menu: preview: name: Node.js Drivers - identifier: ref-yugabyte-pg-driver - parent: drivers - weight: 500 + identifier: ref-1-yugabyte-pg-driver + parent: nodejs-drivers + weight: 100 type: docs --- @@ -30,12 +32,12 @@ type: docs -YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features. +YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features. For more information on the YugabyteDB node-postgres smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/nodejs/yugabyte-node-driver) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../yugabyte-node-driver) - [GitHub repository](https://github.com/yugabyte/node-postgres) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -104,7 +106,7 @@ To use the driver, do the following: ## Try it out -This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility. +This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/#root) utility. Next, you use a Node.js application to demonstrate the driver's load balancing features. diff --git a/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md b/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md index 7344a2db6fc0..7e2948ea973d 100644 --- a/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md +++ b/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md @@ -45,7 +45,7 @@ Build the REST API server (written using Diesel and Rocket) as follows: $ cargo build --release ``` -If you encounter a build failure, install [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq) and try again. +If you encounter a build failure, install [libpq](../../ysql-client-drivers/#libpq) and try again. ## Set up the database connection diff --git a/docs/content/preview/drivers-orms/php/_index.md b/docs/content/preview/drivers-orms/php/_index.md index dd8d2fcae615..efcfbc96757e 100644 --- a/docs/content/preview/drivers-orms/php/_index.md +++ b/docs/content/preview/drivers-orms/php/_index.md @@ -34,3 +34,7 @@ To develop PHP applications for YugabyteDB, you need: - **a YugabyteDB cluster** - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). + +## Next step + +[Connect an app](ysql/) diff --git a/docs/content/preview/drivers-orms/python/_index.md b/docs/content/preview/drivers-orms/python/_index.md index 01b26082a315..df417d3d9380 100644 --- a/docs/content/preview/drivers-orms/python/_index.md +++ b/docs/content/preview/drivers-orms/python/_index.md @@ -18,8 +18,8 @@ The following projects can be used to implement Python applications using the Yu | Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | | ------- | ------------------------ | ------------------------ | ---------------------| -| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/)
[Reference](../../reference/drivers/python/yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above | -| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/)
[Reference](../../reference/drivers/python/postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above | +| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/)
[Reference](yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above | +| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/)
[Reference](postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above | | aiopg | [Documentation](aiopg/) | 1.4 | 2.8 and above | | YugabyteDB Python Driver for YCQL | [Documentation](ycql/) | [3.25.0](https://github.com/yugabyte/cassandra-python-driver/tree/master) | | @@ -30,13 +30,12 @@ The following projects can be used to implement Python applications using the Yu Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-psycopg2/) or [Use an ORM](sqlalchemy/). -For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/python/yugabyte-psycopg2-reference/) pages. - ## Prerequisites To develop Python applications for YugabyteDB, you need the following: - **Python** + Ensure your system has Python3 installed. To check the version of Python installed, use the following command: ```sh @@ -46,9 +45,10 @@ To develop Python applications for YugabyteDB, you need the following: If not already installed, download and install it from the [Python Downloads](https://www.python.org/downloads/) page. - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). ## Next step -- [Connect an app](yugabyte-psycopg2/) +[Connect an app](yugabyte-psycopg2/) diff --git a/docs/content/preview/drivers-orms/python/aiopg.md b/docs/content/preview/drivers-orms/python/aiopg.md index 925ba99a6d33..e58ba1ec1ee3 100644 --- a/docs/content/preview/drivers-orms/python/aiopg.md +++ b/docs/content/preview/drivers-orms/python/aiopg.md @@ -9,7 +9,7 @@ menu: preview: identifier: ysql-aiopg parent: python-drivers - weight: 571 + weight: 520 type: docs --- diff --git a/docs/content/preview/drivers-orms/python/django.md b/docs/content/preview/drivers-orms/python/django.md index 67a86764c7ee..a27a515bd661 100644 --- a/docs/content/preview/drivers-orms/python/django.md +++ b/docs/content/preview/drivers-orms/python/django.md @@ -7,7 +7,7 @@ menu: preview: identifier: django-orm parent: python-drivers - weight: 700 + weight: 600 type: docs --- -Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256). +Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). For details on using psycopg2, see [Psycopg documentation](https://www.psycopg.org/docs/). -For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../../../../drivers-orms/python/postgres-psycopg2/). +For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../postgres-psycopg2/). ## Fundamentals diff --git a/docs/content/preview/drivers-orms/python/postgres-psycopg2.md b/docs/content/preview/drivers-orms/python/postgres-psycopg2.md index 3b8f0fb74d22..6bc4c8d56cb8 100644 --- a/docs/content/preview/drivers-orms/python/postgres-psycopg2.md +++ b/docs/content/preview/drivers-orms/python/postgres-psycopg2.md @@ -7,7 +7,7 @@ menu: preview: identifier: postgres-psycopg2-driver parent: python-drivers - weight: 500 + weight: 510 type: docs --- @@ -215,8 +215,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and ## Learn more -- [PostgreSQL Psycopg2 driver reference](../../../reference/drivers/python/postgres-psycopg2-reference/) -- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- Build Python applications using [YugabyteDB Psycopg2 smart driver](../yugabyte-psycopg2/) -- Build Python applications using [Django](../django/) -- Build Python applications using [SQLAlchemy](../sqlalchemy/) +[YugabyteDB smart drivers for YSQL](../../smart-drivers/) diff --git a/docs/content/preview/drivers-orms/python/sqlalchemy.md b/docs/content/preview/drivers-orms/python/sqlalchemy.md index 491c19bed18d..59761232d425 100644 --- a/docs/content/preview/drivers-orms/python/sqlalchemy.md +++ b/docs/content/preview/drivers-orms/python/sqlalchemy.md @@ -9,7 +9,7 @@ menu: preview: identifier: sqlalchemy-orm parent: python-drivers - weight: 600 + weight: 610 type: docs --- diff --git a/docs/content/preview/drivers-orms/python/ycql.md b/docs/content/preview/drivers-orms/python/ycql.md index 3ebf711c94ab..48dae70b8589 100644 --- a/docs/content/preview/drivers-orms/python/ycql.md +++ b/docs/content/preview/drivers-orms/python/ycql.md @@ -7,7 +7,7 @@ menu: preview: identifier: ycql-python-driver parent: python-drivers - weight: 600 + weight: 530 type: docs --- diff --git a/docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md similarity index 91% rename from docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md rename to docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md index 8bda8b0e25fe..67698de254f3 100644 --- a/docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md +++ b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md @@ -3,15 +3,16 @@ title: YugabyteDB Psycopg2 Smart Driver headerTitle: Python Drivers linkTitle: Python Drivers description: YugabyteDB Psycopg2 Smart Driver for YSQL -headcontent: Python Drivers for YSQL +badges: ysql aliases: - /preview/reference/drivers/python/ + - /preview/reference/drivers/python/yugabyte-psycopg2-reference/ menu: preview: name: Python Drivers identifier: ref-yugabyte-psycopg2-driver - parent: drivers - weight: 650 + parent: python-drivers + weight: 100 type: docs --- @@ -30,12 +31,12 @@ type: docs -Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features. +Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features. For more information on the YugabyteDB node-postgres smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/python/yugabyte-psycopg2/) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../yugabyte-psycopg2/) - [GitHub repository](https://github.com/yugabyte/psycopg2) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -87,7 +88,7 @@ To enable uniform load balancing across all servers, you set the `load-balance` conn = psycopg2.connect(user = 'username', password='password', host = 'hostname', port = '5433', dbname = 'database_name', load_balance='True') ``` -You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers. +You can specify [multiple hosts](../yugabyte-psycopg2/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers. To specify topology keys, you set the `topology_keys` property to comma-separated values in the Connection string or dictionary, as per the following examples: @@ -117,7 +118,7 @@ conn = yb_pool.getconn() ## Try it out -This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/) utility. +This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/) utility. Next, you use a Python shell terminal to demonstrate the driver's load balancing features by running a few python scripts. diff --git a/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md index 5e619cd4033c..5a5d78258665 100644 --- a/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md +++ b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md @@ -7,7 +7,7 @@ menu: preview: identifier: yugabyte-psycopg2-driver parent: python-drivers - weight: 400 + weight: 500 type: docs --- @@ -272,8 +272,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and ## Learn more -- Refer to [YugabyteDB Psycopg2 driver reference](../../../reference/drivers/python/yugabyte-psycopg2-reference/) and [Try it out](../../../reference/drivers/python/yugabyte-psycopg2-reference/#try-it-out) for detailed smart driver examples. -- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) -- Build Python applications using [PostgreSQL Psycopg2 smart driver](../postgres-psycopg2/) -- Build Python applications using [Django](../django/) -- Build Python applications using [SQLAlchemy](../sqlalchemy/) +[YugabyteDB smart drivers for YSQL](../../smart-drivers/) diff --git a/docs/content/preview/drivers-orms/ruby/_index.md b/docs/content/preview/drivers-orms/ruby/_index.md index a18aeba23472..b0facf883f5d 100644 --- a/docs/content/preview/drivers-orms/ruby/_index.md +++ b/docs/content/preview/drivers-orms/ruby/_index.md @@ -41,4 +41,4 @@ To develop Ruby applications for YugabyteDB, you need the following: ## Next step -- [Connect an app](ysql-pg) +[Connect an app](ysql-pg) diff --git a/docs/content/preview/drivers-orms/rust/_index.md b/docs/content/preview/drivers-orms/rust/_index.md index 17710697f534..3cd864b8805e 100644 --- a/docs/content/preview/drivers-orms/rust/_index.md +++ b/docs/content/preview/drivers-orms/rust/_index.md @@ -19,7 +19,7 @@ The following project is recommended for implementing Rust applications using th | Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | Example Apps | | ------- | ------------------------ | --------------------- | ---------------------------- | ------------ | -| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/)
[Reference](../../reference/drivers/rust/rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta
[yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later +| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/)
[Reference](rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta
[yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later | | | Diesel | [Documentation](diesel/)
[Hello World](../orms/rust/ysql-diesel/) | | |[Diesel app](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/rust/diesel) | Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the **Hello World** examples. @@ -30,15 +30,18 @@ For fully-runnable code snippets and explanations of common operations, see the To develop Rust applications for YugabyteDB, you need the following: -- **Rust**\ - To download and install Rust, refer to the [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html) documentation.\ +- **Rust** + + To download and install Rust, refer to the [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html) documentation. + To check the version of Rust, use the following command: ```sh $ rustc --version ``` -- **Create a Rust project**\ +- **Create a Rust project** + To create a new Rust project, run the following command: ```sh @@ -48,9 +51,10 @@ To develop Rust applications for YugabyteDB, you need the following: This creates the project as `HelloWorld-rust` which consists of a `Cargo.toml` file (project metadata) and a `src` directory containing the main code file, `main.rs`. - **YugabyteDB cluster** + - Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL. - Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/). ## Next step -- [Connect an app](yb-rust-postgres/) +[Connect an app](yb-rust-postgres/) diff --git a/docs/content/preview/reference/drivers/rust/rust-postgres-reference.md b/docs/content/preview/drivers-orms/rust/rust-postgres-reference.md similarity index 87% rename from docs/content/preview/reference/drivers/rust/rust-postgres-reference.md rename to docs/content/preview/drivers-orms/rust/rust-postgres-reference.md index 067018355bee..0af175540a58 100644 --- a/docs/content/preview/reference/drivers/rust/rust-postgres-reference.md +++ b/docs/content/preview/drivers-orms/rust/rust-postgres-reference.md @@ -3,17 +3,19 @@ title: YugabyteDB Rust Smart Driver headerTitle: Rust Drivers linkTitle: Rust Drivers description: Rust postgres Smart Driver for YSQL -headcontent: Rust Smart Driver for YSQL +badges: ysql +aliases: +- /preview/reference/drivers/rust/rust-postgres-reference/ menu: preview: name: Rust Drivers identifier: ref-rust-postgres-driver - parent: drivers - weight: 800 + parent: rust-drivers + weight: 100 type: docs --- -YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features. +YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features. Rust smart drivers offers two different clients similar to rust-postgres: @@ -22,8 +24,8 @@ Rust smart drivers offers two different clients similar to rust-postgres: For more information on the YugabyteDB Rust smart driver, see the following: -- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/) -- [CRUD operations](../../../../drivers-orms/rust/yb-rust-postgres/#crud-operations) +- [YugabyteDB smart drivers for YSQL](../../smart-drivers/) +- [CRUD operations](../yb-rust-postgres/#crud-operations) - [GitHub repository](https://github.com/yugabyte/rust-postgres) - [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md) @@ -57,8 +59,8 @@ Learn how to perform common tasks required for Rust application development usin The following connection properties need to be added to enable load balancing: -- `load_balance` - enable [cluster-aware load balancing](../../../../drivers-orms/smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default. -- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../../../drivers-orms/smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`. +- `load_balance` - enable [cluster-aware load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default. +- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`. By default, the driver refreshes the list of nodes every 300 seconds (5 minutes). You can change this value by including the `yb_servers_refresh_interval` parameter. @@ -79,7 +81,7 @@ let url: String = String::from( "postgresql://localhost:5434/yugabyte?user=yugab let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?; ``` -You can specify [multiple hosts](../../../../drivers-orms/rust/yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers. +You can specify [multiple hosts](../yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers. To specify topology keys, you set the `topology_keys` property to comma-separated values in the connection string or dictionary, as per the following example: @@ -90,11 +92,11 @@ let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?; ## Try it out -This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../configuration/yugabyted/) utility. +This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility. Next, you use a Rust application to demonstrate the driver's load balancing features. -For an example using the synchronous yb-postgres client, see [Connect an application](../../../../drivers-orms/rust/yb-rust-postgres). +For an example using the synchronous yb-postgres client, see [Connect an application](../yb-rust-postgres). ### Create a local cluster @@ -353,7 +355,7 @@ The following is an example connection URL for connecting to a YugabyteDB cluste "postgresql://127.0.0.1:5434/yugabyte?user=yugabyte&password=yugabyte&load_balance=true&sslmode=require" ``` -If you created a cluster on [YugabyteDB Aeon](../../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). +If you created a cluster on [YugabyteDB Aeon](../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate). The following is an example application for connecting to a YugabyteDB cluster with SSL enabled: diff --git a/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md b/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md index 75fda244d021..1916610ed7eb 100644 --- a/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md +++ b/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md @@ -8,7 +8,7 @@ menu: preview: identifier: rust-postgres-driver parent: rust-drivers - weight: 600 + weight: 500 type: docs --- diff --git a/docs/content/preview/reference/drivers/ycql-client-drivers.md b/docs/content/preview/drivers-orms/ycql-client-drivers.md similarity index 86% rename from docs/content/preview/reference/drivers/ycql-client-drivers.md rename to docs/content/preview/drivers-orms/ycql-client-drivers.md index c30dbc43935f..d177a8eaee9a 100644 --- a/docs/content/preview/reference/drivers/ycql-client-drivers.md +++ b/docs/content/preview/drivers-orms/ycql-client-drivers.md @@ -1,18 +1,25 @@ --- title: Client drivers for YCQL API headerTitle: Client drivers for YCQL -linkTitle: Client drivers for YCQL +linkTitle: Additional drivers description: Lists the client drivers that you can use to build and access YCQL applications. +badges: ycql +aliases: + - /preview/reference/drivers/ycql-client-drivers/ menu: preview: identifier: ycql-client-libraries - parent: drivers - weight: 2942 -aliases: + parent: drivers-orms + weight: 2001 type: docs --- -The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL). +{{}} +{{}} +{{}} +{{}} + +The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL). For tutorials on building a sample application with the following client drivers, click the relevant link included below for each driver. @@ -28,7 +35,7 @@ The [YugabyteDB C++ Driver for YCQL](https://github.com/yugabyte/cassandra-cpp-d For details, see the [README](https://github.com/yugabyte/cassandra-cpp-driver) in our GitHub repository. -For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../../../drivers-orms/cpp/ycql/). +For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../cpp/ycql/). ## C\# @@ -38,7 +45,7 @@ The [YugabyteDB C# Driver for YCQL](https://github.com/yugabyte/cassandra-csharp For details, see the [README](https://github.com/yugabyte/cassandra-csharp-driver) in our GitHub repository. -For a tutorial on building a sample C# application with this driver, see [Connect an application](../../../drivers-orms/csharp/ycql/). +For a tutorial on building a sample C# application with this driver, see [Connect an application](../csharp/ycql/). ## Go @@ -48,7 +55,7 @@ The [YugabyteDB Go Driver for YCQL](https://github.com/yugabyte/gocql) is based For details, see the [README](https://github.com/yugabyte/gocql/blob/master/README.md) in our GitHub repository. -For a tutorial on building a sample Go application with this driver, see [Connect an application](../../../drivers-orms/go/ycql/). +For a tutorial on building a sample Go application with this driver, see [Connect an application](../go/ycql/). ## Java @@ -58,7 +65,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java For details, see the [v3.10 README](https://github.com/yugabyte/cassandra-java-driver/blob/3.10.0-yb-x/README.md) in our GitHub repository. -For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql/). +For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql/). To build Java applications with this driver, you must add the following Maven dependency to your application: @@ -78,7 +85,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java For details, see the [v4.15 README](https://github.com/yugabyte/cassandra-java-driver/blob/4.15.x/README.md) in our GitHub repository. -For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql-4.x/). +For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql-4.x/). To build Java applications with this driver, you must add the following Maven dependency to your application: @@ -100,7 +107,7 @@ The [YugabyteDB Node.js driver for YCQL](https://github.com/yugabyte/cassandra-n For details, see the [README](https://github.com/datastax/cpp-driver/blob/master/README.md) in our GitHub repository. -For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../../../drivers-orms/nodejs/ycql/). +For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../nodejs/ycql/). ## Python @@ -110,7 +117,7 @@ The [YugabyteDB Python Driver for YCQL](https://github.com/yugabyte/cassandra-py For details, see the [README](https://github.com/yugabyte/cassandra-python-driver) in our GitHub repository. -For a tutorial on building a sample Python application with this driver, see [Connect an application](../../../drivers-orms/python/ycql/). +For a tutorial on building a sample Python application with this driver, see [Connect an application](../python/ycql/). ## Ruby @@ -120,7 +127,7 @@ The [YugabyteDB Ruby Driver for YCQL](https://github.com/yugabyte/cassandra-ruby For details, see the [README](https://github.com/yugabyte/cassandra-ruby-driver/blob/v3.2.3.x-yb/README.md) in our GitHub repository. -For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../../../drivers-orms/ruby/ycql/). +For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../ruby/ycql/). ## Scala @@ -136,4 +143,4 @@ To build a Scala application with the YugabyteDB Java Driver for YCQL, you must libraryDependencies += "com.yugabyte" % "cassandra-driver-core" % "3.8.0-yb-5" ``` -For a tutorial on building a sample Scala application with this driver, see [Connect an application](../../../drivers-orms/scala/ycql/). +For a tutorial on building a sample Scala application with this driver, see [Connect an application](../scala/ycql/). diff --git a/docs/content/preview/reference/drivers/ysql-client-drivers.md b/docs/content/preview/drivers-orms/ysql-client-drivers.md similarity index 78% rename from docs/content/preview/reference/drivers/ysql-client-drivers.md rename to docs/content/preview/drivers-orms/ysql-client-drivers.md index e160799d1a75..8db2ce85a352 100644 --- a/docs/content/preview/reference/drivers/ysql-client-drivers.md +++ b/docs/content/preview/drivers-orms/ysql-client-drivers.md @@ -1,23 +1,31 @@ --- title: Client drivers for YSQL headerTitle: Additional client drivers for YSQL -linkTitle: Client drivers for YSQL +linkTitle: Additional drivers description: Lists the client drivers that you can use to connect to and interact with the YSQL API. +badges: ysql +aliases: + - /preview/reference/drivers/ysql-client-drivers/ menu: preview: identifier: ysql-client-libraries - parent: drivers - weight: 2940 + parent: drivers-orms + weight: 2000 type: docs rightNav: hideH4: true --- -The [Yugabyte Structured Query Language (YSQL) API](../../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases. +{{}} +{{}} +{{}} +{{}} -For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../../explore/ysql-language-features/sql-feature-support/). +The [Yugabyte Structured Query Language (YSQL) API](../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases. -Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../explore/ysql-language-features/sql-feature-support/). + +Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). For help using these drivers with YSQL, ask your questions in the [Slack community]({{}}). @@ -27,11 +35,11 @@ If you encounter an issue or have an enhancement request, [file a GitHub issue]( ### libpq -[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). For details and documentation, refer to [libpq - C Library](https://www.postgresql.org/docs/11/libpq.html) for PostgreSQL 11 (on which YugabyteDB is based). -For a tutorial on building a sample C application with libpq, refer to [Connect an application](../../../drivers-orms/c/ysql/). +For a tutorial on building a sample C application with libpq, refer to [Connect an application](../c/ysql/). #### Install the libpq client library @@ -47,11 +55,11 @@ Homebrew users on macOS can install libpq using `brew install libpq`. You can do ### libpqxx -The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). For details and documentation, refer to the [libpqxx README](https://github.com/jtv/libpqxx#readme) and [libpqxx documentation](https://libpqxx.readthedocs.io/en/latest/). -For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../../../drivers-orms/cpp/ysql/). +For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../cpp/ysql/). #### Install the libpqxx driver @@ -82,7 +90,7 @@ $ make install [Vert.x PG Client](https://vertx.io/docs/vertx-pg-client/java/) is the client for PostgreSQL with basic APIs to communicate with the database. It is a reactive and non-blocking client for handling the database connections with a single threaded API. -For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../../../drivers-orms/java/ysql-vertx-pg-client/). +For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../java/ysql-vertx-pg-client/). To get the latest versions for projects using [Apache Maven](https://maven.apache.org), see [Maven Central Repository of Vert.x PG Client](https://mvnrepository.com/artifact/io.vertx/vertx-pg-client). @@ -90,11 +98,11 @@ To get the latest versions for projects using [Apache Maven](https://maven.apach ### php-pgsql -The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). For details on installing and using php-pgsql, see the [php-pgsql documentation](https://www.php.net/manual/en/book.pgsql.php). -For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../../../drivers-orms/php/ysql/). +For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../php/ysql/). #### Install the php-pgsql driver @@ -112,7 +120,7 @@ CentOS users can install the driver using the `sudo yum install php-pgsql` comma [aiopg](https://aiopg.readthedocs.io/en/stable/) is a library for accessing a PostgreSQL database using the asyncio (PEP-3156/tulip) framework. It wraps asynchronous features of the [Psycopg](https://www.psycopg.org/) database driver. For details on using aiopg, see [aiopg documentation](https://aiopg.readthedocs.io/en/stable/). -For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../../../drivers-orms/python/aiopg/). +For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../python/aiopg/). #### Install @@ -126,9 +134,9 @@ pip3 install aiopg ### pg -[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). -For a tutorial on building a sample Ruby application with pg, see [Connect an application](../../../drivers-orms/ruby/ysql-pg/). +For a tutorial on building a sample Ruby application with pg, see [Connect an application](../ruby/ysql-pg/). #### Install the pg driver @@ -150,9 +158,9 @@ Replace `` with the path to the libpq installation; for example, ### Rust-Postgres -[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256). +[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256). -For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](../../../tutorials/build-apps/rust/cloud-ysql-rust/). +For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](../../tutorials/build-apps/rust/cloud-ysql-rust/). #### Install the Rust-Postgres driver diff --git a/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md b/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md index c85927acd86e..33bb7f5aa654 100644 --- a/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md +++ b/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md @@ -1364,7 +1364,7 @@ Procedure ### Supported YugabyteDB topologies -As mentioned in the beginning, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../reference/drivers/java/yugabyte-jdbc-reference). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node. +As mentioned in the beginning, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../drivers-orms/java/yugabyte-jdbc-reference/). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node. ### Setting up multiple connectors for same database server diff --git a/docs/content/preview/explore/observability/active-session-history.md b/docs/content/preview/explore/observability/active-session-history.md index af8bccd2d8e8..8c49a28ee568 100644 --- a/docs/content/preview/explore/observability/active-session-history.md +++ b/docs/content/preview/explore/observability/active-session-history.md @@ -91,47 +91,64 @@ List of wait events by the wait event components. These are the wait events introduced by YugabyteDB, however some of the following [wait events](https://www.postgresql.org/docs/current/monitoring-stats.html) inherited from PostgreSQL might also show up in the [yb_active_session_history](#yb-active-session-history) view. -| Class | Wait Event | Wait Event Type | Wait Event Aux | Description | +| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description | | :--------------- |:---------- | :-------------- |:--- | :---------- | -| TServer Wait | StorageRead | Network | | Waiting for a DocDB read operation | -| TServer Wait | CatalogRead | Network | | Waiting for a catalog read operation | -| TServer Wait | IndexRead | Network | | Waiting for a secondary index read operation | -| TServer Wait | StorageFlush | Network | | Waiting for a storage flush request | +| TServerWait | StorageRead | Network | | A YSQL backend is waiting for a table read from DocDB. | +| TServerWait | CatalogRead | Network | | A YSQL backend is waiting for a catalog read from master. | +| TServerWait | IndexRead | Network | | A YSQL backend is waiting for a secondary index read from DocDB. | +| TServerWait | StorageFlush | Network | | A YSQL backend is waiting for a table/index read/write from DocDB. | | YSQLQuery | QueryProcessing| CPU | | Doing CPU work | -| YSQLQuery | yb_ash_metadata | LWLock | | Waiting to update ASH metadata for a query | -| Timeout | YBTxnConflictBackoff | Timeout | | Waiting due to conflict in DocDB | +| YSQLQuery | yb_ash_metadata | LWLock | | A YSQL backend is waiting to update ASH metadata for a query. | +| Timeout | YBTxnConflictBackoff | Timeout | | A YSQL backend is waiting due to conflict in DocDB. | ### YB-TServer -| Class | Wait Event | Wait Event Type | Wait Event Aux | Description | +| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description | |:---------------- | :--------- |:--------------- | :--- | :---------- | -| Common | OnCpu_Passive | CPU | | Waiting for a thread to pick it up | -| Common | OnCpu_Active | CPU | | RPC is being actively processed on a thread | -| Common | ResponseQueued | Network | | Waiting for response to be transferred | -| Tablet | AcquiringLocks | Lock | \| Taking row-wise locks. May need to wait for other rpcs to release the lock. | -| Tablet | MVCC_WaitForSafeTime | Lock | \| Waiting for the SafeTime to be at least the desired read-time. | -| Tablet | BackfillIndex_WaitForAFreeSlot | Lock | \ | Waiting for a slot to open if there are too many backfill requests at the same time. | -| Tablet | CreatingNewTablet | I/O | \| Creating a new tablet may involve writing metadata files, causing I/O wait. | -| Tablet | WaitOnConflictingTxn | Lock | \| Waiting for the conflicting transactions to complete. | -| Consensus | WAL_Append | I/O | \| Persisting Wal edits | -| Consensus | WAL_Sync | I/O | \| Persisting Wal edits | -| Consensus | Raft_WaitingForReplication | Network | \| Waiting for Raft replication | -| Consensus | Raft_ApplyingEdits | Lock/CPU | \| Applying the edits locally | -| RocksDB | BlockCacheReadFromDisk | I/O | \| Populating block cache from disk | -| RocksDB | Flush | I/O | \ | Doing RocksDB flush | -| RocksDB | Compaction | I/O | \| Doing RocksDB compaction | -| RocksDB | RateLimiter | I/O | | Slow down due to rate limiter throttling access to disk | +| Common | OnCpu_Passive | CPU | | An RPC or task is waiting for a thread to pick it up. | +| Common | OnCpu_Active | CPU | | An RPC or task is being actively processed on a thread. | +| Common | Idle | WaitOnCondition | | The Raft log appender/sync thread is idle. | +| Common | Rpc_Done | WaitOnCondition | | An RPC is done and waiting for the reactor to send the response to a YSQL/YCQL backend. | +| Common | RetryableRequests_SaveToDisk | DiskIO | | The in-memory state of the retryable requests is being saved to the disk. | +| TabletWait | MVCC_WaitForSafeTime | WaitOnCondition | | A read/write RPC is waiting for the safe time to be at least the desired read-time. | +| TabletWait | LockedBatchEntry_Lock | WaitOnCondition | | A read/write RPC is waiting for a DocDB row-level lock. | +| TabletWait | BackfillIndex_WaitForAFreeSlot | WaitOnCondition | | A backfill index RPC is waiting for a slot to open if there are too many backfill requests at the same time. | +| TabletWait | CreatingNewTablet | DiskIO | | The CreateTablet RPC is creating a new tablet, this may involve writing metadata files, causing I/O wait. | +| TabletWait | SaveRaftGroupMetadataToDisk | DiskIO | | The Raft/tablet metadata is being written to disk, generally during snapshot or restore operations. | +| TabletWait | TransactionStatusCache_DoGetCommitData | Network | | An RPC needs to look up the commit status of a particular transaction. | +| TabletWait | WaitForYSQLBackendsCatalogVersion | WaitOnCondition | | CREATE INDEX is waiting for YSQL backends to have up-to-date pg_catalog. | +| TabletWait | WriteSysCatalogSnapshotToDisk | DiskIO | | Writing initial system catalog snapshot during initdb.| +| TabletWait | DumpRunningRpc_WaitOnReactor | WaitOnCondition | | DumpRunningRpcs is waiting on reactor threads. | +| TabletWait | ConflictResolution_ResolveConficts | Network | | A read/write RPC is waiting to identify conflicting transactions. | +| TabletWait | ConflictResolution_WaitOnConflictingTxns | WaitOnCondition | | A read/write RPC is waiting for conflicting transactions to complete. | +| Consensus | WAL_Append | DiskIO | \| A write RPC is persisting WAL edits. | +| Consensus | WAL_Sync | DiskIO | \| A write RPC is synchronizing WAL edits. | +| Consensus | Raft_WaitingForReplication | Network | \| A write RPC is waiting for Raft replication. | +| Consensus | Raft_ApplyingEdits | Lock/CPU | \| A write RPC is applying Raft edits locally. | +| Consensus | ConsensusMeta_Flush | DiskIO | | ConsensusMetadata is flushed, for example, during Raft term, configuration change, remote bootstrap, and so on. | +| Consensus | ReplicaState_TakeUpdateLock | WaitOnCondition | | A write/alter RPC needs to wait for the ReplicaState lock to replicate a batch of writes through Raft. | +| RocksDB | RocksDB_ReadBlockFromFile | DiskIO | | RocksDB is reading a block from a file. | +| RocksDB | RocksDB_OpenFile | DiskIO | | RocksDB is opening a file. | +| RocksDB | RocksDB_WriteToFile | DiskIO | | RocksDB is writing to a file. | +| RocksDB | RocksDB_Flush | CPU | | RocksDB is doing a flush. | +| RocksDB | RocksDB_Compaction | CPU | | RocksDB is doing a compaction. | +| RocksDB | RocksDB_PriorityThreadPoolTaskPaused | WaitOnCondition | | RocksDB pauses a flush or compaction task for another flush or compaction task with a higher priority. | +| RocksDB | RocksDB_CloseFile | DiskIO | | RocksDB is closing a file. | +| RocksDB | RocksDB_RateLimiter | WaitOnCondition | | RocksDB flush/compaction is slowing down due to rate limiter throttling access to disk. | +| RocksDB | RocksDB_WaitForSubcompaction | WaitOnCondition | | RocksDB is waiting for a compaction to complete. | +| RocksDB | RocksDB_NewIterator | DiskIO | | RocksDB is waiting for a new iterator to be created. | ### YCQL -| Class | Wait Event | Wait Event Type | Wait Event Aux | Description | +| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description | | :--------------- |:---------- | :-------------- |:--- | :---------- | -| YCQLQuery | YCQL_Parse | CPU | | CQL call is being actively processed | -| YCQLQuery | YCQL_Read | Network | \ | Waiting for DocDB read operation | -| YCQLQuery | YCQL_Write | Network | \ | Waiting for DocDB write operation | -| YBClient | LookingUpTablet | Network | | Looking up tablet information | -| YBClient | YBCSyncLeaderMasterRpc | Network | | Waiting on an RPC to the master/master-service | -| YBClient | YBCFindMasterProxy | Network | | Waiting on establishing the proxy to master leader | +| YCQLQuery | YCQL_Parse | CPU | | YCQL is parsing a query. | +| YCQLQuery | YCQL_Read | CPU | \ | YCQL is processing a read query.| +| YCQLQuery | YCQL_Write | CPU | \ | YCQL is processing a write query. | +| YCQLQuery | YCQL_Analyze | CPU | | YCQL is analyzing a query. | +| YCQLQuery | YCQL_Execute | CPU | | YCQL is executing a query. | +| Client | YBClient_WaitingOnDocDB | Network | | YB Client is waiting on DocDB to return a response. | +| Client | YBClient_LookingUpTablet | Network | | YB Client is looking up tablet information from the master. | ## Examples diff --git a/docs/content/preview/integrations/camunda.md b/docs/content/preview/integrations/camunda.md index a371ef2c7450..29fbf76ceec2 100644 --- a/docs/content/preview/integrations/camunda.md +++ b/docs/content/preview/integrations/camunda.md @@ -56,7 +56,7 @@ This tutorial assumes that: password: yugabyte ``` - Then, download the YugabyteDB JDBC driver [JAR file](https://repo1.maven.org/maven2/com/yugabyte/jdbc-yugabytedb/42.3.5-yb-5/jdbc-yugabytedb-42.3.5-yb-5.jar) and place it in the `camunda-bpm-run-7.17.0/configuration/userlib` directory. Read more about the YugabyteDB JDBC driver on its [documentation page](../../reference/drivers/java/yugabyte-jdbc-reference/). + Then, download the YugabyteDB JDBC driver [JAR file](https://repo1.maven.org/maven2/com/yugabyte/jdbc-yugabytedb/42.3.5-yb-5/jdbc-yugabytedb-42.3.5-yb-5.jar) and place it in the `camunda-bpm-run-7.17.0/configuration/userlib` directory. Read more about the [YugabyteDB JDBC driver](../../drivers-orms/java/yugabyte-jdbc-reference/). 1. Start the Camunda Platform server using `./start.sh` on Linux or macOS, or `./start.bat` on Windows. diff --git a/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md b/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md index 0c49e90c410e..272a24e8aadf 100644 --- a/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md +++ b/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md @@ -305,14 +305,14 @@ You have successfully executed a basic Node.js application that works with Yugab {{% tab header="C" lang="c" %}} -The [C application](https://github.com/yugabyte/yugabyte-simple-c-app) connects to a YugabyteDB cluster using the [libpq driver](/preview/reference/drivers/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C. +The [C application](https://github.com/yugabyte/yugabyte-simple-c-app) connects to a YugabyteDB cluster using the [libpq driver](/preview/drivers-orms/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C. The application requires the following: - 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.) - gcc 4.1.2 or later, or clang 3.4 or later installed. - OpenSSL 1.1.1 or later (used by libpq to establish secure SSL connections). -- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). To build and run the application, do the following: @@ -380,15 +380,15 @@ You have successfully executed a basic C application that works with YugabyteDB. {{% tab header="C++" lang="cpp" %}} -The [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) connects to a YugabyteDB cluster using the [libpqxx driver](/preview/reference/drivers/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C++. +The [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) connects to a YugabyteDB cluster using the [libpqxx driver](/preview/drivers-orms/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C++. The application requires the following: - 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.) - gcc 4.1.2 or later, or clang 3.4 or later installed. - OpenSSL 1.1.1 or later (used by libpq and libpqxx to establish secure SSL connections). -- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). -- [libpqxx](/preview/reference/drivers/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx). +- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [libpqxx](/preview/drivers-orms/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx). To build and run the application, do the following: @@ -526,14 +526,14 @@ You have successfully executed a basic C# application that works with YugabyteDB {{% tab header="Ruby" lang="ruby" %}} -The [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) connects to a YugabyteDB cluster using the [Ruby Pg driver](/preview/reference/drivers/ysql-client-drivers/#pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Ruby. +The [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) connects to a YugabyteDB cluster using the [Ruby Pg driver](/preview/drivers-orms/ruby/ysql-pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Ruby. The application requires the following: - Ruby 3.1 or later. - OpenSSL 1.1.1 or later (used by libpq and pg to establish secure SSL connections). -- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). -- [Ruby pg](/preview/reference/drivers/ysql-client-drivers/#pg). To install Ruby pg, run the following command: +- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [Ruby pg](/preview/drivers-orms/ruby/ysql-pg/). To install Ruby pg, run the following command: ```sh gem install pg -- --with-pg-include=/libpq/include --with-pg-lib=/libpq/lib @@ -605,7 +605,7 @@ You have successfully executed a basic Ruby application that works with Yugabyte {{% tab header="Rust" lang="rust" %}} -The [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) connects to a YugabyteDB cluster using the [Rust-Postgres driver](/preview/reference/drivers/ysql-client-drivers/#rust-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Rust. +The [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) connects to a YugabyteDB cluster using the [Rust-Postgres driver](/preview/drivers-orms/yb-rust-postgres/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Rust. The application requires the following: @@ -671,12 +671,12 @@ You have successfully executed a basic Rust application that works with Yugabyte {{% tab header="PHP" lang="php" %}} -The [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) connects to a YugabyteDB cluster using the [php-pgsql](/preview/reference/drivers/ysql-client-drivers/#php-pgsql) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in PHP. +The [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) connects to a YugabyteDB cluster using the [php-pgsql](/preview/drivers-orms/php/ysql/) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in PHP. The application requires the following: - PHP runtime. The sample application was created using PHP 8.1 but should work with earlier and later versions. Homebrew users on macOS can install PHP using `brew install php`. -- [php-pgsql driver](/preview/reference/drivers/ysql-client-drivers/#php-pgsql). +- [php-pgsql driver](/preview/drivers-orms/php/ysql/). - On macOS, Homebrew automatically installs the driver with `brew install php`. - Ubuntu users can install the driver using the `sudo apt-get install php-pgsql` command. - CentOS users can install the driver using the `sudo yum install php-pgsql` command. diff --git a/docs/content/preview/reference/configuration/all-flags-yb-master.md b/docs/content/preview/reference/configuration/all-flags-yb-master.md index 0d068dc78e3d..04e45d76b20a 100644 --- a/docs/content/preview/reference/configuration/all-flags-yb-master.md +++ b/docs/content/preview/reference/configuration/all-flags-yb-master.md @@ -9,7 +9,7 @@ menu: type: indexpage --- -Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/concepts/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation. +Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation. For a list of all YB-TServer flags, see [All YB-TServer flags](../all-flags-yb-tserver/). diff --git a/docs/content/preview/reference/configuration/all-flags-yb-tserver.md b/docs/content/preview/reference/configuration/all-flags-yb-tserver.md index 976296932cd6..50a8750f05d0 100644 --- a/docs/content/preview/reference/configuration/all-flags-yb-tserver.md +++ b/docs/content/preview/reference/configuration/all-flags-yb-tserver.md @@ -9,7 +9,7 @@ menu: type: indexpage --- -Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation. +Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation. For a list of all YB-Master flags, see [All YB-Master flags](../all-flags-yb-master/). diff --git a/docs/content/preview/reference/configuration/yb-master.md b/docs/content/preview/reference/configuration/yb-master.md index d2c4c783f386..1cfc88164e41 100644 --- a/docs/content/preview/reference/configuration/yb-master.md +++ b/docs/content/preview/reference/configuration/yb-master.md @@ -983,6 +983,16 @@ expensive when the number of yb-tservers, or the number of databases goes up. ## Advanced flags +##### --allowed_preview_flags_csv + +This is a comma-separated values (CSV) formatted catalogue of [preview feature](/preview/releases/versioning/#tech-preview-tp) flag names. Preview flags represent experimental or in-development features that are not yet fully supported. Flags that are tagged as "preview" cannot be modified or configured unless they are included in this list. + +By adding a flag to this list, you explicitly acknowledge and accept any potential risks or instability that may arise from modifying these preview features. This process serves as a safeguard, ensuring that you are fully aware of the experimental nature of the flags you are working with. + +{{}} +Inclusion in this list doesn't automatically change any settings. It only grants permission for the flag to be modified. You'll still need to configure the flag separately after adding it to this list. +{{}} + ##### --ysql_index_backfill_rpc_timeout_ms Deadline (in milliseconds) for each internal YB-Master to YB-TServer RPC for backfilling a chunk of the index. diff --git a/docs/content/preview/reference/drivers/_index.md b/docs/content/preview/reference/drivers/_index.md deleted file mode 100644 index 48264312b323..000000000000 --- a/docs/content/preview/reference/drivers/_index.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: YugabyteDB Drivers and ORMs -headerTitle: Drivers and ORMs -linkTitle: Drivers and ORMs -description: Use drivers to power applications with YugabyteDB. -headcontent: Drivers and ORMs reference -image: /images/section_icons/sample-data/s_s1-sampledata-3x.png -menu: - preview: - identifier: drivers - parent: reference - weight: 2750 -type: indexpage ---- - -### YSQL driver reference - - - -### Additional drivers - - diff --git a/docs/content/preview/releases/versioning.md b/docs/content/preview/releases/versioning.md index c25d65668ec2..e351e84e0635 100644 --- a/docs/content/preview/releases/versioning.md +++ b/docs/content/preview/releases/versioning.md @@ -98,6 +98,10 @@ TP features aren't supported by Customer Support and may change at any time duri If you are interested in a TP feature, contact {{% support-general %}}. +{{}} +Configuration of preview feature-specific flags is restricted to those listed in the [allowed_preview_flags_csv](../../reference/configuration/yb-master/#allowed-preview-flags-csv) flag. This measure acts as a safeguard, ensuring users are aware they are modifying settings for preview features. +{{}} + Participating customers agree to provide feedback to the Product Team. However, the timeline for addressing specific areas of feedback (including bugs) is at the discretion of Yugabyte. Documentation (if provided) for TP features is marked as such. diff --git a/docs/content/preview/secure/authentication/password-authentication.md b/docs/content/preview/secure/authentication/password-authentication.md index f13bc645069f..33ecad53c356 100644 --- a/docs/content/preview/secure/authentication/password-authentication.md +++ b/docs/content/preview/secure/authentication/password-authentication.md @@ -48,7 +48,7 @@ The MD5 hash algorithm is not considered secure against determined attacks. Some ### SCRAM-SHA-256 -The SCRAM-SHA-256 method (`scram-sh-256`) performs SCRAM-SHA-256 authentication, as described in [RFC 7677](https://tools.ietf.org/html/rfc7677). This challenge-response scheme prevents password sniffing on untrusted connections and supports storing passwords on YugabyteDB clusters in the most secure cryptographically hashed form available. The SCRAM-SHA-256 method implemented here is explained in further detail in [SASL Authentication (PostgreSQL documentation)](https://www.postgresql.org/docs/11/sasl-authentication.html). This is the most secure password authentication available and is supported by most of the [client drivers for the YSQL API](../../../reference/drivers/ysql-client-drivers/). +The SCRAM-SHA-256 method (`scram-sh-256`) performs SCRAM-SHA-256 authentication, as described in [RFC 7677](https://tools.ietf.org/html/rfc7677). This challenge-response scheme prevents password sniffing on untrusted connections and supports storing passwords on YugabyteDB clusters in the most secure cryptographically hashed form available. The SCRAM-SHA-256 method implemented here is explained in further detail in [SASL Authentication (PostgreSQL documentation)](https://www.postgresql.org/docs/11/sasl-authentication.html). This is the most secure password authentication available and is supported by most of the [client drivers for the YSQL API](../../../drivers-orms/). - Allows for two parties to verify they both know a secret without exchanging the secret. - SCRAM-SHA-256 encryption uses the [SASL authentication mechanism flow](https://www.postgresql.org/docs/11/sasl-authentication.html) to limit security risks from brute force attacks and sniffing. diff --git a/docs/content/preview/troubleshoot/nodes/trouble-common.md b/docs/content/preview/troubleshoot/nodes/trouble-common.md index 294a9be8018d..c1f917c4d170 100644 --- a/docs/content/preview/troubleshoot/nodes/trouble-common.md +++ b/docs/content/preview/troubleshoot/nodes/trouble-common.md @@ -70,7 +70,7 @@ SELECT * FROM system.peers_v2; (ql error -2) ``` -The most likely reason is that you are not using one of the YugabyteDB forks of the Cassandra client drivers. The `system.peers_v2` table does not exist in YugabyteDB. To resolve this issue, you should check the [drivers page](../../../reference/drivers/ycql-client-drivers/) to find a driver for your client language. +The most likely reason is that you are not using one of the YugabyteDB forks of the Cassandra client drivers. The `system.peers_v2` table does not exist in YugabyteDB. To resolve this issue, you should check the [drivers page](../../../drivers-orms/ycql-client-drivers/) to find a driver for your client language. ## Poll stopped: Service unavailable diff --git a/docs/content/preview/troubleshoot/ysql-issues.md b/docs/content/preview/troubleshoot/ysql-issues.md index 0b78975fbfbb..0bd69dc8929c 100644 --- a/docs/content/preview/troubleshoot/ysql-issues.md +++ b/docs/content/preview/troubleshoot/ysql-issues.md @@ -103,4 +103,4 @@ Snapshot too old: Snapshot too old. Read point: { physical: 1628678717824559 }, When the command takes a long time to be processed, a compaction may have occurred and have deleted some rows at the snapshot the dump was started on. For large backups, it is recommended to use [distributed snapshots](../../manage/backup-restore/snapshot-ysql/), which are more efficient and fast. -If you really need to use `ysql_dump`, you can increase the [--timestamp_history_retention_interval_sec](../../reference/configuration/yb-tserver/#timestamp-history-retention-interval-sec) flag on the master. The total time necessary for this command depends on the amount of metadata in your environment, thus you might need to tune this flag a couple of times. You can start by setting this flag to 3600 seconds and iterating from there. Note: Ideally, you don't want to leave this flag at a really high value, as that can have an adverse effect on the runtime of regular metadata queries (for example, DDLs, new connection establishment, metadata cache refreshes). +If you really need to use `ysql_dump`, you can increase the [`--timestamp_history_retention_interval_sec`](../../reference/configuration/yb-tserver/#timestamp-history-retention-interval-sec) flag on the master to a higher value. The total time necessary for this command depends on the amount of metadata in your environment, so you might need to tune this flag a couple of times. You can start by setting it to 3600 seconds and iterating from there. Note that, ideally, you don't want to leave this flag at a really high value, as that can have an adverse effect on the runtime of regular metadata queries (for example, DDLs, establishing new connections, and metadata cache refreshes). diff --git a/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md b/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md index 2298f0e2cf14..97c45b438408 100644 --- a/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md +++ b/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md @@ -14,14 +14,14 @@ menu: type: docs --- -The following tutorial shows a small [C application](https://github.com/yugabyte/yugabyte-simple-c-app) that connects to a YugabyteDB cluster using the [libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C. +The following tutorial shows a small [C application](https://github.com/yugabyte/yugabyte-simple-c-app) that connects to a YugabyteDB cluster using the [libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C. ## Prerequisites - 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.) - gcc 4.1.2 or later, or clang 3.4 or later installed. - OpenSSL 1.1.1 or later (used by libpq to establish secure SSL connections). -- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). ### Clone the application from GitHub @@ -180,4 +180,4 @@ if (PQresultStatus(res) != PGRES_COMMAND_OK) { ## Learn more -[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq) +[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq) diff --git a/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md b/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md index 5c650cf3c697..f89e5d72ecfc 100644 --- a/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md +++ b/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md @@ -14,15 +14,15 @@ menu: type: docs --- -The following tutorial shows a small [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) that connects to a YugabyteDB cluster using the [libpqxx driver](../../../../reference/drivers/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C++. +The following tutorial shows a small [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) that connects to a YugabyteDB cluster using the [libpqxx driver](../../../../drivers-orms/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C++. ## Prerequisites - 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.) - gcc 4.1.2 or later, or clang 3.4 or later installed. - OpenSSL 1.1.1 or later (used by libpq and libpqxx to establish secure SSL connections). -- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). -- [libpqxx](../../../../reference/drivers/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx). +- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [libpqxx](../../../../drivers-orms/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx). ### Clone the application from GitHub @@ -179,6 +179,6 @@ try { ## Learn more -[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq) +[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq) -[libpqxx driver](../../../../reference/drivers/ysql-client-drivers/#libpqxx) +[libpqxx driver](../../../../drivers-orms/ysql-client-drivers/#libpqxx) diff --git a/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md b/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md index 53f94d1cfb16..c86a5fee7693 100644 --- a/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md +++ b/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md @@ -12,7 +12,7 @@ menu: type: docs --- -The following tutorial shows a small [C# application](https://github.com/yugabyte/yugabyte-simple-csharp-app) that connects to a YugabyteDB cluster using the [Npgsql driver](../../../../reference/drivers/ysql-client-drivers/#npgsql) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C#. +The following tutorial shows a small [C# application](https://github.com/yugabyte/yugabyte-simple-csharp-app) that connects to a YugabyteDB cluster using the [Npgsql driver](../../../../drivers-orms/csharp/postgres-npgsql) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C#. ## Prerequisites @@ -173,4 +173,4 @@ try ## Learn more -[Npgsql driver](../../../../reference/drivers/ysql-client-drivers/#npgsql) +[Npgsql driver](../../../../drivers-orms/csharp/postgres-npgsql/) diff --git a/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md b/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md index 54eafc5da69e..f1f757657d93 100644 --- a/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md +++ b/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md @@ -13,7 +13,7 @@ menu: type: docs --- -The following tutorial shows a small [Go application](https://github.com/yugabyte/yugabyte-simple-go-app) that connects to a YugabyteDB cluster using the [Go PostgreSQL driver](../../../../reference/drivers/ysql-client-drivers/#go-postgresql-driver-pq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Go. +The following tutorial shows a small [Go application](https://github.com/yugabyte/yugabyte-simple-go-app) that connects to a YugabyteDB cluster using the [Go PostgreSQL driver](../../../../drivers-orms/go/pq/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Go. ## Prerequisites @@ -181,4 +181,4 @@ if checkIfTxAborted(err) { ## Learn more -[Go PostgreSQL driver](../../../../reference/drivers/ysql-client-drivers/#go-postgresql-driver-pq) +[Go PostgreSQL driver](../../../../drivers-orms/go/pq/) diff --git a/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md b/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md index 31b84749f6b0..5fe5167ec21f 100644 --- a/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md +++ b/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md @@ -13,7 +13,9 @@ menu: type: docs --- -The following tutorial shows a small [Java application](https://github.com/yugabyte/yugabyte-simple-java-app) that connects to a YugabyteDB cluster using the topology-aware [YugabyteDB JDBC driver](../../../../reference/drivers/java/yugabyte-jdbc-reference/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Java. +YugabyteDB YSQL is fully compatible with the [PostgreSQL JDBC driver](../../../../drivers-orms/java/postgres-jdbc-reference/), allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The [YugabyteDB JDBC smart driver](../../../../drivers-orms/java/yugabyte-jdbc-reference/) is built on the PostgreSQL JDBC driver, with additional connection load balancing features. + +The following tutorial shows a small [Java application](https://github.com/yugabyte/yugabyte-simple-java-app) that connects to a YugabyteDB cluster using the topology-aware YugabyteDB JDBC driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Java. ## Prerequisites @@ -165,4 +167,4 @@ try { ## Learn more -[YugabyteDB JDBC driver](../../../../reference/drivers/java/yugabyte-jdbc-reference/) +[Connect an application using the PostgreSQL JDBC driver](../../../../drivers-orms/java/postgres-jdbc/) diff --git a/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md b/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md index ca4459e66095..3e4bc940c579 100644 --- a/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md +++ b/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md @@ -12,7 +12,7 @@ menu: type: docs --- -The following tutorial shows a small [Node.js application](https://github.com/yugabyte/yugabyte-simple-node-app) that connects to a YugabyteDB cluster using the [node-postgres module](../../../../reference/drivers/ysql-client-drivers/#node-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Node.js. +The following tutorial shows a small [Node.js application](https://github.com/yugabyte/yugabyte-simple-node-app) that connects to a YugabyteDB cluster using the [node-postgres module](../../../../drivers-orms/nodejs/postgres-node-driver/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Node.js. ## Prerequisites @@ -179,4 +179,4 @@ try { ## Learn more -[node-postgres module](../../../../reference/drivers/ysql-client-drivers/#node-postgres) +[node-postgres module](../../../../drivers-orms/nodejs/postgres-node-driver/) diff --git a/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md b/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md index 340ba17c918d..0c549efca8b4 100644 --- a/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md +++ b/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md @@ -14,12 +14,12 @@ menu: type: docs --- -The following tutorial shows a small [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) that connects to a YugabyteDB cluster using the [php-pgsql](../../../../reference/drivers/ysql-client-drivers/#php-pgsql) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in PHP. +The following tutorial shows a small [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) that connects to a YugabyteDB cluster using the [php-pgsql](../../../../drivers-orms/php/ysql/) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in PHP. ## Prerequisites - PHP runtime. The sample application was created using PHP 8.1 but should work with earlier and later versions. Homebrew users on macOS can install PHP using `brew install php`. -- [php-pgsql driver](../../../../reference/drivers/ysql-client-drivers/#php-pgsql). +- [php-pgsql driver](../../../../drivers-orms/php/ysql/). - On macOS, Homebrew automatically installs the driver with `brew install php`. - Ubuntu users can install the driver using the `sudo apt-get install php-pgsql` command. - CentOS users can install the driver using the `sudo yum install php-pgsql` command. @@ -146,4 +146,4 @@ try { ## Learn more -[php-pgsql driver](../../../../reference/drivers/ysql-client-drivers/#php-pgsql) +[php-pgsql driver](../../../../drivers-orms/php/ysql/) diff --git a/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md b/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md index ba6c2c05b331..ca3555f2672f 100644 --- a/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md +++ b/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md @@ -13,7 +13,7 @@ menu: type: docs --- -The following tutorial shows a small [Python application](https://github.com/yugabyte/yugabyte-simple-python-app) that connects to a YugabyteDB cluster using the [Python psycopg2 PostgreSQL database adapter](../../../../reference/drivers/python/postgres-psycopg2-reference/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Python. +The following tutorial shows a small [Python application](https://github.com/yugabyte/yugabyte-simple-python-app) that connects to a YugabyteDB cluster using the [Python psycopg2 PostgreSQL database adapter](../../../../drivers-orms/python/postgres-psycopg2/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Python. ## Prerequisites @@ -165,4 +165,4 @@ except (Exception, psycopg2.DatabaseError) as e: ## Learn more -[Python psycopg2 PostgreSQL database adapter](../../../../reference/drivers/ysql-client-drivers/#psycopg2) +[Python psycopg2 PostgreSQL database adapter](../../../../drivers-orms/python/postgres-psycopg2/) diff --git a/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md b/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md index 020ce2c41f21..756181e6e0f3 100644 --- a/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md +++ b/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md @@ -14,14 +14,14 @@ menu: type: docs --- -The following tutorial shows a small [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) that connects to a YugabyteDB cluster using the [Ruby Pg driver](../../../../reference/drivers/ysql-client-drivers/#pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Ruby. +The following tutorial shows a small [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) that connects to a YugabyteDB cluster using the [Ruby Pg driver](../../../../drivers-orms/ruby/ysql-pg/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Ruby. ## Prerequisites - Ruby 3.1 or later. - OpenSSL 1.1.1 or later (used by libpq and pg to establish secure SSL connections). -- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). -- [Ruby pg](../../../../reference/drivers/ysql-client-drivers/#pg). To install Ruby pg, run the following command: +- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/). +- [Ruby pg](../../../../drivers-orms/ruby/ysql-pg/). To install Ruby pg, run the following command: ```sh gem install pg -- --with-pg-include=/libpq/include --with-pg-lib=/libpq/lib @@ -166,6 +166,6 @@ end ## Learn more -[Ruby pg driver](../../../../reference/drivers/ysql-client-drivers/#pg) +[Ruby pg driver](../../../../drivers-orms/ruby/ysql-pg/) -[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq) +[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq) diff --git a/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md b/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md index be5fea6684c6..33dc3cb8beb1 100644 --- a/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md +++ b/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md @@ -14,7 +14,7 @@ menu: type: docs --- -The following tutorial shows a small [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) that connects to a YugabyteDB cluster using the [Rust-Postgres driver](../../../../reference/drivers/ysql-client-drivers/#rust-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Rust. +The following tutorial shows a small [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) that connects to a YugabyteDB cluster using the [Rust-Postgres driver](../../../../drivers-orms/rust/yb-rust-postgres/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Rust. ## Prerequisites @@ -147,4 +147,4 @@ let exec_txn = || -> Result<(), DBError> { ## Learn more -[Rust-Postgres driver](../../../../reference/drivers/ysql-client-drivers/#rust-postgres) +[Rust-Postgres driver](../../../../drivers-orms/rust/yb-rust-postgres/) diff --git a/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md b/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md index 00a7e4549872..3eb30b6e5ec8 100644 --- a/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md +++ b/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md @@ -16,7 +16,7 @@ The sample applications in this section provide advanced examples of connecting To get started building applications for YugabyteDB Aeon, refer to [Build an application](../../tutorials/build-apps/). -Applications connect to and interact with YugabyteDB using API client libraries (also known as client drivers). Before you can connect an application, you need to install the correct driver. Because the YugabyteDB YSQL API is PostgreSQL-compatible, and the YCQL API has roots in the Apache Cassandra CQL, YugabyteDB supports many third-party drivers. For information on available drivers, refer to [Drivers](../../reference/drivers/). +Applications connect to and interact with YugabyteDB using API client libraries (also known as client drivers). Before you can connect an application, you need to install the correct driver. Because the YugabyteDB YSQL API is PostgreSQL-compatible, and the YCQL API has roots in the Apache Cassandra CQL, YugabyteDB supports many third-party drivers. For information on available drivers, refer to [Drivers and ORMs](../../drivers-orms/). {{}} diff --git a/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md b/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md index 4ff490fc1380..0d5f1231e5b5 100644 --- a/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md +++ b/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md @@ -25,7 +25,7 @@ The Audit log export feature is {{}}. To enable the feature in Yugabyt To export logs, you need to first create an export configuration. A configuration defines the sign in credentials and settings for the tool that you want to export your logs to. Refer to [Manage export configurations](../anywhere-export-configuration). -If you want to set pgaudit.log_level to a [severity level](https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS) greater than WARNING (that is, DEBUG1-5, INFO, NOTICE), you must set the YB-TServer [ysql_log_min_messages](../../reference/configuration/yb-tserver/#--ysql-log-min-messages) flag accordingly. +If you want to set pgaudit.log_level to a [severity level](https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS) greater than WARNING (that is, DEBUG1-5, INFO, NOTICE), you must set the YB-TServer [ysql_log_min_messages](../../../reference/configuration/yb-tserver/#ysql-log-min-messages) flag accordingly. ## Limitations diff --git a/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md b/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md index 9161101a79ba..2702b54d4ea1 100644 --- a/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md +++ b/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md @@ -68,7 +68,7 @@ For on-premises deployments, consider racks as zones to treat them as fault doma ### SSH Key Pairs -In the **SSH User** field, enter the name of the user that has SSH privileges on your instances. This is required because YBA needs SSH access to the nodes to provision them with YugabyteDB. Unless you plan to provision the database nodes manually, the SSH user needs to have password-free sudo permissions to complete a few tasks. +In the **SSH User** field, enter the name of the user that has SSH privileges on your instances. This is required because YBA needs SSH access to the nodes to provision them with YugabyteDB. This SSH user cannot be named yugabyte. Unless you plan to provision the database nodes manually, the SSH user needs to have password-free sudo permissions to complete a few tasks. If the SSH user requires a password for sudo access or the SSH user does not have sudo access, you must enable the **Manually Provision Nodes** option (under **Advanced**) and [manually provision the instances](../on-premises-script/). diff --git a/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md b/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md index 27cbe35bcf5c..5908130bd14b 100644 --- a/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md +++ b/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md @@ -33,9 +33,9 @@ If the universe uses Client-to-Node encryption in transit, to connect you need t For information on connecting using a client shell using this certificate, see [Connect from your desktop](#connect-from-your-desktop). -To use TLS to connect an application, refer to the [driver documentation](../../../reference/drivers/). If you are using a PostgreSQL JDBC driver to connect to YugabyteDB, you can also refer to [Configuring the client](https://jdbc.postgresql.org/documentation/head/ssl-client.html) for more details. +To use TLS to connect an application, refer to the [driver documentation](../../../drivers-orms/). If you are using a PostgreSQL JDBC driver to connect to YugabyteDB, you can also refer to [Configuring the client](https://jdbc.postgresql.org/documentation/head/ssl-client.html) for more details. -If you are using PostgreSQL/YugabyteDB JDBC driver with SSL, you need to convert the certificates to DER format. To do this, you need to perform only steps 6 and 7 from [Set up SSL certificates for Java applications](../../../reference/drivers/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications) section after downloading the certificates. +If you are using PostgreSQL/YugabyteDB JDBC driver with SSL, you need to convert the certificates to DER format. To do this, you need to perform only steps 6 and 7 from [Set up SSL certificates for Java applications](../../../drivers-orms/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications) section after downloading the certificates. ## Connect to a universe node diff --git a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md index 2aeeefb9a1d6..9251b67ca2da 100644 --- a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md +++ b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md @@ -60,7 +60,7 @@ Perform DDL operations in the order as shown in the following table. The order v | :-- | :----- | :----- | :----- | | CREATE TABLE | Execute on Source | Execute on Target | [Add table to replication](#add-a-table-to-replication) | | DROP TABLE | [Remove table from replication](#remove-a-table-from-replication) | Execute on Target | Execute on Source | -| CREATE INDEX | Execute on Source | Execute on Target | [Reconcile configuration](#reconcile-configuration) | +| CREATE INDEX | Execute on Source | Execute on Target | [Add table to replication](#add-a-table-to-replication) | | DROP INDEX | [Remove index table from replication](#remove-a-table-from-replication) | Execute on Target | Execute on Source | | ALTER TABLE or INDEX | Execute on Target | Execute on Source | No changes needed | diff --git a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md index 308478e174f9..f792f7433579 100644 --- a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md +++ b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md @@ -139,7 +139,7 @@ A full copy is done by first backing up the data to external storage, and then r ### YSQL tables -You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../architecture/docdb-sharding/colocated-tables/#xcluster-and-colocation). +You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../explore/colocation/#xcluster-and-colocation). If a [full copy](#full-copy-during-xcluster-setup) is required, the entire database is recreated on the target universe from the current database on the source universe. Be sure to keep the set of tables the same at all times on both the source and target universes in these databases by following the steps in [Manage tables and indexes](../xcluster-replication-ddl/). diff --git a/docs/content/preview/yugabyte-platform/security/authorization-platform.md b/docs/content/preview/yugabyte-platform/security/authorization-platform.md index 84c0c7432b10..f087a1ef1ab7 100644 --- a/docs/content/preview/yugabyte-platform/security/authorization-platform.md +++ b/docs/content/preview/yugabyte-platform/security/authorization-platform.md @@ -33,6 +33,8 @@ Enter the password to use for the default database admin superuser (`yugabyte` f You can also enable and disable the endpoints and authorization after deployment. Navigate to your universe, click **Actions**, and choose **Edit YSQL Configuration** or **Edit YCQL Configuration**. +Note that for universes deployed using YugabyteDB Anywhere, you can't exclusively [enable authentication using flags](../../../secure/enable-authentication/authentication-ysql/). You must enable and disable authentication using the YugabyteDB Anywhere UI. + ## Default roles and users The YugabyteDB database on your universe includes a set of default users and roles in YSQL and YCQL. diff --git a/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md b/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md index aec1b632a53d..85c866f1c456 100644 --- a/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md +++ b/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md @@ -188,19 +188,31 @@ You can create a new KMS configuration that uses HashiCorp Vault as follows: 1. Optionally, to confirm that the information is correct, click **Show details**. Note that sensitive configuration values are displayed partially masked. -## Modify a KMS configuration +## Replace an expiring token -You can modify an existing KMS configuration as follows: +If a KMS configuration uses a token for authentication, and that token cannot be infinitely renewed, you should replace the token before it expires (that is, reaches its TTL). You can also create a new policy, or switch to using an AppRole. -1. Navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations. +To replace a token, you create a new token for the existing policy in Vault, and add it to your KMS configuration in YugabyteDB Anywhere as follows: + +1. In Hashicorp Vault, create a token for your existing policy. For example: + + ```shell + vault token create -no-default-policy -policy=trx + ``` + + If you want to change the policy, see the steps in [Configure Hashicorp Vault](#configure-hashicorp-vault). + +1. In YugabyteDB Anywhere, navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations. + +1. Find the KMS configuration you want to modify and click its corresponding **Actions > Edit Configuration**. -1. Find the configuration you want to modify and click its corresponding **Actions > Edit Configuration**. +1. Set **Authentication Type** to **Token** and enter the token you obtained from the vault. -1. Provide new values for the **Vault Address** and **Secret Token** fields. + To switch to using an AppRole, set **Authentication Type** to **AppRole** and enter the credentials as appropriate. 1. Click **Save**. -1. Optionally, to confirm that the information is correct, click **Show details** or **Actions > Details**. +To confirm that the information is correct, click **Show details** or **Actions > Details**. ## Delete a KMS configuration @@ -208,4 +220,4 @@ You can modify an existing KMS configuration as follows: Without a KMS configuration, you would longer be able to decrypt universe keys that were encrypted using the master key in the KMS configuration. Even after a key is rotated out of service, it may still be needed to decrypt data in backups and snapshots that were created while it was active. For this reason, you can only delete a KMS configuration if it has never been used by any universes. {{}} -To delete a KMS configuration, click its corresponding **Actions > Delete Configuration**. +To delete a KMS configuration, navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations and click its corresponding **Actions > Delete Configuration**. diff --git a/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md b/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md index dd06aebe5f68..1e2f27cebbdb 100644 --- a/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md +++ b/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md @@ -137,7 +137,7 @@ For the most accurate migration assessment, the source database must be actively ## Assess a fleet of databases (Oracle only) -Use the Bulk Assessment command ([assess-migration-bulk](../reference/assess-migration/#assess-migration-bulk)) to assess multiple schemas across one or more database instances simultaneously. It offers: +Use the Bulk Assessment command ([assess-migration-bulk](../../reference/assess-migration/#assess-migration-bulk)) to assess multiple schemas across one or more database instances simultaneously. It offers: - Multi-Schema Assessment: Assess multiple schemas in different database instances with a single command, simplifying migration planning. - Centralized Reporting: All assessment reports are generated and stored in one organized directory, making diff --git a/docs/content/stable/api/ycql/type_jsonb.md b/docs/content/stable/api/ycql/type_jsonb.md index 41eb97ab5d4b..e594d484c843 100644 --- a/docs/content/stable/api/ycql/type_jsonb.md +++ b/docs/content/stable/api/ycql/type_jsonb.md @@ -241,6 +241,6 @@ Note that JSONB upsert only works for JSON objects and not for other data types ## See also -- [Explore JSON documents](../../../develop/learn/data-types-ycql/#jsonb) +- [Explore JSON documents](../../../explore/ycql-language/jsonb-ycql) - [Data types](..#data-types) - [Secondary indexes with JSONB](../../../explore/ycql-language/indexes-constraints/secondary-indexes-with-jsonb-ycql/) diff --git a/docs/content/stable/architecture/design-goals.md b/docs/content/stable/architecture/design-goals.md index cb3463306bd3..777b73cf809f 100644 --- a/docs/content/stable/architecture/design-goals.md +++ b/docs/content/stable/architecture/design-goals.md @@ -76,7 +76,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat ## Heterogeneous workload support -Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads. +Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads. ## Transaction isolation levels diff --git a/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md b/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md index 574a2ea02547..3a91fb51de26 100644 --- a/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md +++ b/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md @@ -88,7 +88,7 @@ To set up unidirectional transactional replication, do the following: Checkpointing of yugabyte completed. Bootstrap is not required for setting up xCluster replication ``` -1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby. +1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby. 1. Set up the xCluster replication group. @@ -117,7 +117,7 @@ list_xcluster_outbound_replication_groups [namespace_id] You should see output similar to the following: ```output -1 Outbound Replication Groups found: +1 Outbound Replication Groups found: [repl_group1] ``` @@ -132,7 +132,7 @@ list_universe_replications [namespace_id] You should see output similar to the following: ```output -1 Universe Replication Groups found: +1 Universe Replication Groups found: [repl_group1] ``` diff --git a/docs/content/stable/develop/_index.md b/docs/content/stable/develop/_index.md index 6b10512223dc..ee96a1d598fb 100644 --- a/docs/content/stable/develop/_index.md +++ b/docs/content/stable/develop/_index.md @@ -8,60 +8,74 @@ image: /images/section_icons/index/develop.png type: indexpage --- -{{}} - - {{}} - - {{}} - - {{}} - - {{}} - - {{}} - - {{}} - - {{}} - - {{}} - - {{}} - -{{}} +## Data modeling + +Although YugabyteDB is fully SQL compatible, modeling data for a distributed database is quite different from modeling for a monolithic database like MySQL or PostgreSQL. This is because the table data is distributed across different nodes. You must understand how to model your data for efficient storage and retrieval from a distributed system. + +{{}} +To understand how to model your data for YugabyteDB, see [Distributed data modeling](./data-modeling/). +{{}} + +## Global applications + +Today's applications have to cater to users distributed across the globe. Running applications across multiple data centers while providing the best user experience is no trivial task. Yugabyte provides some battle-tested design patterns for your global applications. + +{{}} +To learn more about building global applications, see [Build global applications](./build-global-apps/). +{{}} + +## Multi-cloud applications + +A multi-cloud strategy provides the flexibility to use the optimal computing environment for each specific workload, helps avoid vendor lock-in, lets you place data close to the users, and can minimize cost by choosing optimal pricing and performance of various cloud providers. You can also opt for a hybrid model as your path to migration onto the cloud. + +{{}} +To understand how to build a multi-cloud setup with YugabyteDB, see [Build multi-cloud applications](./multi-cloud/). +{{}} + +## Application development + +Although building scalable applications on top of YugabyteDB is straightforward, you need to understand certain fundamental concepts like transactions, search, and more to make the best use of them. + +{{}} +To learn how to build applications on top of YugabyteDB, see [Learn app development](./learn/). +{{}} + +## Best practices + +Use these best practices to build distributed applications on top of YugabyteDB; this includes a list of techniques that you can adopt to make your application perform its best. + +{{}} +For more details, see [Best practices](./best-practices-ysql). +{{}} + +## Drivers and ORMs + +To communicate with YugabyteDB, applications need to use drivers. Applications can also be built using Object-Relational mappings, a technique used to communicate with the database using object-oriented techniques. We've tested various drivers and ORMs in multiple languages with the optimal configurations to get your applications up and running. + +{{}} +For the list of drivers and ORMs with sample code, see [Drivers and ORMs](../drivers-orms/). +{{}} + +## Quality of service + +Although YugabyteDB can scale horizontally when needed, it also includes safety measures and settings such as rate-limiting, admission control, transaction priorities, and more, to ensure applications can maintain a high quality of service for all users when the systems comes under heavy load. + +{{}} +To learn more about how to use rate-limiting and other features, see [Quality of service](./quality-of-service/). +{{}} + +## Cloud-native development + +Cloud-native development refers to building and running applications that fully exploit the advantages of cloud computing without needing to install any software on your development machine. Two prominent tools for cloud-native development environments are Gitpod and GitHub Codespaces. Both provide cloud-based development environments, but they have their own features and use cases. + +{{}} +To learn more about how to use browser-based IDEs, see [Cloud-native development](./gitdev/). +{{}} + +## Tutorials + +Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more. + +{{}} +For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/). +{{}} diff --git a/docs/content/stable/develop/common-patterns/timeseries/_index.md b/docs/content/stable/develop/common-patterns/timeseries/_index.md deleted file mode 100644 index d9f6f09a6538..000000000000 --- a/docs/content/stable/develop/common-patterns/timeseries/_index.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Time series data model -headerTitle: Time series data model -linkTitle: Time series -description: Explore the Time series data model -headcontent: Handle large amounts of data ordered by time -menu: - stable: - identifier: common-patterns-timeseries - parent: common-patterns - weight: 100 -type: indexpage ---- - -Time series data are measurements or events that are tracked and monitored over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data. A time series data model is designed specifically for handling large amounts of data that are ordered by time. - -Although YugabyteDB is hash sharded by default, it also supports range sharding, where the data is ordered and split at specific boundaries. - -A time series pattern works best for range queries where you need to look up items in a given time range. - -You can use the following common patterns to store and retrieve time series data in YugabyteDB in both distributed and ordered manner: - -- **Global ordering by time** - - In this pattern, all your data is ordered by time across different tablets. - - To understand how to efficiently store and retrieve data in this pattern, see [Global ordering by time](./global-ordering). - -- **Ordering by time per entity** - - In this pattern, the data is ordered by time in a specific entity. - - To understand how to distribute the entities effectively and avoid hot shards, see [Ordering by time per entity](./ordering-by-entity). - -- **Automatic data expiration** - - In some scenarios, you don't want data lying around for a long time as they may not be needed or you have rules in your organization that you cannot store specific data longer than a particular duration. For such cases, you can set a time-to-live value on rows, columns, and the table itself. - - For more details, see [Automatic data expiration](./data-expiry). - -- **Partitioning** - - When you have a lot of data that needs to deleted regularly, you can opt to partition your data. This also has speed advantages in some cases. - - For more details, see [Partitioning by time](./partitioning-by-time). diff --git a/docs/content/stable/develop/data-modeling/_index.md b/docs/content/stable/develop/data-modeling/_index.md new file mode 100644 index 000000000000..d480c150fb68 --- /dev/null +++ b/docs/content/stable/develop/data-modeling/_index.md @@ -0,0 +1,62 @@ +--- +title: Distributed Data modeling +linkTitle: Data modeling +description: Learn to develop YugabyteDB applications +image: fa-sharp fa-light fa-objects-column +menu: + stable: + identifier: data-modeling + parent: develop + weight: 100 +type: indexpage +--- + +Data modeling is the process of defining the structure, organization, and relationships of data in a database. In a distributed SQL database, this process becomes even more crucial due to the complexities introduced by data distribution, replication, and consistency. To fully leverage the benefits offered by YugabyteDB, you need to approach data modeling with a distributed mindset. Data modeling for distributed SQL databases requires a careful balance of theoretical principles and practical considerations. + +## Organization + +In YugabyteDB, data is stored as rows and columns in tables; tables are organized under schemas and databases. + +{{}} +To understand how to create and manage tables, schemas, and databases, see [Schemas and tables](../../explore/ysql-language-features/databases-schemas-tables). +{{}} + +## Sharding + +In YugabyteDB, table data is split into tablets, and distributed across multiple nodes in the cluster. Applications can connect to any node for storing and retrieving data. Because reads and writes can span multiple nodes, it's crucial to consider how table data is sharded and distributed when modeling your data. To design your tables and indexes for fast retrieval and storage in YugabyteDB, you first need to understand the [data distribution](../../explore/going-beyond-sql/data-sharding) schemes: Hash and Range sharding. + +{{}} +To learn more about data distribution schemes, see [Configurable data sharding](../../explore/going-beyond-sql/data-sharding). +{{}} + +## Primary keys + +The primary key is the unique identifier for each row in the table. The distribution and ordering of table data depends on the primary key. + +{{}} +To design optimal primary keys for your tables, see [Primary keys](./primary-keys-ysql). +{{}} + +## Secondary indexes + +Indexes provide alternate access patterns for queries not involving the primary key of the table. With the help of an index, you can improve the access operations of your queries. + +{{}} +To design optimal indexes for faster lookup, see [Secondary indexes](./secondary-indexes-ysql). +{{}} + +## Hot shards + +In distributed systems, a hot-spot or hot-shard refers to a node that is overloaded with queries due to disproportionate traffic compared to other nodes in the cluster. + +{{}} +To understand the hot-shard problem and solutions to overcome the issue, see [Hot shards](./hot-shards-ysql). +{{}} + +## Table partitioning + +When the data in tables keep growing, you can partition the tables for better performance and enhanced data management. Partitioning also makes it easier to drop older data by dropping partitions. In YugabyteDB, you can also use partitioning with Tablespaces to improve latency in multi-region scenarios and adhere to data residency laws like GDPR. + +{{}} +To understand partitioning in YugabyteDB, see [Table partitioning](./partitioning). +{{}} diff --git a/docs/content/stable/develop/common-patterns/_index.md b/docs/content/stable/develop/data-modeling/common-patterns/_index.md similarity index 92% rename from docs/content/stable/develop/common-patterns/_index.md rename to docs/content/stable/develop/data-modeling/common-patterns/_index.md index fdc69cb30b26..1cb61f861a79 100644 --- a/docs/content/stable/develop/common-patterns/_index.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/_index.md @@ -8,8 +8,8 @@ image: /images/section_icons/architecture/distributed_acid.png menu: stable: identifier: common-patterns - parent: develop - weight: 400 + parent: data-modeling + weight: 600 type: indexpage showRightNav: true --- @@ -35,7 +35,9 @@ A good example would be the speed sensor in a car that tracks the speed of a car An insurance company could use the data to investigate accidents or an automobile company could track various sensors and improve the performance of the car. This could amount to billions of data points. +{{}} For more information on storing and retrieving such vast amounts of ordered data in YugabyteDB, see [Time series data model](./timeseries). +{{}} ## Key-value @@ -50,13 +52,17 @@ user2.name = "Harry Potter" user2.country = "UK" ``` -Key-value stores are expected to be some of the fastest storage data models. For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue). +Key-value stores are expected to be some of the fastest storage data models. + +{{}} +For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue). +{{}} ## Wide-column In a wide-column data model, the data is organized as rows and columns. Each row is identified by a row `id` or `name` and each column is identified by a column `id` or `name`. Each row can have any number of columns attached to it. You can visualize it as a table-like structure where some of the cells are empty. For example: -```sql{.nocopy} +```caddyfile{.nocopy} | | col-1 | col-2 | col-3 | | ----- | ----- | ----- | ----- | | row-1 | a | | c | @@ -66,7 +72,7 @@ In a wide-column data model, the data is organized as rows and columns. Each row To retrieve specific cells, you can issue commands similar to the following: -```sql{.nocopy} +```python{.nocopy} get(row-1, col-3) ==> c get(row-3, col-2) ==> NULL ``` diff --git a/docs/content/stable/develop/common-patterns/keyvalue.md b/docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md similarity index 94% rename from docs/content/stable/develop/common-patterns/keyvalue.md rename to docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md index 0139def2b3c1..a99aff285714 100644 --- a/docs/content/stable/develop/common-patterns/keyvalue.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md @@ -22,8 +22,8 @@ With these three simple functionalities, key-value stores have carved themselves YugabyteDB provides several advantages when used as a key-value store: -- YugabyteDB internally [stores data](../../../architecture/docdb/) as a collection of key-value pairs and therefore automatically excels as a key-value store. -- Being [distributed by design](../../../architecture/transactions/distributed-txns/), YugabyteDB also naturally acts as a distributed key-value store. +- YugabyteDB internally [stores data](../../../../architecture/docdb/data-model/) as a collection of key-value pairs and therefore automatically excels as a key-value store. +- Being [distributed by design](../../../../architecture/transactions/distributed-txns/), YugabyteDB also naturally acts as a distributed key-value store. - YugabyteDB inherently provides consistency of data because of Raft replication, which is typically not guaranteed by other key-value stores. ## Use cases @@ -36,7 +36,6 @@ YugabyteDB provides several advantages when used as a key-value store: 1. **Shopping cart** : A user's shopping cart can be represented as a JSON or Hstore and stored under a key (for example, `user1.cart`). Given the strong consistency and resilience offered by YugabyteDB, the cart information will not be lost even in case of disasters. - ## Simple scenario Consider a scenario where you want to store multiple details related to users like `id`, `name`, `country`. For this, you could adopt a simple key-value schema where each attribute is a separate key, such as the following where the key contains both the `id` and the attribute name while the value is the value of the attribute, like: @@ -234,4 +233,4 @@ you will notice that the `name` attribute has been removed for user `id=1`. ## Learn more - [Hstore](https://www.postgresql.org/docs/11/hstore.html) -- [Json](../../../explore/ysql-language-features/jsonb-ysql/) \ No newline at end of file +- [Json](../../../../explore/ysql-language-features/jsonb-ysql/) \ No newline at end of file diff --git a/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md new file mode 100644 index 000000000000..a70478bc3c06 --- /dev/null +++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md @@ -0,0 +1,53 @@ +--- +title: Time series data model +headerTitle: Time series data model +linkTitle: Time series +description: Explore the Time series data model +headcontent: Handle large amounts of data ordered by time +menu: + stable: + identifier: common-patterns-timeseries + parent: common-patterns + weight: 100 +type: indexpage +--- + +Time series data are measurements or events that are tracked and monitored over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data. A time series data model is designed specifically for handling large amounts of data that are ordered by time. + +Although YugabyteDB is hash sharded by default, it also supports range sharding, where the data is ordered and split at specific boundaries. + +A time series pattern works best for range queries where you need to look up items in a given time range. + +You can use the following common patterns to store and retrieve time series data in YugabyteDB in both distributed and ordered manner: + +## Global ordering by time + +In this pattern, all your data is ordered by time across different tablets. + +{{}} +To understand how to efficiently store and retrieve data in this pattern, see [Global ordering by time](./global-ordering). +{{}} + +## Ordering by time per entity + +In this pattern, the data is ordered by time in a specific entity. + +{{}} +To understand how to distribute the entities effectively and avoid hot shards, see [Ordering by time per entity](./ordering-by-entity). +{{}} + +## Automatic data expiration + +In some scenarios, you don't want data lying around for a long time as they may not be needed or you have rules in your organization that you cannot store specific data longer than a particular duration. For such cases, you can set a time-to-live value on rows, columns, and the table itself. + +{{}} +For more details, see [Automatic data expiration](./data-expiry). +{{}} + +## Partitioning + +When you have a lot of data that needs to be deleted regularly, you can opt to partition your data. This also has speed advantages in some cases. + +{{}} +For more details, see [Partitioning by time](./partitioning-by-time). +{{}} diff --git a/docs/content/stable/develop/common-patterns/timeseries/data-expiry.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md similarity index 93% rename from docs/content/stable/develop/common-patterns/timeseries/data-expiry.md rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md index f9de3570ac1c..adc6990f1506 100644 --- a/docs/content/stable/develop/common-patterns/timeseries/data-expiry.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md @@ -4,6 +4,7 @@ headerTitle: Automatic data expiration linkTitle: Automatic data expiration description: Expire data using the `USING TTL` operator headcontent: Expire data using time-to-live +badges: ycql menu: stable: identifier: timeseries-automatic-expiration @@ -15,7 +16,7 @@ type: docs Consider a scenario where you only need the last few values and the older data is not of any value and can be purged. Typically, this requires setting up a separate background job. Using YugabyteDB however, you can set an expiration value for columns using the `USING TTL` operator. {{}} -TTL-based expiration is only available in [YCQL](../../../../api/ycql/). +TTL-based expiration is only available in [YCQL](/{{}}/api/ycql/). {{}} ## Setup @@ -99,8 +100,8 @@ Note that the row is present but the value for the `speed` column is `null`. Instead of explicitly setting the TTL at the row or column level, you can set a TTL on the table. This also has the benefit of saving space as the TTL value is stored in only one place and not per row or column. -Define table-level TTL using the [default_time_to_live property](../../../../api/ycql/ddl_create_table/#table-properties-1). +Define table-level TTL using the [default_time_to_live property](/{{}}/api/ycql/ddl_create_table/#table-properties-1). ## Learn more -- [TTL for data expiration](../../../learn/ttl-data-expiration-ycql/) \ No newline at end of file +- [TTL for data expiration](/{{}}/develop/learn/ttl-data-expiration-ycql/) \ No newline at end of file diff --git a/docs/content/stable/develop/common-patterns/timeseries/global-ordering.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md similarity index 99% rename from docs/content/stable/develop/common-patterns/timeseries/global-ordering.md rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md index 8a6e897d4203..92dfa290ff78 100644 --- a/docs/content/stable/develop/common-patterns/timeseries/global-ordering.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md @@ -4,6 +4,7 @@ headerTitle: Global ordering by time linkTitle: Global ordering by time description: Distribute your time-ordered data and retrieve data efficiently headcontent: Distribute time-ordered data and retrieve data efficiently +badges: ysql menu: stable: identifier: timeseries-global-ordering diff --git a/docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md similarity index 99% rename from docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md index 7dafc460e358..784617b00660 100644 --- a/docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md @@ -4,6 +4,7 @@ headerTitle: Order by time per entity linkTitle: Ordering by time per entity description: Keep entity data together using Entity-wise or Bucket-based ordering headcontent: Keep entity data together in a time series data model +badges: ysql menu: stable: identifier: timeseries-entity-ordering diff --git a/docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md similarity index 95% rename from docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md index 7b0d2b36070d..7a1b479b290a 100644 --- a/docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md +++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md @@ -4,6 +4,9 @@ headerTitle: Partition data by time linkTitle: Partition data by time description: Partition data for efficient data management headcontent: Partition data for efficient data management +badges: ysql +aliases: + - /preview/common-patterns/timeseries/partitioning-by-time/ menu: stable: identifier: timeseries-partition-by-time @@ -17,7 +20,7 @@ Partitioning refers to splitting what is logically one large table into smaller The following example describes the advantages of partitions in more detail. {{}} -Partitioning is only available in [YSQL](../../../../api/ysql/). +Partitioning is only available in [YSQL](/{{}}/api/ysql/). {{}} ## Setup @@ -140,4 +143,4 @@ Time: 103.214 ms ## Learn more -- [Table partitioning](../../../../explore/ysql-language-features/advanced-features/partitions/) +- [Table partitioning](/{{}}/explore/ysql-language-features/advanced-features/partitions/) diff --git a/docs/content/stable/develop/data-modeling/hot-shards-ysql.md b/docs/content/stable/develop/data-modeling/hot-shards-ysql.md new file mode 100644 index 000000000000..c0bc7c59b920 --- /dev/null +++ b/docs/content/stable/develop/data-modeling/hot-shards-ysql.md @@ -0,0 +1,129 @@ +--- +title: Avoiding hotspots in YugabyteDB +headertitle: Avoiding hotspots +linkTitle: Hot shards +badges: ysql +menu: + stable: + identifier: data-modeling-hot-shard + parent: data-modeling + weight: 300 +type: docs +--- + +A hot shard is a common problem in data retrieval where a specific node becomes a performance bottleneck due to disproportionately high traffic or workload compared to other nodes in the system. This imbalance can lead to various issues, such as degraded system performance, increased latency, and potential system failures. + +This typically happens because of mismatches between query pattern and data distribution. You should be careful when choosing a primary key in the schema design to not accidentally create hotspots in your database. + +{{}} +The hot shard issue can occur both for tables and indexes. +{{}} + +Let us understand the problem and the solution to this via some examples. + + +{{