store

package
v1.3.0-nightly.20250904 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	*sqlc.Queries
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *pgxpool.Pool, querier *sqlc.Queries) *Store

func (*Store) Close

func (s *Store) Close()

func (*Store) DB

func (s *Store) DB() *pgxpool.Pool

func (*Store) GetLatestSensorDataBySensorID

func (s *Store) GetLatestSensorDataBySensorID(ctx context.Context, id string) (*entities.SensorData, error)

This function provides the latest data from a specific sensor

func (*Store) MapClusterFields

func (s *Store) MapClusterFields(ctx context.Context, tc *entities.TreeCluster) error

This function is required as soon as you want to add data to the tree cluster object from the database, e.g. the linked region or the linked trees. As this function is required in different repositories, it has been outsourced.

func (*Store) MapError

func (s *Store) MapError(err error, dbType any) error

func (*Store) MapSensorFields

func (s *Store) MapSensorFields(ctx context.Context, sn *entities.Sensor) error

This function is required as soon as you want to add the data to the sensor object

func (*Store) WithTx

func (s *Store) WithTx(ctx context.Context, fn func(*Store) error) error

Jump to

Keyboard shortcuts

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