postgres

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZeroTimeUCT     = "0001-01-01 00:00:00"
	ZeroTimeUCTZone = ZeroTimeUCT + "+00:00:00"
	ZeroTimeCST     = "0001-01-01 08:05:43"
	ZeroTimeCSTZone = ZeroTimeCST + "+08:05:43"
)
View Source
const (
	NotDeletedUCT = sql.ColumnDeletedAt + " = '" + ZeroTimeUCT + "'"
	NotDeletedCST = sql.ColumnDeletedAt + " = '" + ZeroTimeCST + "'"
)
View Source
const (
	WithNotDeletedUCT = ` AND ` + NotDeletedUCT
	WithNotDeletedCST = ` AND ` + NotDeletedUCT
)
View Source
const (
	// Create a function that drops tables in the public schema for the given username
	DeleteTablesFunc = `` /* 339-byte string literal not displayed */

	DeleteTables = `SELECT del_tabs('postgres')`
	// Create a function that truncates tables in the public schema for the given username
	TruncateTablesFunc = `` /* 378-byte string literal not displayed */

	TruncateTables = `SELECT truncate_tables('postgres')`
)

Variables

This section is empty.

Functions

func IsDuplicate

func IsDuplicate(err error) bool

IsDuplicate reports whether the condition holds.

func Now

func Now() string

Now returns the result.

Types

type OTelCollector added in v1.10.3

type OTelCollector struct {
	// contains filtered or unexported fields
}

func NewOTelCollector added in v1.10.3

func NewOTelCollector(db *sql.DB, meter metric.Meter) *OTelCollector

NewOTelCollector creates and returns a new instance.

func (*OTelCollector) Close added in v1.10.3

func (c *OTelCollector) Close(context.Context) error

Close closes and releases resources.

func (*OTelCollector) Init added in v1.10.3

func (c *OTelCollector) Init() error

Init performs the operation.

Jump to

Keyboard shortcuts

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