postgres

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgxRowsAdapter

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

PgxRowsAdapter implements common.DatasourceRows.

func FromPgxRows

func FromPgxRows(rows pgx.Rows) *PgxRowsAdapter

func (*PgxRowsAdapter) Close

func (p *PgxRowsAdapter) Close()

func (*PgxRowsAdapter) Columns

func (p *PgxRowsAdapter) Columns() ([]string, error)

func (*PgxRowsAdapter) Err

func (p *PgxRowsAdapter) Err() error

func (*PgxRowsAdapter) Next

func (p *PgxRowsAdapter) Next() bool

func (*PgxRowsAdapter) SliceScan

func (p *PgxRowsAdapter) SliceScan() ([]any, error)

type Postgres

type Postgres struct {
	common.DatasourceCommon
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(collections config.FeaturesCollections, pgConfig config.Postgres,
	transformOnTheFly bool, maxDecimals int, forceUTC bool) (*Postgres, error)

func (*Postgres) Close

func (pg *Postgres) Close()

func (*Postgres) GetFeature

func (pg *Postgres) GetFeature(ctx context.Context, collection string, featureID any,
	outputSRID d.SRID, axisOrder d.AxisOrder, profile d.Profile) (*d.Feature, error)

func (*Postgres) GetFeatureIDs

func (pg *Postgres) GetFeatureIDs(_ context.Context, _ string, _ ds.FeaturesCriteria) ([]int64, d.Cursors, error)

func (*Postgres) GetFeatures

func (pg *Postgres) GetFeatures(ctx context.Context, collection string, criteria ds.FeaturesCriteria,
	axisOrder d.AxisOrder, profile d.Profile) (*d.FeatureCollection, d.Cursors, error)

func (*Postgres) GetFeaturesByID

func (pg *Postgres) GetFeaturesByID(_ context.Context, _ string, _ []int64, _ d.AxisOrder, _ d.Profile) (*d.FeatureCollection, error)

func (*Postgres) SearchFeaturesAcrossCollections added in v1.5.0

func (pg *Postgres) SearchFeaturesAcrossCollections(ctx context.Context, criteria ds.FeaturesSearchCriteria,
	axisOrder d.AxisOrder, collections search.CollectionsWithParams) (*d.FeatureCollection, error)

type SQLLog added in v1.0.1

type SQLLog struct {
	LogSQL bool
	Tracer *tracelog.TraceLog
}

SQLLog query logging for debugging purposes.

func NewSQLLogFromEnv added in v1.0.1

func NewSQLLogFromEnv() *SQLLog

NewSQLLogFromEnv build a SQLLog based on the `LOG_SQL` environment variable.

Jump to

Keyboard shortcuts

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