db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package postgres implements postgres connection.

Index

Constants

View Source
const (
	UniqueViolation = "23505"
)

Variables

This section is empty.

Functions

func CheckNotUnique

func CheckNotUnique(err error) bool

Types

type Option

type Option func(*SQL)

Option -.

func ConnAttempts

func ConnAttempts(attempts int) Option

ConnAttempts -.

func ConnTimeout

func ConnTimeout(timeout time.Duration) Option

ConnTimeout -.

func MaxPoolSize

func MaxPoolSize(size int) Option

MaxPoolSize -.

type SQL

type SQL struct {
	Builder    squirrel.StatementBuilderType
	Pool       *sql.DB
	IsEmbedded bool
	// contains filtered or unexported fields
}

SQL -.

func New

func New(url string, opts ...Option) (*SQL, error)

New -.

func (*SQL) Close

func (p *SQL) Close()

Close -.

Jump to

Keyboard shortcuts

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