Documentation
¶
Index ¶
- Variables
- func InitializeDatabase(ctx context.Context, uri string) error
- func LogErrorTypeInfo(err error)
- func SaveOrUpdateAerialSprayLine(ctx context.Context, org *models.Organization, fs []*fslayer.AerialSprayLine) (inserts uint, updates uint, err error)
- func SaveOrUpdateAerialSpraySession(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateBarrierSpray(ctx context.Context, org *models.Organization, fs []*fslayer.BarrierSpray) (inserts uint, updates uint, err error)
- func SaveOrUpdateBarrierSprayRoute(ctx context.Context, org *models.Organization, fs []*fslayer.BarrierSprayRoute) (inserts uint, updates uint, err error)
- func SaveOrUpdateContainerRelate(ctx context.Context, org *models.Organization, fs []*fslayer.ContainerRelate) (inserts uint, updates uint, err error)
- func SaveOrUpdateFieldScoutingLog(ctx context.Context, org *models.Organization, fs []*fslayer.FieldScoutingLog) (inserts uint, updates uint, err error)
- func SaveOrUpdateHabitatRelate(ctx context.Context, org *models.Organization, fs []*fslayer.HabitatRelate) (inserts uint, updates uint, err error)
- func SaveOrUpdateInspectionSample(ctx context.Context, org *models.Organization, fs []*fslayer.InspectionSample) (inserts uint, updates uint, err error)
- func SaveOrUpdateInspectionSampleDetail(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateLandingCount(ctx context.Context, org *models.Organization, fs []*fslayer.LandingCount) (inserts uint, updates uint, err error)
- func SaveOrUpdateLandingCountLocation(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateLineLocation(ctx context.Context, org *models.Organization, fs []*fslayer.LineLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdateLocationTracking(ctx context.Context, org *models.Organization, fs []*fslayer.LocationTracking) (inserts uint, updates uint, err error)
- func SaveOrUpdateMosquitoInspection(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateOfflineMapAreas(ctx context.Context, org *models.Organization, fs []*fslayer.OfflineMapAreas) (inserts uint, updates uint, err error)
- func SaveOrUpdatePointLocation(ctx context.Context, org *models.Organization, fs []*fslayer.PointLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdatePolygonLocation(ctx context.Context, org *models.Organization, fs []*fslayer.PolygonLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdatePool(ctx context.Context, org *models.Organization, fs []*fslayer.Pool) (inserts uint, updates uint, err error)
- func SaveOrUpdatePoolBuffer(ctx context.Context, org *models.Organization, fs []*fslayer.PoolBuffer) (inserts uint, updates uint, err error)
- func SaveOrUpdatePoolDetail(ctx context.Context, org *models.Organization, fs []*fslayer.PoolDetail) (inserts uint, updates uint, err error)
- func SaveOrUpdateProposedTreatmentArea(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateQALarvCount(ctx context.Context, org *models.Organization, fs []*fslayer.QALarvCount) (inserts uint, updates uint, err error)
- func SaveOrUpdateQAMosquitoInspection(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateQAProductObservation(ctx context.Context, org *models.Organization, ...) (inserts uint, updates uint, err error)
- func SaveOrUpdateRestrictedArea(ctx context.Context, org *models.Organization, fs []*fslayer.RestrictedArea) (inserts uint, updates uint, err error)
- func SaveOrUpdateRodentInspection(ctx context.Context, org *models.Organization, fs []*fslayer.RodentInspection) (inserts uint, updates uint, err error)
- func SaveOrUpdateRodentLocation(ctx context.Context, org *models.Organization, fs []*fslayer.RodentLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdateSampleCollection(ctx context.Context, org *models.Organization, fs []*fslayer.SampleCollection) (inserts uint, updates uint, err error)
- func SaveOrUpdateSampleLocation(ctx context.Context, org *models.Organization, fs []*fslayer.SampleLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdateServiceRequest(ctx context.Context, org *models.Organization, fs []*fslayer.ServiceRequest) (inserts uint, updates uint, err error)
- func SaveOrUpdateSpeciesAbundance(ctx context.Context, org *models.Organization, fs []*fslayer.SpeciesAbundance) (inserts uint, updates uint, err error)
- func SaveOrUpdateStormDrain(ctx context.Context, org *models.Organization, fs []*fslayer.StormDrain) (inserts uint, updates uint, err error)
- func SaveOrUpdateTimeCard(ctx context.Context, org *models.Organization, fs []*fslayer.TimeCard) (inserts uint, updates uint, err error)
- func SaveOrUpdateTracklog(ctx context.Context, org *models.Organization, fs []*fslayer.Tracklog) (inserts uint, updates uint, err error)
- func SaveOrUpdateTrapData(ctx context.Context, org *models.Organization, fs []*fslayer.TrapData) (inserts uint, updates uint, err error)
- func SaveOrUpdateTrapLocation(ctx context.Context, org *models.Organization, fs []*fslayer.TrapLocation) (inserts uint, updates uint, err error)
- func SaveOrUpdateTreatment(ctx context.Context, org *models.Organization, fs []*fslayer.Treatment) (inserts uint, updates uint, err error)
- func SaveOrUpdateTreatmentArea(ctx context.Context, org *models.Organization, fs []*fslayer.TreatmentArea) (inserts uint, updates uint, err error)
- func SaveOrUpdateULVSprayRoute(ctx context.Context, org *models.Organization, fs []*fslayer.ULVSprayRoute) (inserts uint, updates uint, err error)
- func SaveOrUpdateZones(ctx context.Context, org *models.Organization, fs []*fslayer.Zones) (inserts uint, updates uint, err error)
- func SaveOrUpdateZones2(ctx context.Context, org *models.Organization, fs []*fslayer.Zones2) (inserts uint, updates uint, err error)
- func TestPreparedQuery(ctx context.Context, row *fslayer.RodentLocation) error
- func TestPreparedQueryOld(ctx context.Context) error
- type BoolParam
- type EnumParam
- type Float64Param
- type FloatParam
- type GISLineParam
- type GISPointParam
- type GISPolygonParam
- type GeometryLine
- type GeometryPoint
- type GeometryPolygon
- type InsertResultRow
- type Int16Param
- type Int32Param
- type Int64Param
- type JsonBParam
- type NullParam
- type SqlParam
- type StringParam
- type Stringable
- type TimestampParam
- type TimestamptzParam
- type UUIDParam
- type Uint32Param
- type Uint64Param
- type UintParam
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PGInstance *postgres
)
Functions ¶
func LogErrorTypeInfo ¶
func LogErrorTypeInfo(err error)
func SaveOrUpdateAerialSprayLine ¶
func SaveOrUpdateAerialSprayLine(ctx context.Context, org *models.Organization, fs []*fslayer.AerialSprayLine) (inserts uint, updates uint, err error)
func SaveOrUpdateAerialSpraySession ¶
func SaveOrUpdateAerialSpraySession(ctx context.Context, org *models.Organization, fs []*fslayer.AerialSpraySession) (inserts uint, updates uint, err error)
func SaveOrUpdateBarrierSpray ¶
func SaveOrUpdateBarrierSpray(ctx context.Context, org *models.Organization, fs []*fslayer.BarrierSpray) (inserts uint, updates uint, err error)
func SaveOrUpdateBarrierSprayRoute ¶
func SaveOrUpdateBarrierSprayRoute(ctx context.Context, org *models.Organization, fs []*fslayer.BarrierSprayRoute) (inserts uint, updates uint, err error)
func SaveOrUpdateContainerRelate ¶
func SaveOrUpdateContainerRelate(ctx context.Context, org *models.Organization, fs []*fslayer.ContainerRelate) (inserts uint, updates uint, err error)
func SaveOrUpdateFieldScoutingLog ¶
func SaveOrUpdateFieldScoutingLog(ctx context.Context, org *models.Organization, fs []*fslayer.FieldScoutingLog) (inserts uint, updates uint, err error)
func SaveOrUpdateHabitatRelate ¶
func SaveOrUpdateHabitatRelate(ctx context.Context, org *models.Organization, fs []*fslayer.HabitatRelate) (inserts uint, updates uint, err error)
func SaveOrUpdateInspectionSample ¶
func SaveOrUpdateInspectionSample(ctx context.Context, org *models.Organization, fs []*fslayer.InspectionSample) (inserts uint, updates uint, err error)
func SaveOrUpdateInspectionSampleDetail ¶
func SaveOrUpdateInspectionSampleDetail(ctx context.Context, org *models.Organization, fs []*fslayer.InspectionSampleDetail) (inserts uint, updates uint, err error)
func SaveOrUpdateLandingCount ¶
func SaveOrUpdateLandingCount(ctx context.Context, org *models.Organization, fs []*fslayer.LandingCount) (inserts uint, updates uint, err error)
func SaveOrUpdateLandingCountLocation ¶
func SaveOrUpdateLandingCountLocation(ctx context.Context, org *models.Organization, fs []*fslayer.LandingCountLocation) (inserts uint, updates uint, err error)
func SaveOrUpdateLineLocation ¶
func SaveOrUpdateLineLocation(ctx context.Context, org *models.Organization, fs []*fslayer.LineLocation) (inserts uint, updates uint, err error)
func SaveOrUpdateLocationTracking ¶
func SaveOrUpdateLocationTracking(ctx context.Context, org *models.Organization, fs []*fslayer.LocationTracking) (inserts uint, updates uint, err error)
func SaveOrUpdateMosquitoInspection ¶
func SaveOrUpdateMosquitoInspection(ctx context.Context, org *models.Organization, fs []*fslayer.MosquitoInspection) (inserts uint, updates uint, err error)
func SaveOrUpdateOfflineMapAreas ¶
func SaveOrUpdateOfflineMapAreas(ctx context.Context, org *models.Organization, fs []*fslayer.OfflineMapAreas) (inserts uint, updates uint, err error)
func SaveOrUpdatePointLocation ¶
func SaveOrUpdatePointLocation(ctx context.Context, org *models.Organization, fs []*fslayer.PointLocation) (inserts uint, updates uint, err error)
func SaveOrUpdatePolygonLocation ¶
func SaveOrUpdatePolygonLocation(ctx context.Context, org *models.Organization, fs []*fslayer.PolygonLocation) (inserts uint, updates uint, err error)
func SaveOrUpdatePool ¶
func SaveOrUpdatePoolBuffer ¶
func SaveOrUpdatePoolBuffer(ctx context.Context, org *models.Organization, fs []*fslayer.PoolBuffer) (inserts uint, updates uint, err error)
func SaveOrUpdatePoolDetail ¶
func SaveOrUpdatePoolDetail(ctx context.Context, org *models.Organization, fs []*fslayer.PoolDetail) (inserts uint, updates uint, err error)
func SaveOrUpdateProposedTreatmentArea ¶
func SaveOrUpdateProposedTreatmentArea(ctx context.Context, org *models.Organization, fs []*fslayer.ProposedTreatmentArea) (inserts uint, updates uint, err error)
func SaveOrUpdateQALarvCount ¶
func SaveOrUpdateQALarvCount(ctx context.Context, org *models.Organization, fs []*fslayer.QALarvCount) (inserts uint, updates uint, err error)
func SaveOrUpdateQAMosquitoInspection ¶
func SaveOrUpdateQAMosquitoInspection(ctx context.Context, org *models.Organization, fs []*fslayer.QAMosquitoInspection) (inserts uint, updates uint, err error)
func SaveOrUpdateQAProductObservation ¶
func SaveOrUpdateQAProductObservation(ctx context.Context, org *models.Organization, fs []*fslayer.QAProductObservation) (inserts uint, updates uint, err error)
func SaveOrUpdateRestrictedArea ¶
func SaveOrUpdateRestrictedArea(ctx context.Context, org *models.Organization, fs []*fslayer.RestrictedArea) (inserts uint, updates uint, err error)
func SaveOrUpdateRodentInspection ¶
func SaveOrUpdateRodentInspection(ctx context.Context, org *models.Organization, fs []*fslayer.RodentInspection) (inserts uint, updates uint, err error)
func SaveOrUpdateRodentLocation ¶
func SaveOrUpdateRodentLocation(ctx context.Context, org *models.Organization, fs []*fslayer.RodentLocation) (inserts uint, updates uint, err error)
func SaveOrUpdateSampleCollection ¶
func SaveOrUpdateSampleCollection(ctx context.Context, org *models.Organization, fs []*fslayer.SampleCollection) (inserts uint, updates uint, err error)
func SaveOrUpdateSampleLocation ¶
func SaveOrUpdateSampleLocation(ctx context.Context, org *models.Organization, fs []*fslayer.SampleLocation) (inserts uint, updates uint, err error)
func SaveOrUpdateServiceRequest ¶
func SaveOrUpdateServiceRequest(ctx context.Context, org *models.Organization, fs []*fslayer.ServiceRequest) (inserts uint, updates uint, err error)
func SaveOrUpdateSpeciesAbundance ¶
func SaveOrUpdateSpeciesAbundance(ctx context.Context, org *models.Organization, fs []*fslayer.SpeciesAbundance) (inserts uint, updates uint, err error)
func SaveOrUpdateStormDrain ¶
func SaveOrUpdateStormDrain(ctx context.Context, org *models.Organization, fs []*fslayer.StormDrain) (inserts uint, updates uint, err error)
func SaveOrUpdateTimeCard ¶
func SaveOrUpdateTracklog ¶
func SaveOrUpdateTrapData ¶
func SaveOrUpdateTrapLocation ¶
func SaveOrUpdateTrapLocation(ctx context.Context, org *models.Organization, fs []*fslayer.TrapLocation) (inserts uint, updates uint, err error)
func SaveOrUpdateTreatment ¶
func SaveOrUpdateTreatmentArea ¶
func SaveOrUpdateTreatmentArea(ctx context.Context, org *models.Organization, fs []*fslayer.TreatmentArea) (inserts uint, updates uint, err error)
func SaveOrUpdateULVSprayRoute ¶
func SaveOrUpdateULVSprayRoute(ctx context.Context, org *models.Organization, fs []*fslayer.ULVSprayRoute) (inserts uint, updates uint, err error)
func SaveOrUpdateZones ¶
func SaveOrUpdateZones2 ¶
func TestPreparedQuery ¶
func TestPreparedQuery(ctx context.Context, row *fslayer.RodentLocation) error
func TestPreparedQueryOld ¶
Types ¶
type EnumParam ¶
type EnumParam string
EnumParam wraps a PostgreSQL enum parameter
func Enum ¶
func Enum(n string, e Stringable) EnumParam
type Float64Param ¶
func Float64 ¶
func Float64(n string, f float64) Float64Param
func (Float64Param) ToSql ¶
func (p Float64Param) ToSql() string
type FloatParam ¶
type FloatParam float64
FloatParam wraps a float parameter
func Float ¶
func Float(f float64) FloatParam
func (FloatParam) ToSql ¶
func (p FloatParam) ToSql() string
type GISLineParam ¶
type GISLineParam struct {
Name string
Value GeometryLine
WKID int
}
func GISLine ¶
func GISLine(n string, v GeometryLine, wkid int) GISLineParam
func (GISLineParam) ToSql ¶
func (p GISLineParam) ToSql() string
type GISPointParam ¶
type GISPointParam struct {
Name string
Value GeometryPoint
WKID int
}
func GISPoint ¶
func GISPoint(n string, v GeometryPoint, wkid int) GISPointParam
func (GISPointParam) ToSql ¶
func (p GISPointParam) ToSql() string
type GISPolygonParam ¶
type GISPolygonParam struct {
Name string
Value GeometryPolygon
WKID int
}
func GISPolygon ¶
func GISPolygon(n string, v GeometryPolygon, wkid int) GISPolygonParam
func (GISPolygonParam) ToSql ¶
func (p GISPolygonParam) ToSql() string
type GeometryLine ¶
type GeometryLine struct {
Paths [][][]float64 `json:"paths"`
}
type GeometryPoint ¶
type GeometryPolygon ¶
type GeometryPolygon struct {
Rings [][][]float64 `json:"rings"`
}
type InsertResultRow ¶
type Int16Param ¶
IntParam wraps an int parameter
func Int16 ¶
func Int16(n string, i int16) Int16Param
func (Int16Param) ToSql ¶
func (p Int16Param) ToSql() string
type Int32Param ¶
func Int32 ¶
func Int32(n string, i int32) Int32Param
func (Int32Param) ToSql ¶
func (p Int32Param) ToSql() string
type Int64Param ¶
func Int64 ¶
func Int64(n string, i int64) Int64Param
func (Int64Param) ToSql ¶
func (p Int64Param) ToSql() string
type JsonBParam ¶
type JsonBParam struct {
Name string
Value json.RawMessage
}
func JsonB ¶
func JsonB(n string, v json.RawMessage) JsonBParam
func (JsonBParam) ToSql ¶
func (p JsonBParam) ToSql() string
type SqlParam ¶
type SqlParam interface {
ToSql() string
}
SqlParam is a generic struct that wraps a parameter with its SQL representation
type StringParam ¶
StringParam wraps a string parameter
func (StringParam) ToSql ¶
func (p StringParam) ToSql() string
type Stringable ¶
type Stringable interface {
String() string
}
type TimestampParam ¶
TimestampParam wraps a time.Time parameter for PostgreSQL TIMESTAMP WITHOUT TIME ZONE
func Timestamp ¶
func Timestamp(name string, t time.Time) TimestampParam
Timestamp creates a PostgreSQL TIMESTAMP WITHOUT TIME ZONE parameter
func (TimestampParam) ToSql ¶
func (p TimestampParam) ToSql() string
type TimestamptzParam ¶
TimestamptzParam wraps a time.Time parameter for PostgreSQL TIMESTAMP WITH TIME ZONE
func Timestamptz ¶
func Timestamptz(t time.Time) TimestamptzParam
Timestamptz creates a PostgreSQL TIMESTAMP WITH TIME ZONE parameter
func (TimestamptzParam) ToSql ¶
func (p TimestamptzParam) ToSql() string
type Uint32Param ¶
func Uint32 ¶
func Uint32(name string, u uint) Uint32Param
func (Uint32Param) ToSql ¶
func (p Uint32Param) ToSql() string
type Uint64Param ¶
func Uint64 ¶
func Uint64(name string, u uint64) Uint64Param
func (Uint64Param) ToSql ¶
func (p Uint64Param) ToSql() string
Click to show internal directories.
Click to hide internal directories.