Basic types, integers, floats, string, bool, time.Time, net.IP, net.IPNet. All struct fields are nullable by default and zero values (empty string, 0, zero time, empty map or slice, nil ptr) are marshalled as SQL NULL. pg:",notnull" is used to add SQL NOT NULL constraint and pg:",use_zero" to allow Go zero values. sql.NullBool, sql.NullString, sql.NullInt64, sql.NullFloat64 and pg.NullTime. Structs, maps and arrays are marshalled as JSON by default. PostgreSQL multidimensional Arrays using array tag and Array wrapper. Hstore using hstore tag and Hstore wrapper. go-pg supports 2 last Go versions and requires support for Go modules. So make sure to initialize a Go module. ORM supports has one, belongs to, has many, and many to many with composite/multi-column primary keys. ForEach that calls a function for each row returned by the query without loading all rows into the memory.

Features

  • Composite types
  • Transactions
  • Prepared statements
  • Timeouts and canceling queries using context
  • Automatic connection pooling with circuit breaker support
  • Queries retry on network errors

Project Samples

Project Activity

See All Activity >

License

BSD License

Follow PostgreSQL client and ORM for Golang

PostgreSQL client and ORM for Golang Web Site

Other Useful Business Software
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud Icon
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud

Get back to your application and leave the database to us. Cloud SQL automatically handles backups, replication, and scaling.

Cloud SQL is a fully managed relational database for MySQL, PostgreSQL, and SQL Server. We handle patching, backups, replication, encryption, and failover—so you can focus on your app. Migrate from on-prem or other clouds with free Database Migration Service. IDC found customers achieved 246% ROI. New customers get $300 in credits plus a 30-day free trial.
Try Cloud SQL Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PostgreSQL client and ORM for Golang!

Additional Project Details

Programming Language

Go

Related Categories

Go Object-Relational Mapping (ORM) Software, Go Database Clients

Registered

2021-11-25