Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 516 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 516 Bytes

GORM PostgreSQL Driver

Quick Start

import (
  og "github.com/stitchcula/OpenGauss"
  "gorm.io/gorm"
)

// gitee.com/opengauss/openGauss-connector-go-pq
config := og.Config{
    Host:     "192.168.xx.xx",
    Port:     5432,
    Database: "db_tpcc",
    User:     "user_persistence",
    Password: "1234@abc",
    RuntimeParams: map[string]string{
    "search_path": "my_schema",
    },
}
db, err := gorm.Open(og.New(config), &gorm.Config{})

Checkout https://gorm.io for details.