Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Work with SQL Databases in Go

Demo repository for article on SQL database access in Go.

🟢 Prerequisites

  • The latest version of Go and PostgreSQL installed

📦 Getting started

Clone the repository:

git clone https://github.com/betterstack-community/go-database-access.git
cd go-database-access/

Build the project:

go build

Rename .env.example to .env and modify the PostgreSQL connection string as needed.

Create a new database through the psql console named "gda".

Populate the gda database:

./gda setup

Run code examples:

./gda example [connect|single|multi|parameterised|null|insert|transaction|struct|return|prepared|conn|timeout]

⚖ License

The code used in this project and in the linked tutorial are licensed under the Apache License, Version 2.0.

About

Demo repository for article on SQL database access in Go

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages