sqlc

package
v1.3.0-nightly.20250803 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveVehicleParams

type ArchiveVehicleParams struct {
	ID         int32
	ArchivedAt *time.Time
}

type CreateRegionParams

type CreateRegionParams struct {
	Name           string
	StGeomfromtext interface{}
}

type CreateSensorParams

type CreateSensorParams struct {
	ID                     string
	Status                 SensorStatus
	Latitude               float64
	Longitude              float64
	Provider               *string
	AdditionalInformations []byte
}

type CreateTreeClusterParams

type CreateTreeClusterParams struct {
	Name                   string
	RegionID               *int32
	Address                string
	Description            string
	MoistureLevel          float64
	WateringStatus         WateringStatus
	SoilCondition          TreeSoilCondition
	Provider               *string
	AdditionalInformations []byte
}

type CreateTreeParams

type CreateTreeParams struct {
	TreeClusterID          *int32
	SensorID               *string
	PlantingYear           int32
	Species                string
	Number                 string
	Description            *string
	WateringStatus         WateringStatus
	Latitude               float64
	Longitude              float64
	Provider               *string
	AdditionalInformations []byte
}

type CreateVehicleParams

type CreateVehicleParams struct {
	NumberPlate            string
	Description            string
	WaterCapacity          float64
	Type                   VehicleType
	Status                 VehicleStatus
	Model                  string
	DrivingLicense         DrivingLicense
	Height                 float64
	Length                 float64
	Width                  float64
	Weight                 float64
	Provider               *string
	AdditionalInformations []byte
}

type CreateWateringPlanParams

