Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v1.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseType = "postgres"
)

Variables

This section is empty.

Functions

func GoquDialectOptions added in v1.10.0

func GoquDialectOptions() *sqlgen.SQLDialectOptions

func GoquExpressions added in v1.10.0

func GoquExpressions() *base.Expressions

Types

type Config

type Config struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	DBName   string `json:"dbname"`
	User     string `json:"user"`
	Password string `json:"password"`
	SSLMode  string `json:"sslmode"`

	TunnelInfo *sshtunnel.Config `json:"tunnel_info,omitempty"`

	// SkipHostValidation is used to skip host validation during tests
	SkipHostValidation bool `json:"skipHostValidation"`
	UseLegacyMappings  bool `json:"useLegacyMappings"`
}

Config used to connect to SQL Database

func (Config) ConnectionString

func (c Config) ConnectionString() string

func (*Config) Parse

func (c *Config) Parse(input json.RawMessage) error

type DB

type DB struct {
	*base.DB
}

func NewDB

func NewDB(credentialsJSON json.RawMessage) (*DB, error)

NewDB creates a new postgres db client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL