store

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 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"
)

type Store

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

func NewStore

func NewStore(db *pgxpool.Pool) *Store

func (*Store) CheckImageExists

func (s *Store) CheckImageExists(ctx context.Context, imageID *int32) error

func (*Store) CheckSensorExists

func (s *Store) CheckSensorExists(ctx context.Context, sensorID *int32) error

func (*Store) Close

func (s *Store) Close()

func (*Store) HandleError

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

func (*Store) SetEntityType

func (s *Store) SetEntityType(entityType EntityType)

func (*Store) WithTx

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

Jump to

Keyboard shortcuts

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