type CreateWateringPlanParams struct {
	Date                   time.Time
	Description            string
	Status                 WateringPlanStatus
	Distance               *float64
	TotalWaterRequired     *float64
	CancellationNote       string
	Provider               *string
	AdditionalInformations []byte
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DrivingLicense

type DrivingLicense string
const (
	DrivingLicenseB  DrivingLicense = "B"
	DrivingLicenseBE DrivingLicense = "BE"
	DrivingLicenseC  DrivingLicense = "C"
	DrivingLicenseCE DrivingLicense = "CE"
)

func (*DrivingLicense) Scan

func (e *DrivingLicense) Scan(src interface{}) error

type FindNearestTreeParams

type FindNearestTreeParams struct {
	StMakepoint   interface{}
	StMakepoint_2 interface{}
}

type GetAllRegionsParams

type GetAllRegionsParams struct {
	Limit  int32
	Offset int32
}

type GetAllSensorsParams

type GetAllSensorsParams struct {
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetAllTreeClusterRegionsWithWateringPlanCountRow

type GetAllTreeClusterRegionsWithWateringPlanCountRow struct {
	Name              string
	WateringPlanCount int64
}

type GetAllTreeClustersParams

type GetAllTreeClustersParams struct {
	Limit          int32
	Offset         int32
	WateringStatus []string
	Region         []string
	Provider       interface{}
}

type GetAllTreesCountParams

type GetAllTreesCountParams struct {
	WateringStatus []string
	Provider       interface{}
	Years          []int32
	HasCluster     *bool
}

type GetAllTreesParams

type GetAllTreesParams struct {
	Limit          int32
	Offset         int32
	WateringStatus []string
	Provider       interface{}
	Years          []int32
	HasCluster     *bool
}

type GetAllVehiclesByTypeCountParams

type GetAllVehiclesByTypeCountParams struct {
	Type     VehicleType
	Provider interface{}
}

type GetAllVehiclesByTypeParams

type GetAllVehiclesByTypeParams struct {
	Type     VehicleType
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetAllVehiclesByTypeWithArchivedCountParams

type GetAllVehiclesByTypeWithArchivedCountParams struct {
	Type     VehicleType
	Provider interface{}
}

type GetAllVehiclesByTypeWithArchivedParams

type GetAllVehiclesByTypeWithArchivedParams struct {
	Type     VehicleType
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetAllVehiclesParams

type GetAllVehiclesParams struct {
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetAllVehiclesWithArchivedParams

type GetAllVehiclesWithArchivedParams struct {
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetAllVehiclesWithWateringPlanCountRow

type GetAllVehiclesWithWateringPlanCountRow struct {
	NumberPlate       string
	WateringPlanCount int64
}

type GetAllWateringPlansParams

type GetAllWateringPlansParams struct {
	Limit    int32
	Offset   int32
	Provider interface{}
}

type GetTreeByCoordinatesParams

type GetTreeByCoordinatesParams struct {
	Latitude  float64
	Longitude float64
}

type GetTreeClustersCountParams

type GetTreeClustersCountParams struct {
	WateringStatus []string
	Region         []string
	Provider       interface{}
}

type GetVehicleByWateringPlanIDParams

type GetVehicleByWateringPlanIDParams struct {
	WateringPlanID int32
	Type           VehicleType
}

type InsertSensorDataParams

type InsertSensorDataParams struct {
	SensorID string
	Data     []byte
}

type LinkTreesToTreeClusterParams

type LinkTreesToTreeClusterParams struct {
	Column1       []int32
	TreeClusterID *int32
}

type NullDrivingLicense

type NullDrivingLicense struct {
	DrivingLicense DrivingLicense
	Valid          bool // Valid is true if DrivingLicense is not NULL
}

func (*NullDrivingLicense) Scan

func (ns *NullDrivingLicense) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullDrivingLicense) Value

func (ns NullDrivingLicense) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullSensorStatus

type NullSensorStatus struct {
	SensorStatus SensorStatus
	Valid        bool // Valid is true if SensorStatus is not NULL
}

func (*NullSensorStatus) Scan

func (ns *NullSensorStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullSensorStatus) Value

func (ns NullSensorStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTreeSoilCondition

type NullTreeSoilCondition struct {
	TreeSoilCondition TreeSoilCondition
	Valid             bool // Valid is true if TreeSoilCondition is not NULL
}

func (*NullTreeSoilCondition) Scan

func (ns *NullTreeSoilCondition) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTreeSoilCondition) Value

func (ns NullTreeSoilCondition) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullVehicleStatus

type NullVehicleStatus struct {
	VehicleStatus VehicleStatus
	Valid         bool // Valid is true if VehicleStatus is not NULL
}

func (*NullVehicleStatus) Scan

func (ns *NullVehicleStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullVehicleStatus) Value

func (ns NullVehicleStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullVehicleType

type NullVehicleType struct {
	VehicleType VehicleType
	Valid       bool // Valid is true if VehicleType is not NULL
}

func (*NullVehicleType) Scan

func (ns *NullVehicleType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullVehicleType) Value

func (ns NullVehicleType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullWateringPlanStatus

type NullWateringPlanStatus struct {
	WateringPlanStatus WateringPlanStatus
	Valid              bool // Valid is true if WateringPlanStatus is not NULL
}

func (*NullWateringPlanStatus) Scan

func (ns *NullWateringPlanStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullWateringPlanStatus) Value

func (ns NullWateringPlanStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullWateringStatus

type NullWateringStatus struct {
	WateringStatus WateringStatus
	Valid          bool // Valid is true if WateringStatus is not NULL
}

func (*NullWateringStatus) Scan

func (ns *NullWateringStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullWateringStatus) Value

func (ns NullWateringStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	ArchiveTreeCluster(ctx context.Context, id int32) (int32, error)
	ArchiveVehicle(ctx context.Context, arg *ArchiveVehicleParams) (int32, error)
	CalculateGroupedCentroids(ctx context.Context, dollar_1 []int32) (string, error)
	CalculateTreesCentroid(ctx context.Context, treeClusterID *int32) (string, error)
	CreateRegion(ctx context.Context, arg *CreateRegionParams) (int32, error)
	CreateSensor(ctx context.Context, arg *CreateSensorParams) (string, error)
	CreateTree(ctx context.Context, arg *CreateTreeParams) (int32, error)
	CreateTreeCluster(ctx context.Context, arg *CreateTreeClusterParams) (int32, error)
	CreateVehicle(ctx context.Context, arg *CreateVehicleParams) (int32, error)
	CreateWateringPlan(ctx context.Context, arg *CreateWateringPlanParams) (int32, error)
	DeleteAllTreeClusterFromWateringPlan(ctx context.Context, wateringPlanID int32) error
	DeleteAllUsersFromWateringPlan(ctx context.Context, wateringPlanID int32) error
	DeleteAllVehiclesFromWateringPlan(ctx context.Context, wateringPlanID int32) error
	DeleteRegion(ctx context.Context, id int32) error
	DeleteSensor(ctx context.Context, id string) error
	DeleteTree(ctx context.Context, id int32) (int32, error)
	DeleteTreeCluster(ctx context.Context, id int32) (int32, error)
	DeleteVehicle(ctx context.Context, id int32) (int32, error)
	DeleteWateringPlan(ctx context.Context, id int32) (int32, error)
	FindNearestTree(ctx context.Context, arg *FindNearestTreeParams) (*Tree, error)
	GetAllArchivedVehicles(ctx context.Context) ([]*Vehicle, error)
	GetAllLatestSensorDataByTreeClusterID(ctx context.Context, id int32) ([]*SensorDatum, error)
	GetAllRegions(ctx context.Context, arg *GetAllRegionsParams) ([]*Region, error)
	GetAllRegionsCount(ctx context.Context) (int64, error)
	GetAllSensorDataByID(ctx context.Context, sensorID string) ([]*SensorDatum, error)
	GetAllSensors(ctx context.Context, arg *GetAllSensorsParams) ([]*Sensor, error)
	GetAllSensorsCount(ctx context.Context, provider interface{}) (int64, error)
	GetAllTreeClusterRegionsWithWateringPlanCount(ctx context.Context) ([]*GetAllTreeClusterRegionsWithWateringPlanCountRow, error)
	GetAllTreeClusterWateringPlanByID(ctx context.Context, wateringPlanID int32) ([]*TreeClusterWateringPlan, error)
	GetAllTreeClusters(ctx context.Context, arg *GetAllTreeClustersParams) ([]*TreeCluster, error)
	GetAllTrees(ctx context.Context, arg *GetAllTreesParams) ([]*Tree, error)
	GetAllTreesCount(ctx context.Context, arg *GetAllTreesCountParams) (int64, error)
	GetAllUserWateringPlanCount(ctx context.Context) (int64, error)
	GetAllVehicles(ctx context.Context, arg *GetAllVehiclesParams) ([]*Vehicle, error)
	GetAllVehiclesByType(ctx context.Context, arg *GetAllVehiclesByTypeParams) ([]*Vehicle, error)
	GetAllVehiclesByTypeCount(ctx context.Context, arg *GetAllVehiclesByTypeCountParams) (int64, error)
	GetAllVehiclesByTypeWithArchived(ctx context.Context, arg *GetAllVehiclesByTypeWithArchivedParams) ([]*Vehicle, error)
	GetAllVehiclesByTypeWithArchivedCount(ctx context.Context, arg *GetAllVehiclesByTypeWithArchivedCountParams) (int64, error)
	GetAllVehiclesCount(ctx context.Context, provider interface{}) (int64, error)
	GetAllVehiclesWithArchived(ctx context.Context, arg *GetAllVehiclesWithArchivedParams) ([]*Vehicle, error)
	GetAllVehiclesWithArchivedCount(ctx context.Context, provider interface{}) (int64, error)
	GetAllVehiclesWithWateringPlanCount(ctx context.Context) ([]*GetAllVehiclesWithWateringPlanCountRow, error)
	GetAllWateringPlans(ctx context.Context, arg *GetAllWateringPlansParams) ([]*WateringPlan, error)
	GetAllWateringPlansCount(ctx context.Context, provider interface{}) (int64, error)
	GetLatestSensorDataByID(ctx context.Context, sensorID string) (*SensorDatum, error)
	GetLinkedTreesByTreeClusterID(ctx context.Context, id int32) ([]*Tree, error)
	GetRegionById(ctx context.Context, id int32) (*Region, error)
	GetRegionByName(ctx context.Context, name string) (*Region, error)
	GetRegionByPoint(ctx context.Context, stGeomfromtext interface{}) (*Region, error)
	GetRegionByTreeClusterID(ctx context.Context, id int32) (*Region, error)
	GetSensorByID(ctx context.Context, id string) (*Sensor, error)
	GetSensorByStatus(ctx context.Context, status SensorStatus) ([]*Sensor, error)
	GetSensorByTreeID(ctx context.Context, id int32) (*Sensor, error)
	GetTotalConsumedWater(ctx context.Context) (int64, error)
	GetTreeByCoordinates(ctx context.Context, arg *GetTreeByCoordinatesParams) (*Tree, error)
	GetTreeByID(ctx context.Context, id int32) (*Tree, error)
	GetTreeBySensorID(ctx context.Context, sensorID *string) (*Tree, error)
	GetTreeClusterByID(ctx context.Context, id int32) (*TreeCluster, error)
	GetTreeClusterByTreeID(ctx context.Context, id int32) (*TreeCluster, error)
	GetTreeClustersByWateringPlanID(ctx context.Context, wateringPlanID int32) ([]*TreeCluster, error)
	GetTreeClustersCount(ctx context.Context, arg *GetTreeClustersCountParams) (int64, error)
	GetTreesByIDs(ctx context.Context, dollar_1 []int32) ([]*Tree, error)
	GetTreesBySensorIDs(ctx context.Context, dollar_1 []string) ([]*Tree, error)
	GetTreesByTreeClusterID(ctx context.Context, treeClusterID *int32) ([]*Tree, error)
	GetTreesClustersByIDs(ctx context.Context, dollar_1 []int32) ([]*TreeCluster, error)
	GetUsersByWateringPlanID(ctx context.Context, wateringPlanID int32) ([]uuid.UUID, error)
	GetVehicleByID(ctx context.Context, id int32) (*Vehicle, error)
	GetVehicleByPlate(ctx context.Context, numberPlate string) (*Vehicle, error)
	GetVehicleByWateringPlanID(ctx context.Context, arg *GetVehicleByWateringPlanIDParams) (*Vehicle, error)
	GetWateringPlanByID(ctx context.Context, id int32) (*WateringPlan, error)
	InsertSensorData(ctx context.Context, arg *InsertSensorDataParams) error
	LinkTreesToTreeCluster(ctx context.Context, arg *LinkTreesToTreeClusterParams) error
	RemoveTreeClusterLocation(ctx context.Context, id int32) error
	SetSensorLocation(ctx context.Context, arg *SetSensorLocationParams) error
	SetTreeClusterLocation(ctx context.Context, arg *SetTreeClusterLocationParams) error
	SetTreeClusterToWateringPlan(ctx context.Context, arg *SetTreeClusterToWateringPlanParams) error
	SetTreeLocation(ctx context.Context, arg *SetTreeLocationParams) error
	SetUserToWateringPlan(ctx context.Context, arg *SetUserToWateringPlanParams) error
	SetVehicleToWateringPlan(ctx context.Context, arg *SetVehicleToWateringPlanParams) error
	UnlinkSensorIDFromTrees(ctx context.Context, sensorID *string) error
	UnlinkTreeClusterID(ctx context.Context, treeClusterID *int32) ([]int32, error)
	UpdateRegion(ctx context.Context, arg *UpdateRegionParams) error
	UpdateSensor(ctx context.Context, arg *UpdateSensorParams) error
	UpdateTree(ctx context.Context, arg *UpdateTreeParams) error
	UpdateTreeCluster(ctx context.Context, arg *UpdateTreeClusterParams) error
	UpdateTreeClusterID(ctx context.Context, arg *UpdateTreeClusterIDParams) error
	UpdateTreeClusterWateringPlan(ctx context.Context, arg *UpdateTreeClusterWateringPlanParams) error
	UpdateTreeGeometry(ctx context.Context, arg *UpdateTreeGeometryParams) error
	UpdateVehicle(ctx context.Context, arg *UpdateVehicleParams) error
	UpdateWateringPlan(ctx context.Context, arg *UpdateWateringPlanParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ArchiveTreeCluster

func (q *Queries) ArchiveTreeCluster(ctx context.Context, id int32) (int32, error)

func (*Queries) ArchiveVehicle

func (q *Queries) ArchiveVehicle(ctx context.Context, arg *ArchiveVehicleParams) (int32, error)

func (*Queries) CalculateGroupedCentroids

func (q *Queries) CalculateGroupedCentroids(ctx context.Context, dollar_1 []int32) (string, error)

func (*Queries) CalculateTreesCentroid

func (q *Queries) CalculateTreesCentroid(ctx context.Context, treeClusterID *int32) (string, error)

func (*Queries) CreateRegion

func (q *Queries) CreateRegion(ctx context.Context, arg *CreateRegionParams) (int32, error)

func (*Queries) CreateSensor

func (q *Queries) CreateSensor(ctx context.Context, arg *CreateSensorParams) (string, error)

func (*Queries) CreateTree

func (q *Queries) CreateTree(ctx context.Context, arg *CreateTreeParams) (int32, error)

func (*Queries) CreateTreeCluster

func (q *Queries) CreateTreeCluster(ctx context.Context, arg *CreateTreeClusterParams) (int32, error)

func (*Queries) CreateVehicle

func (q *Queries) CreateVehicle(ctx context.Context, arg *CreateVehicleParams) (int32, error)

func (*Queries) CreateWateringPlan

func (q *Queries) CreateWateringPlan(ctx context.Context, arg *CreateWateringPlanParams) (int32, error)

func (*Queries) DeleteAllTreeClusterFromWateringPlan

func (q *Queries) DeleteAllTreeClusterFromWateringPlan(ctx context.Context, wateringPlanID int32) error

func (*Queries) DeleteAllUsersFromWateringPlan

func (q *Queries) DeleteAllUsersFromWateringPlan(ctx context.Context, wateringPlanID int32) error

func (*Queries) DeleteAllVehiclesFromWateringPlan

func (q *Queries) DeleteAllVehiclesFromWateringPlan(ctx context.Context, wateringPlanID int32) error

func (*Queries) DeleteRegion

func (q *Queries) DeleteRegion(ctx context.Context, id int32) error

func (*Queries) DeleteSensor

func (q *Queries) DeleteSensor(ctx context.Context, id string) error

func (*Queries) DeleteTree

func (q *Queries) DeleteTree(ctx context.Context, id int32) (int32, error)

func (*Queries) DeleteTreeCluster

func (q *Queries) DeleteTreeCluster(ctx context.Context, id int32) (int32, error)

func (*Queries) DeleteVehicle

func (q *Queries) DeleteVehicle(ctx context.Context, id int32) (int32, error)

func (*Queries) DeleteWateringPlan

func (q *Queries) DeleteWateringPlan(ctx context.Context, id int32) (int32, error)

func (*Queries) FindNearestTree

func (q *Queries) FindNearestTree(ctx context.Context, arg *FindNearestTreeParams) (*Tree, error)

func (*Queries) GetAllArchivedVehicles

func (q *Queries) GetAllArchivedVehicles(ctx context.Context) ([]*Vehicle, error)

func (*Queries) GetAllLatestSensorDataByTreeClusterID

func (q *Queries) GetAllLatestSensorDataByTreeClusterID(ctx context.Context, id int32) ([]*SensorDatum, error)

func (*Queries) GetAllRegions

func (q *Queries) GetAllRegions(ctx context.Context, arg *GetAllRegionsParams) ([]*Region, error)

func (*Queries) GetAllRegionsCount

func (q *Queries) GetAllRegionsCount(ctx context.Context) (int64, error)

func (*Queries) GetAllSensorDataByID

func (q *Queries) GetAllSensorDataByID(ctx context.Context, sensorID string) ([]*SensorDatum, error)

func (*Queries) GetAllSensors

func (q *Queries) GetAllSensors(ctx context.Context, arg *GetAllSensorsParams) ([]*Sensor, error)

func (*Queries) GetAllSensorsCount

func (q *Queries) GetAllSensorsCount(ctx context.Context, provider interface{}) (int64, error)

func (*Queries) GetAllTreeClusterRegionsWithWateringPlanCount

func (q *Queries) GetAllTreeClusterRegionsWithWateringPlanCount(ctx context.Context) ([]*GetAllTreeClusterRegionsWithWateringPlanCountRow, error)

func (*Queries) GetAllTreeClusterWateringPlanByID

func (q *Queries) GetAllTreeClusterWateringPlanByID(ctx context.Context, wateringPlanID int32) ([]*TreeClusterWateringPlan, error)

func (*Queries) GetAllTreeClusters

func (q *Queries) GetAllTreeClusters(ctx context.Context, arg *GetAllTreeClustersParams) ([]*TreeCluster, error)

func (*Queries) GetAllTrees

func (q *Queries) GetAllTrees(ctx context.Context, arg *GetAllTreesParams) ([]*Tree, error)

func (*Queries) GetAllTreesCount

func (q *Queries) GetAllTreesCount(ctx context.Context, arg *GetAllTreesCountParams) (int64, error)

func (*Queries) GetAllUserWateringPlanCount

func (q *Queries) GetAllUserWateringPlanCount(ctx context.Context) (int64, error)

func (*Queries) GetAllVehicles

func (q *Queries) GetAllVehicles(ctx context.Context, arg *GetAllVehiclesParams) ([]*Vehicle, error)

func (*Queries) GetAllVehiclesByType

func (q *Queries) GetAllVehiclesByType(ctx context.Context, arg *GetAllVehiclesByTypeParams) ([]*Vehicle, error)

func (*Queries) GetAllVehiclesByTypeCount

func (q *Queries) GetAllVehiclesByTypeCount(ctx context.Context, arg *GetAllVehiclesByTypeCountParams) (int64, error)

func (*Queries) GetAllVehiclesByTypeWithArchived

func (q *Queries) GetAllVehiclesByTypeWithArchived(ctx context.Context, arg *GetAllVehiclesByTypeWithArchivedParams) ([]*Vehicle, error)

func (*Queries) GetAllVehiclesByTypeWithArchivedCount

func (q *Queries) GetAllVehiclesByTypeWithArchivedCount(ctx context.Context, arg *GetAllVehiclesByTypeWithArchivedCountParams) (int64, error)

func (*Queries) GetAllVehiclesCount

func (q *Queries) GetAllVehiclesCount(ctx context.Context, provider interface{}) (int64, error)

func (*Queries) GetAllVehiclesWithArchived

func (q *Queries) GetAllVehiclesWithArchived(ctx context.Context, arg *GetAllVehiclesWithArchivedParams) ([]*Vehicle, error)

func (*Queries) GetAllVehiclesWithArchivedCount

func (q *Queries) GetAllVehiclesWithArchivedCount(ctx context.Context, provider interface{}) (int64, error)

func (*Queries) GetAllVehiclesWithWateringPlanCount

func (q *Queries) GetAllVehiclesWithWateringPlanCount(ctx context.Context) ([]*GetAllVehiclesWithWateringPlanCountRow, error)

func (*Queries) GetAllWateringPlans

func (q *Queries) GetAllWateringPlans(ctx context.Context, arg *GetAllWateringPlansParams) ([]*WateringPlan, error)

func (*Queries) GetAllWateringPlansCount

func (q *Queries) GetAllWateringPlansCount(ctx context.Context, provider interface{}) (int64, error)

func (*Queries) GetLatestSensorDataByID

func (q *Queries) GetLatestSensorDataByID(ctx context.Context, sensorID string) (*SensorDatum, error)

func (*Queries) GetLinkedTreesByTreeClusterID

func (q *Queries) GetLinkedTreesByTreeClusterID(ctx context.Context, id int32) ([]*Tree, error)

func (*Queries) GetRegionById

func (q *Queries) GetRegionById(ctx context.Context, id int32) (*Region, error)

func (*Queries) GetRegionByName

func (q *Queries) GetRegionByName(ctx context.Context, name string) (*Region, error)

func (*Queries) GetRegionByPoint

func (q *Queries) GetRegionByPoint(ctx context.Context, stGeomfromtext interface{}) (*Region, error)

func (*Queries) GetRegionByTreeClusterID

func (q *Queries) GetRegionByTreeClusterID(ctx context.Context, id int32) (*Region, error)

func (*Queries) GetSensorByID

func (q *Queries) GetSensorByID(ctx context.Context, id string) (*Sensor, error)

func (*Queries) GetSensorByStatus

func (q *Queries) GetSensorByStatus(ctx context.Context, status SensorStatus) ([]*Sensor, error)

func (*Queries) GetSensorByTreeID

func (q *Queries) GetSensorByTreeID(ctx context.Context, id int32) (*Sensor, error)

func (*Queries) GetTotalConsumedWater

func (q *Queries) GetTotalConsumedWater(ctx context.Context) (int64, error)

func (*Queries) GetTreeByCoordinates

func (q *Queries) GetTreeByCoordinates(ctx context.Context, arg *GetTreeByCoordinatesParams) (*Tree, error)

func (*Queries) GetTreeByID

func (q *Queries) GetTreeByID(ctx context.Context, id int32) (*Tree, error)

func (*Queries) GetTreeBySensorID

func (q *Queries) GetTreeBySensorID(ctx context.Context, sensorID *string) (*Tree, error)

func (*Queries) GetTreeClusterByID

func (q *Queries) GetTreeClusterByID(ctx context.Context, id int32) (*TreeCluster, error)

func (*Queries) GetTreeClusterByTreeID

func (q *Queries) GetTreeClusterByTreeID(ctx context.Context, id int32) (*TreeCluster, error)

func (*Queries) GetTreeClustersByWateringPlanID

func (q *Queries) GetTreeClustersByWateringPlanID(ctx context.Context, wateringPlanID int32) ([]*TreeCluster, error)

func (*Queries) GetTreeClustersCount

func (q *Queries) GetTreeClustersCount(ctx context.Context, arg *GetTreeClustersCountParams) (int64, error)

func (*Queries) GetTreesByIDs

func (q *Queries) GetTreesByIDs(ctx context.Context, dollar_1 []int32) ([]*Tree, error)

func (*Queries) GetTreesBySensorIDs

func (q *Queries) GetTreesBySensorIDs(ctx context.Context, dollar_1 []string) ([]*Tree, error)

func (*Queries) GetTreesByTreeClusterID

func (q *Queries) GetTreesByTreeClusterID(ctx context.Context, treeClusterID *int32) ([]*Tree, error)

func (*Queries) GetTreesClustersByIDs

func (q *Queries) GetTreesClustersByIDs(ctx context.Context, dollar_1 []int32) ([]*TreeCluster, error)

func (*Queries) GetUsersByWateringPlanID

func (q *Queries) GetUsersByWateringPlanID(ctx context.Context, wateringPlanID int32) ([]uuid.UUID, error)

func (*Queries) GetVehicleByID

func (q *Queries) GetVehicleByID(ctx context.Context, id int32) (*Vehicle, error)

func (*Queries) GetVehicleByPlate

func (q *Queries) GetVehicleByPlate(ctx context.Context, numberPlate string) (*Vehicle, error)

func (*Queries) GetVehicleByWateringPlanID

func (q *Queries) GetVehicleByWateringPlanID(ctx context.Context, arg *GetVehicleByWateringPlanIDParams) (*Vehicle, error)

func (*Queries) GetWateringPlanByID

func (q *Queries) GetWateringPlanByID(ctx context.Context, id int32) (*WateringPlan, error)

func (*Queries) InsertSensorData

func (q *Queries) InsertSensorData(ctx context.Context, arg *InsertSensorDataParams) error

func (*Queries) LinkTreesToTreeCluster

func (q *Queries) LinkTreesToTreeCluster(ctx context.Context, arg *LinkTreesToTreeClusterParams) error

func (*Queries) RemoveTreeClusterLocation

func (q *Queries) RemoveTreeClusterLocation(ctx context.Context, id int32) error

func (*Queries) SetSensorLocation

func (q *Queries) SetSensorLocation(ctx context.Context, arg *SetSensorLocationParams) error

func (*Queries) SetTreeClusterLocation

func (q *Queries) SetTreeClusterLocation(ctx context.Context, arg *SetTreeClusterLocationParams) error

func (*Queries) SetTreeClusterToWateringPlan

func (q *Queries) SetTreeClusterToWateringPlan(ctx context.Context, arg *SetTreeClusterToWateringPlanParams) error

func (*Queries) SetTreeLocation

func (q *Queries) SetTreeLocation(ctx context.Context, arg *SetTreeLocationParams) error

func (*Queries) SetUserToWateringPlan

func (q *Queries) SetUserToWateringPlan(ctx context.Context, arg *SetUserToWateringPlanParams) error

func (*Queries) SetVehicleToWateringPlan

func (q *Queries) SetVehicleToWateringPlan(ctx context.Context, arg *SetVehicleToWateringPlanParams) error

func (*Queries) UnlinkSensorIDFromTrees

func (q *Queries) UnlinkSensorIDFromTrees(ctx context.Context, sensorID *string) error

func (*Queries) UnlinkTreeClusterID

func (q *Queries) UnlinkTreeClusterID(ctx context.Context, treeClusterID *int32) ([]int32, error)

func (*Queries) UpdateRegion

func (q *Queries) UpdateRegion(ctx context.Context, arg *UpdateRegionParams) error

func (*Queries) UpdateSensor

func (q *Queries) UpdateSensor(ctx context.Context, arg *UpdateSensorParams) error

func (*Queries) UpdateTree

func (q *Queries) UpdateTree(ctx context.Context, arg *UpdateTreeParams) error

func (*Queries) UpdateTreeCluster

func (q *Queries) UpdateTreeCluster(ctx context.Context, arg *UpdateTreeClusterParams) error

func (*Queries) UpdateTreeClusterID

func (q *Queries) UpdateTreeClusterID(ctx context.Context, arg *UpdateTreeClusterIDParams) error

func (*Queries) UpdateTreeClusterWateringPlan

func (q *Queries) UpdateTreeClusterWateringPlan(ctx context.Context, arg *UpdateTreeClusterWateringPlanParams) error

func (*Queries) UpdateTreeGeometry

func (q *Queries) UpdateTreeGeometry(ctx context.Context, arg *UpdateTreeGeometryParams) error

func (*Queries) UpdateVehicle

func (q *Queries) UpdateVehicle(ctx context.Context, arg *UpdateVehicleParams) error

func (*Queries) UpdateWateringPlan

func (q *Queries) UpdateWateringPlan(ctx context.Context, arg *UpdateWateringPlanParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Region

type Region struct {
	ID        int32
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	Geometry  *geos.Geom
}

type Sensor

type Sensor struct {
	ID                     string
	CreatedAt              time.Time
	UpdatedAt              time.Time
	Status                 SensorStatus
	Latitude               float64
	Longitude              float64
	Geometry               *geos.Geom
	Provider               *string
	AdditionalInformations []byte
}

type SensorDatum

type SensorDatum struct {
	ID        int32
	CreatedAt time.Time
	UpdatedAt time.Time
	Data      []byte
	SensorID  string
}

type SensorStatus

type SensorStatus string
const (
	SensorStatusOnline  SensorStatus = "online"
	SensorStatusOffline SensorStatus = "offline"
	SensorStatusUnknown SensorStatus = "unknown"
)

func (*SensorStatus) Scan

func (e *SensorStatus) Scan(src interface{}) error

type SetSensorLocationParams

type SetSensorLocationParams struct {
	ID        string
	Latitude  float64
	Longitude float64
}

type SetTreeClusterLocationParams

type SetTreeClusterLocationParams struct {
	ID        int32
	Latitude  *float64
	Longitude *float64
}

type SetTreeClusterToWateringPlanParams

type SetTreeClusterToWateringPlanParams struct {
	TreeClusterID  int32
	WateringPlanID int32
}

type SetTreeLocationParams

type SetTreeLocationParams struct {
	ID        int32
	Latitude  float64
	Longitude float64
}

type SetUserToWateringPlanParams

type SetUserToWateringPlanParams struct {
	UserID         uuid.UUID
	WateringPlanID int32
}

type SetVehicleToWateringPlanParams

type SetVehicleToWateringPlanParams struct {
	VehicleID      int32
	WateringPlanID int32
}

type Tree

type Tree struct {
	ID                     int32
	CreatedAt              time.Time
	UpdatedAt              time.Time
	TreeClusterID          *int32
	SensorID               *string
	PlantingYear           int32
	Species                string
	Number                 string
	Latitude               float64
	Longitude              float64
	WateringStatus         WateringStatus
	Geometry               *geos.Geom
	Description            *string
	Provider               *string
	AdditionalInformations []byte
	LastWatered            *time.Time
}

type TreeCluster

type TreeCluster struct {
	ID                     int32
	CreatedAt              time.Time
	UpdatedAt              time.Time
	WateringStatus         WateringStatus
	LastWatered            *time.Time
	MoistureLevel          float64
	Address                string
	Description            string
	Archived               bool
	SoilCondition          TreeSoilCondition
	Latitude               *float64
	Longitude              *float64
	Geometry               *geos.Geom
	RegionID               *int32
	Name                   string
	Provider               *string
	AdditionalInformations []byte
}

type TreeClusterWateringPlan

type TreeClusterWateringPlan struct {
	TreeClusterID  int32
	WateringPlanID int32
	ConsumedWater  float64
}

type TreeSoilCondition

type TreeSoilCondition string
const (
	TreeSoilConditionSchluffig TreeSoilCondition = "schluffig"
	TreeSoilConditionSandig    TreeSoilCondition = "sandig"
	TreeSoilConditionLehmig    TreeSoilCondition = "lehmig"
	TreeSoilConditionTonig     TreeSoilCondition = "tonig"
	TreeSoilConditionUnknown   TreeSoilCondition = "unknown"
)

func (*TreeSoilCondition) Scan

func (e *TreeSoilCondition) Scan(src interface{}) error

type UpdateRegionParams

type UpdateRegionParams struct {
	ID             int32
	Name           string
	StGeomfromtext interface{}
}

type UpdateSensorParams

type UpdateSensorParams struct {
	ID                     string
	Status                 SensorStatus
	Provider               *string
	AdditionalInformations []byte
}

type UpdateTreeClusterIDParams

type UpdateTreeClusterIDParams struct {
	Column1       []int32
	TreeClusterID *int32
}

type UpdateTreeClusterParams

type UpdateTreeClusterParams struct {
	ID                     int32
	Name                   string
	RegionID               *int32
	Address                string
	Description            string
	MoistureLevel          float64
	WateringStatus         WateringStatus
	SoilCondition          TreeSoilCondition
	LastWatered            *time.Time
	Archived               bool
	Provider               *string
	AdditionalInformations []byte
}

type UpdateTreeClusterWateringPlanParams

type UpdateTreeClusterWateringPlanParams struct {
	WateringPlanID int32
	TreeClusterID  int32
	ConsumedWater  float64
}

type UpdateTreeGeometryParams

type UpdateTreeGeometryParams struct {
	ID             int32
	StGeomfromtext interface{}
}

type UpdateTreeParams

type UpdateTreeParams struct {
	ID                     int32
	TreeClusterID          *int32
	SensorID               *string
	PlantingYear           int32
	Species                string
	Number                 string
	WateringStatus         WateringStatus
	Description            *string
	Provider               *string
	AdditionalInformations []byte
	LastWatered            *time.Time
}

type UpdateVehicleParams

type UpdateVehicleParams struct {
	ID                     int32
	NumberPlate            string
	Description            string
	WaterCapacity          float64
	Type                   VehicleType
	Status                 VehicleStatus
	Model                  string
	DrivingLicense         DrivingLicense
	Height                 float64
	Length                 float64
	Width                  float64
	Weight                 float64
	Provider               *string
	AdditionalInformations []byte
}

type UpdateWateringPlanParams

type UpdateWateringPlanParams struct {
	ID                     int32
	Date                   time.Time
	Description            string
	Status                 WateringPlanStatus
	Distance               *float64
	TotalWaterRequired     *float64
	CancellationNote       string
	GpxUrl                 *string
	Duration               float64
	RefillCount            int32
	Provider               *string
	AdditionalInformations []byte
}

type UserWateringPlan

type UserWateringPlan struct {
	UserID         uuid.UUID
	WateringPlanID int32
}

type Vehicle

type Vehicle struct {
	ID                     int32
	CreatedAt              time.Time
	UpdatedAt              time.Time
	NumberPlate            string
	Description            string
	WaterCapacity          float64
	Type                   VehicleType
	Status                 VehicleStatus
	Model                  string
	DrivingLicense         DrivingLicense
	Height                 float64
	Length                 float64
	Width                  float64
	Weight                 float64
	Provider               *string
	AdditionalInformations []byte
	ArchivedAt             *time.Time
}

type VehicleStatus

type VehicleStatus string
const (
	VehicleStatusActive       VehicleStatus = "active"
	VehicleStatusAvailable    VehicleStatus = "available"
	VehicleStatusNotavailable VehicleStatus = "not available"
	VehicleStatusUnknown      VehicleStatus = "unknown"
)

func (*VehicleStatus) Scan

func (e *VehicleStatus) Scan(src interface{}) error

type VehicleType

type VehicleType string
const (
	VehicleTypeTransporter VehicleType = "transporter"
	VehicleTypeTrailer     VehicleType = "trailer"
	VehicleTypeUnknown     VehicleType = "unknown"
)

func (*VehicleType) Scan

func (e *VehicleType) Scan(src interface{}) error

type VehicleWateringPlan

type VehicleWateringPlan struct {
	VehicleID      int32
	WateringPlanID int32
}

type WateringPlan

type WateringPlan struct {
	ID                     int32
	CreatedAt              time.Time
	UpdatedAt              time.Time
	Date                   time.Time
	Description            string
	Status                 WateringPlanStatus
	Distance               *float64
	TotalWaterRequired     *float64
	CancellationNote       string
	GpxUrl                 *string
	RefillCount            int32
	Duration               float64
	Provider               *string
	AdditionalInformations []byte
}

type WateringPlanStatus

type WateringPlanStatus string
const (
	WateringPlanStatusPlanned     WateringPlanStatus = "planned"
	WateringPlanStatusActive      WateringPlanStatus = "active"
	WateringPlanStatusCanceled    WateringPlanStatus = "canceled"
	WateringPlanStatusFinished    WateringPlanStatus = "finished"
	WateringPlanStatusNotcompeted WateringPlanStatus = "not competed"
	WateringPlanStatusUnknown     WateringPlanStatus = "unknown"
)

func (*WateringPlanStatus) Scan

func (e *WateringPlanStatus) Scan(src interface{}) error

type WateringStatus

type WateringStatus string
const (
	WateringStatusGood        WateringStatus = "good"
	WateringStatusModerate    WateringStatus = "moderate"
	WateringStatusBad         WateringStatus = "bad"
	WateringStatusUnknown     WateringStatus = "unknown"
	WateringStatusJustwatered WateringStatus = "just watered"
)

func (*WateringStatus) Scan

func (e *WateringStatus) Scan(src interface{}) error

Jump to

Keyboard shortcuts

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