
Go
The following projects can be used to implement Golang applications using the YugabyteDB YSQL API.
Supported Projects
Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
---|---|---|---|
YugabyteDB PGX Driver [Recommended] | Documentation Hello World App Reference Page |
v4 | 2.8 and above |
PGX Driver | Documentation Hello World App Reference Page |
v4 | 2.8 and above |
PQ Driver | Documentation Hello World App Reference Page |
v1.10.2 | 2.6 and above |
Project | Documentation and Guides | Example Apps |
---|---|---|
GORM [Recommended] | Documentation | Hello World |
GO-PG | Documentation | Hello World |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the Hello World examples.
For fully-runnable code snippets and explanations of common operations, see the example apps. Before running the example apps, make sure you have installed the prerequisites.
For reference documentation, including using projects with SSL, refer to the drivers and ORMs 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.
Rungo --version
in a terminal to check your version of Go. To install Go, visit Go Downloads. -
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 page. -
YugabyteDB cluster
- Create a free cluster on YugabyteDB Managed. Refer to Create a free cluster. Note that YugabyteDB Managed requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in Install YugabyteDB.