postgres

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SourceType string = "postgres"

Variables

This section is empty.

Functions

func ConvertParamMapToRawQuery added in v0.12.0

func ConvertParamMapToRawQuery(queryParams map[string]string) string

Types

type Config

type Config struct {
	Name        string            `yaml:"name" validate:"required"`
	Type        string            `yaml:"type" validate:"required"`
	Host        string            `yaml:"host" validate:"required"`
	Port        string            `yaml:"port" validate:"required"`
	User        string            `yaml:"user" validate:"required"`
	Password    string            `yaml:"password" validate:"required"`
	Database    string            `yaml:"database" validate:"required"`
	QueryParams map[string]string `yaml:"queryParams"`
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigType added in v0.27.0

func (r Config) SourceConfigType() string

type Source

type Source struct {
	Config
	Pool *pgxpool.Pool
}

func (*Source) PostgresPool

func (s *Source) PostgresPool() *pgxpool.Pool

func (*Source) RunSQL added in v0.25.0

func (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error)

func (*Source) SourceType added in v0.27.0

func (s *Source) SourceType() string

func (*Source) ToConfig added in v0.20.0

func (s *Source) ToConfig() sources.SourceConfig

Jump to

Keyboard shortcuts

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