Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GORM PostgreSQL driver

License

NotificationsYou must be signed in to change notification settings

go-gorm/postgres

Repository files navigation

Quick Start

import ("gorm.io/driver/postgres""gorm.io/gorm")// https://github.com/jackc/pgxdsn:="host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai"db,err:=gorm.Open(postgres.Open(dsn),&gorm.Config{})

Configuration

import ("gorm.io/driver/postgres""gorm.io/gorm")db,err:=gorm.Open(postgres.New(postgres.Config{DSN:"host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai",// data source name, refer https://github.com/jackc/pgxPreferSimpleProtocol:true,// disables implicit prepared statement usage. By default pgx automatically uses the extended protocol}),&gorm.Config{})

Checkouthttps://gorm.io for details.

About

GORM PostgreSQL driver

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors61

Languages


[8]ページ先頭

©2009-2025 Movatter.jp