store

package
v1.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityType

type EntityType string
const (
	Sensor       EntityType = "sensor"
	Image        EntityType = "image"
	Flowerbed    EntityType = "flowerbed"
	TreeCluster  EntityType = "treecluster"
	Tree         EntityType = "tree"
	Vehicle      EntityType = "vehicle"
	Region       EntityType = "region"
	WateringPlan EntityType = "watering plan"
)

type Store

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

func NewStore

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

func (*Store) Close

func (s *Store) Close()

func (*Store) DB added in v1.1.0

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

func (*Store) HandleError

func (s *Store) HandleError(err error) error

TODO: Improve error handling

func (*Store) SetEntityType

func (s *Store) SetEntityType(entityType EntityType)

TODO: Remove

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