2878 lines
95 KiB
Go
2878 lines
95 KiB
Go
// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package models
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
"time"
|
|
|
|
"github.com/Gleipnir-Technology/bob"
|
|
"github.com/Gleipnir-Technology/bob/dialect/psql"
|
|
"github.com/Gleipnir-Technology/bob/dialect/psql/dialect"
|
|
"github.com/Gleipnir-Technology/bob/dialect/psql/dm"
|
|
"github.com/Gleipnir-Technology/bob/dialect/psql/sm"
|
|
"github.com/Gleipnir-Technology/bob/dialect/psql/um"
|
|
"github.com/Gleipnir-Technology/bob/expr"
|
|
"github.com/Gleipnir-Technology/bob/orm"
|
|
"github.com/Gleipnir-Technology/bob/types"
|
|
"github.com/Gleipnir-Technology/bob/types/pgtypes"
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// FieldseekerServicerequest is an object representing the database table.
|
|
type FieldseekerServicerequest struct {
|
|
Objectid int64 `db:"objectid" `
|
|
// Original attribute from ArcGIS API is RECDATETIME
|
|
Recdatetime null.Val[time.Time] `db:"recdatetime" `
|
|
// Original attribute from ArcGIS API is SOURCE
|
|
Source null.Val[string] `db:"source" `
|
|
// Original attribute from ArcGIS API is ENTRYTECH
|
|
Entrytech null.Val[string] `db:"entrytech" `
|
|
// Original attribute from ArcGIS API is PRIORITY
|
|
Priority null.Val[string] `db:"priority" `
|
|
// Original attribute from ArcGIS API is SUPERVISOR
|
|
Supervisor null.Val[string] `db:"supervisor" `
|
|
// Original attribute from ArcGIS API is ASSIGNEDTECH
|
|
Assignedtech null.Val[string] `db:"assignedtech" `
|
|
// Original attribute from ArcGIS API is STATUS
|
|
Status null.Val[string] `db:"status" `
|
|
// Original attribute from ArcGIS API is CLRANON
|
|
Clranon null.Val[int16] `db:"clranon" `
|
|
// Original attribute from ArcGIS API is CLRFNAME
|
|
Clrfname null.Val[string] `db:"clrfname" `
|
|
// Original attribute from ArcGIS API is CLRPHONE1
|
|
Clrphone1 null.Val[string] `db:"clrphone1" `
|
|
// Original attribute from ArcGIS API is CLRPHONE2
|
|
Clrphone2 null.Val[string] `db:"clrphone2" `
|
|
// Original attribute from ArcGIS API is CLREMAIL
|
|
Clremail null.Val[string] `db:"clremail" `
|
|
// Original attribute from ArcGIS API is CLRCOMPANY
|
|
Clrcompany null.Val[string] `db:"clrcompany" `
|
|
// Original attribute from ArcGIS API is CLRADDR1
|
|
Clraddr1 null.Val[string] `db:"clraddr1" `
|
|
// Original attribute from ArcGIS API is CLRADDR2
|
|
Clraddr2 null.Val[string] `db:"clraddr2" `
|
|
// Original attribute from ArcGIS API is CLRCITY
|
|
Clrcity null.Val[string] `db:"clrcity" `
|
|
// Original attribute from ArcGIS API is CLRSTATE
|
|
Clrstate null.Val[string] `db:"clrstate" `
|
|
// Original attribute from ArcGIS API is CLRZIP
|
|
Clrzip null.Val[string] `db:"clrzip" `
|
|
// Original attribute from ArcGIS API is CLROTHER
|
|
Clrother null.Val[string] `db:"clrother" `
|
|
// Original attribute from ArcGIS API is CLRCONTPREF
|
|
Clrcontpref null.Val[string] `db:"clrcontpref" `
|
|
// Original attribute from ArcGIS API is REQCOMPANY
|
|
Reqcompany null.Val[string] `db:"reqcompany" `
|
|
// Original attribute from ArcGIS API is REQADDR1
|
|
Reqaddr1 null.Val[string] `db:"reqaddr1" `
|
|
// Original attribute from ArcGIS API is REQADDR2
|
|
Reqaddr2 null.Val[string] `db:"reqaddr2" `
|
|
// Original attribute from ArcGIS API is REQCITY
|
|
Reqcity null.Val[string] `db:"reqcity" `
|
|
// Original attribute from ArcGIS API is REQSTATE
|
|
Reqstate null.Val[string] `db:"reqstate" `
|
|
// Original attribute from ArcGIS API is REQZIP
|
|
Reqzip null.Val[string] `db:"reqzip" `
|
|
// Original attribute from ArcGIS API is REQCROSSST
|
|
Reqcrossst null.Val[string] `db:"reqcrossst" `
|
|
// Original attribute from ArcGIS API is REQSUBDIV
|
|
Reqsubdiv null.Val[string] `db:"reqsubdiv" `
|
|
// Original attribute from ArcGIS API is REQMAPGRID
|
|
Reqmapgrid null.Val[string] `db:"reqmapgrid" `
|
|
// Original attribute from ArcGIS API is REQPERMISSION
|
|
Reqpermission null.Val[int16] `db:"reqpermission" `
|
|
// Original attribute from ArcGIS API is REQTARGET
|
|
Reqtarget null.Val[string] `db:"reqtarget" `
|
|
// Original attribute from ArcGIS API is REQDESCR
|
|
Reqdescr null.Val[string] `db:"reqdescr" `
|
|
// Original attribute from ArcGIS API is REQNOTESFORTECH
|
|
Reqnotesfortech null.Val[string] `db:"reqnotesfortech" `
|
|
// Original attribute from ArcGIS API is REQNOTESFORCUST
|
|
Reqnotesforcust null.Val[string] `db:"reqnotesforcust" `
|
|
// Original attribute from ArcGIS API is REQFLDNOTES
|
|
Reqfldnotes null.Val[string] `db:"reqfldnotes" `
|
|
// Original attribute from ArcGIS API is REQPROGRAMACTIONS
|
|
Reqprogramactions null.Val[string] `db:"reqprogramactions" `
|
|
// Original attribute from ArcGIS API is DATETIMECLOSED
|
|
Datetimeclosed null.Val[time.Time] `db:"datetimeclosed" `
|
|
// Original attribute from ArcGIS API is TECHCLOSED
|
|
Techclosed null.Val[string] `db:"techclosed" `
|
|
// Original attribute from ArcGIS API is SR_NUMBER
|
|
SRNumber null.Val[int32] `db:"sr_number" `
|
|
// Original attribute from ArcGIS API is REVIEWED
|
|
Reviewed null.Val[int16] `db:"reviewed" `
|
|
// Original attribute from ArcGIS API is REVIEWEDBY
|
|
Reviewedby null.Val[string] `db:"reviewedby" `
|
|
// Original attribute from ArcGIS API is REVIEWEDDATE
|
|
Revieweddate null.Val[time.Time] `db:"revieweddate" `
|
|
// Original attribute from ArcGIS API is ACCEPTED
|
|
Accepted null.Val[int16] `db:"accepted" `
|
|
// Original attribute from ArcGIS API is ACCEPTEDDATE
|
|
Accepteddate null.Val[time.Time] `db:"accepteddate" `
|
|
// Original attribute from ArcGIS API is REJECTEDBY
|
|
Rejectedby null.Val[string] `db:"rejectedby" `
|
|
// Original attribute from ArcGIS API is REJECTEDDATE
|
|
Rejecteddate null.Val[time.Time] `db:"rejecteddate" `
|
|
// Original attribute from ArcGIS API is REJECTEDREASON
|
|
Rejectedreason null.Val[string] `db:"rejectedreason" `
|
|
// Original attribute from ArcGIS API is DUEDATE
|
|
Duedate null.Val[time.Time] `db:"duedate" `
|
|
// Original attribute from ArcGIS API is ACCEPTEDBY
|
|
Acceptedby null.Val[string] `db:"acceptedby" `
|
|
// Original attribute from ArcGIS API is COMMENTS
|
|
Comments null.Val[string] `db:"comments" `
|
|
// Original attribute from ArcGIS API is ESTCOMPLETEDATE
|
|
Estcompletedate null.Val[time.Time] `db:"estcompletedate" `
|
|
// Original attribute from ArcGIS API is NEXTACTION
|
|
Nextaction null.Val[string] `db:"nextaction" `
|
|
// Original attribute from ArcGIS API is RECORDSTATUS
|
|
Recordstatus null.Val[int16] `db:"recordstatus" `
|
|
// Original attribute from ArcGIS API is GlobalID
|
|
Globalid uuid.UUID `db:"globalid,pk" `
|
|
// Original attribute from ArcGIS API is created_user
|
|
CreatedUser null.Val[string] `db:"created_user" `
|
|
// Original attribute from ArcGIS API is created_date
|
|
CreatedDate null.Val[time.Time] `db:"created_date" `
|
|
// Original attribute from ArcGIS API is last_edited_user
|
|
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
|
// Original attribute from ArcGIS API is last_edited_date
|
|
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
|
// Original attribute from ArcGIS API is FIRSTRESPONSEDATE
|
|
Firstresponsedate null.Val[time.Time] `db:"firstresponsedate" `
|
|
// Original attribute from ArcGIS API is RESPONSEDAYCOUNT
|
|
Responsedaycount null.Val[int16] `db:"responsedaycount" `
|
|
// Original attribute from ArcGIS API is ALLOWED
|
|
Allowed null.Val[string] `db:"allowed" `
|
|
// Original attribute from ArcGIS API is XVALUE
|
|
Xvalue null.Val[string] `db:"xvalue" `
|
|
// Original attribute from ArcGIS API is YVALUE
|
|
Yvalue null.Val[string] `db:"yvalue" `
|
|
// Original attribute from ArcGIS API is VALIDX
|
|
Validx null.Val[string] `db:"validx" `
|
|
// Original attribute from ArcGIS API is VALIDY
|
|
Validy null.Val[string] `db:"validy" `
|
|
// Original attribute from ArcGIS API is EXTERNALID
|
|
Externalid null.Val[string] `db:"externalid" `
|
|
// Original attribute from ArcGIS API is EXTERNALERROR
|
|
Externalerror null.Val[string] `db:"externalerror" `
|
|
// Original attribute from ArcGIS API is POINTLOCID
|
|
Pointlocid null.Val[uuid.UUID] `db:"pointlocid" `
|
|
// Original attribute from ArcGIS API is NOTIFIED
|
|
Notified null.Val[int16] `db:"notified" `
|
|
// Original attribute from ArcGIS API is NOTIFIEDDATE
|
|
Notifieddate null.Val[time.Time] `db:"notifieddate" `
|
|
// Original attribute from ArcGIS API is SCHEDULED
|
|
Scheduled null.Val[int16] `db:"scheduled" `
|
|
// Original attribute from ArcGIS API is SCHEDULEDDATE
|
|
Scheduleddate null.Val[time.Time] `db:"scheduleddate" `
|
|
// Original attribute from ArcGIS API is DOG
|
|
Dog null.Val[int32] `db:"dog" `
|
|
// Original attribute from ArcGIS API is schedule_period
|
|
SchedulePeriod null.Val[string] `db:"schedule_period" `
|
|
// Original attribute from ArcGIS API is schedule_notes
|
|
ScheduleNotes null.Val[string] `db:"schedule_notes" `
|
|
// Original attribute from ArcGIS API is Spanish
|
|
Spanish null.Val[int32] `db:"spanish" `
|
|
// Original attribute from ArcGIS API is CreationDate
|
|
Creationdate null.Val[time.Time] `db:"creationdate" `
|
|
// Original attribute from ArcGIS API is Creator
|
|
Creator null.Val[string] `db:"creator" `
|
|
// Original attribute from ArcGIS API is EditDate
|
|
Editdate null.Val[time.Time] `db:"editdate" `
|
|
// Original attribute from ArcGIS API is Editor
|
|
Editor null.Val[string] `db:"editor" `
|
|
// Original attribute from ArcGIS API is ISSUESREPORTED
|
|
Issuesreported null.Val[string] `db:"issuesreported" `
|
|
// Original attribute from ArcGIS API is JURISDICTION
|
|
Jurisdiction null.Val[string] `db:"jurisdiction" `
|
|
// Original attribute from ArcGIS API is NOTIFICATIONTIMESTAMP
|
|
Notificationtimestamp null.Val[string] `db:"notificationtimestamp" `
|
|
// Original attribute from ArcGIS API is ZONE
|
|
Zone null.Val[string] `db:"zone" `
|
|
// Original attribute from ArcGIS API is ZONE2
|
|
Zone2 null.Val[string] `db:"zone2" `
|
|
Geometry types.JSON[json.RawMessage] `db:"geometry" `
|
|
Geospatial null.Val[string] `db:"geospatial" `
|
|
Version int32 `db:"version,pk" `
|
|
OrganizationID int32 `db:"organization_id" `
|
|
H3cell null.Val[string] `db:"h3cell,generated" `
|
|
|
|
R fieldseekerServicerequestR `db:"-" `
|
|
}
|
|
|
|
// FieldseekerServicerequestSlice is an alias for a slice of pointers to FieldseekerServicerequest.
|
|
// This should almost always be used instead of []*FieldseekerServicerequest.
|
|
type FieldseekerServicerequestSlice []*FieldseekerServicerequest
|
|
|
|
// FieldseekerServicerequests contains methods to work with the servicerequest table
|
|
var FieldseekerServicerequests = psql.NewTablex[*FieldseekerServicerequest, FieldseekerServicerequestSlice, *FieldseekerServicerequestSetter]("fieldseeker", "servicerequest", buildFieldseekerServicerequestColumns("fieldseeker.servicerequest"))
|
|
|
|
// FieldseekerServicerequestsQuery is a query on the servicerequest table
|
|
type FieldseekerServicerequestsQuery = *psql.ViewQuery[*FieldseekerServicerequest, FieldseekerServicerequestSlice]
|
|
|
|
// fieldseekerServicerequestR is where relationships are stored.
|
|
type fieldseekerServicerequestR struct {
|
|
Organization *Organization // fieldseeker.servicerequest.servicerequest_organization_id_fkey
|
|
}
|
|
|
|
func buildFieldseekerServicerequestColumns(alias string) fieldseekerServicerequestColumns {
|
|
return fieldseekerServicerequestColumns{
|
|
ColumnsExpr: expr.NewColumnsExpr(
|
|
"objectid", "recdatetime", "source", "entrytech", "priority", "supervisor", "assignedtech", "status", "clranon", "clrfname", "clrphone1", "clrphone2", "clremail", "clrcompany", "clraddr1", "clraddr2", "clrcity", "clrstate", "clrzip", "clrother", "clrcontpref", "reqcompany", "reqaddr1", "reqaddr2", "reqcity", "reqstate", "reqzip", "reqcrossst", "reqsubdiv", "reqmapgrid", "reqpermission", "reqtarget", "reqdescr", "reqnotesfortech", "reqnotesforcust", "reqfldnotes", "reqprogramactions", "datetimeclosed", "techclosed", "sr_number", "reviewed", "reviewedby", "revieweddate", "accepted", "accepteddate", "rejectedby", "rejecteddate", "rejectedreason", "duedate", "acceptedby", "comments", "estcompletedate", "nextaction", "recordstatus", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "firstresponsedate", "responsedaycount", "allowed", "xvalue", "yvalue", "validx", "validy", "externalid", "externalerror", "pointlocid", "notified", "notifieddate", "scheduled", "scheduleddate", "dog", "schedule_period", "schedule_notes", "spanish", "creationdate", "creator", "editdate", "editor", "issuesreported", "jurisdiction", "notificationtimestamp", "zone", "zone2", "geometry", "geospatial", "version", "organization_id", "h3cell",
|
|
).WithParent("fieldseeker.servicerequest"),
|
|
tableAlias: alias,
|
|
Objectid: psql.Quote(alias, "objectid"),
|
|
Recdatetime: psql.Quote(alias, "recdatetime"),
|
|
Source: psql.Quote(alias, "source"),
|
|
Entrytech: psql.Quote(alias, "entrytech"),
|
|
Priority: psql.Quote(alias, "priority"),
|
|
Supervisor: psql.Quote(alias, "supervisor"),
|
|
Assignedtech: psql.Quote(alias, "assignedtech"),
|
|
Status: psql.Quote(alias, "status"),
|
|
Clranon: psql.Quote(alias, "clranon"),
|
|
Clrfname: psql.Quote(alias, "clrfname"),
|
|
Clrphone1: psql.Quote(alias, "clrphone1"),
|
|
Clrphone2: psql.Quote(alias, "clrphone2"),
|
|
Clremail: psql.Quote(alias, "clremail"),
|
|
Clrcompany: psql.Quote(alias, "clrcompany"),
|
|
Clraddr1: psql.Quote(alias, "clraddr1"),
|
|
Clraddr2: psql.Quote(alias, "clraddr2"),
|
|
Clrcity: psql.Quote(alias, "clrcity"),
|
|
Clrstate: psql.Quote(alias, "clrstate"),
|
|
Clrzip: psql.Quote(alias, "clrzip"),
|
|
Clrother: psql.Quote(alias, "clrother"),
|
|
Clrcontpref: psql.Quote(alias, "clrcontpref"),
|
|
Reqcompany: psql.Quote(alias, "reqcompany"),
|
|
Reqaddr1: psql.Quote(alias, "reqaddr1"),
|
|
Reqaddr2: psql.Quote(alias, "reqaddr2"),
|
|
Reqcity: psql.Quote(alias, "reqcity"),
|
|
Reqstate: psql.Quote(alias, "reqstate"),
|
|
Reqzip: psql.Quote(alias, "reqzip"),
|
|
Reqcrossst: psql.Quote(alias, "reqcrossst"),
|
|
Reqsubdiv: psql.Quote(alias, "reqsubdiv"),
|
|
Reqmapgrid: psql.Quote(alias, "reqmapgrid"),
|
|
Reqpermission: psql.Quote(alias, "reqpermission"),
|
|
Reqtarget: psql.Quote(alias, "reqtarget"),
|
|
Reqdescr: psql.Quote(alias, "reqdescr"),
|
|
Reqnotesfortech: psql.Quote(alias, "reqnotesfortech"),
|
|
Reqnotesforcust: psql.Quote(alias, "reqnotesforcust"),
|
|
Reqfldnotes: psql.Quote(alias, "reqfldnotes"),
|
|
Reqprogramactions: psql.Quote(alias, "reqprogramactions"),
|
|
Datetimeclosed: psql.Quote(alias, "datetimeclosed"),
|
|
Techclosed: psql.Quote(alias, "techclosed"),
|
|
SRNumber: psql.Quote(alias, "sr_number"),
|
|
Reviewed: psql.Quote(alias, "reviewed"),
|
|
Reviewedby: psql.Quote(alias, "reviewedby"),
|
|
Revieweddate: psql.Quote(alias, "revieweddate"),
|
|
Accepted: psql.Quote(alias, "accepted"),
|
|
Accepteddate: psql.Quote(alias, "accepteddate"),
|
|
Rejectedby: psql.Quote(alias, "rejectedby"),
|
|
Rejecteddate: psql.Quote(alias, "rejecteddate"),
|
|
Rejectedreason: psql.Quote(alias, "rejectedreason"),
|
|
Duedate: psql.Quote(alias, "duedate"),
|
|
Acceptedby: psql.Quote(alias, "acceptedby"),
|
|
Comments: psql.Quote(alias, "comments"),
|
|
Estcompletedate: psql.Quote(alias, "estcompletedate"),
|
|
Nextaction: psql.Quote(alias, "nextaction"),
|
|
Recordstatus: psql.Quote(alias, "recordstatus"),
|
|
Globalid: psql.Quote(alias, "globalid"),
|
|
CreatedUser: psql.Quote(alias, "created_user"),
|
|
CreatedDate: psql.Quote(alias, "created_date"),
|
|
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
|
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
|
Firstresponsedate: psql.Quote(alias, "firstresponsedate"),
|
|
Responsedaycount: psql.Quote(alias, "responsedaycount"),
|
|
Allowed: psql.Quote(alias, "allowed"),
|
|
Xvalue: psql.Quote(alias, "xvalue"),
|
|
Yvalue: psql.Quote(alias, "yvalue"),
|
|
Validx: psql.Quote(alias, "validx"),
|
|
Validy: psql.Quote(alias, "validy"),
|
|
Externalid: psql.Quote(alias, "externalid"),
|
|
Externalerror: psql.Quote(alias, "externalerror"),
|
|
Pointlocid: psql.Quote(alias, "pointlocid"),
|
|
Notified: psql.Quote(alias, "notified"),
|
|
Notifieddate: psql.Quote(alias, "notifieddate"),
|
|
Scheduled: psql.Quote(alias, "scheduled"),
|
|
Scheduleddate: psql.Quote(alias, "scheduleddate"),
|
|
Dog: psql.Quote(alias, "dog"),
|
|
SchedulePeriod: psql.Quote(alias, "schedule_period"),
|
|
ScheduleNotes: psql.Quote(alias, "schedule_notes"),
|
|
Spanish: psql.Quote(alias, "spanish"),
|
|
Creationdate: psql.Quote(alias, "creationdate"),
|
|
Creator: psql.Quote(alias, "creator"),
|
|
Editdate: psql.Quote(alias, "editdate"),
|
|
Editor: psql.Quote(alias, "editor"),
|
|
Issuesreported: psql.Quote(alias, "issuesreported"),
|
|
Jurisdiction: psql.Quote(alias, "jurisdiction"),
|
|
Notificationtimestamp: psql.Quote(alias, "notificationtimestamp"),
|
|
Zone: psql.Quote(alias, "zone"),
|
|
Zone2: psql.Quote(alias, "zone2"),
|
|
Geometry: psql.Quote(alias, "geometry"),
|
|
Geospatial: psql.Quote(alias, "geospatial"),
|
|
Version: psql.Quote(alias, "version"),
|
|
OrganizationID: psql.Quote(alias, "organization_id"),
|
|
H3cell: psql.Quote(alias, "h3cell"),
|
|
}
|
|
}
|
|
|
|
type fieldseekerServicerequestColumns struct {
|
|
expr.ColumnsExpr
|
|
tableAlias string
|
|
Objectid psql.Expression
|
|
Recdatetime psql.Expression
|
|
Source psql.Expression
|
|
Entrytech psql.Expression
|
|
Priority psql.Expression
|
|
Supervisor psql.Expression
|
|
Assignedtech psql.Expression
|
|
Status psql.Expression
|
|
Clranon psql.Expression
|
|
Clrfname psql.Expression
|
|
Clrphone1 psql.Expression
|
|
Clrphone2 psql.Expression
|
|
Clremail psql.Expression
|
|
Clrcompany psql.Expression
|
|
Clraddr1 psql.Expression
|
|
Clraddr2 psql.Expression
|
|
Clrcity psql.Expression
|
|
Clrstate psql.Expression
|
|
Clrzip psql.Expression
|
|
Clrother psql.Expression
|
|
Clrcontpref psql.Expression
|
|
Reqcompany psql.Expression
|
|
Reqaddr1 psql.Expression
|
|
Reqaddr2 psql.Expression
|
|
Reqcity psql.Expression
|
|
Reqstate psql.Expression
|
|
Reqzip psql.Expression
|
|
Reqcrossst psql.Expression
|
|
Reqsubdiv psql.Expression
|
|
Reqmapgrid psql.Expression
|
|
Reqpermission psql.Expression
|
|
Reqtarget psql.Expression
|
|
Reqdescr psql.Expression
|
|
Reqnotesfortech psql.Expression
|
|
Reqnotesforcust psql.Expression
|
|
Reqfldnotes psql.Expression
|
|
Reqprogramactions psql.Expression
|
|
Datetimeclosed psql.Expression
|
|
Techclosed psql.Expression
|
|
SRNumber psql.Expression
|
|
Reviewed psql.Expression
|
|
Reviewedby psql.Expression
|
|
Revieweddate psql.Expression
|
|
Accepted psql.Expression
|
|
Accepteddate psql.Expression
|
|
Rejectedby psql.Expression
|
|
Rejecteddate psql.Expression
|
|
Rejectedreason psql.Expression
|
|
Duedate psql.Expression
|
|
Acceptedby psql.Expression
|
|
Comments psql.Expression
|
|
Estcompletedate psql.Expression
|
|
Nextaction psql.Expression
|
|
Recordstatus psql.Expression
|
|
Globalid psql.Expression
|
|
CreatedUser psql.Expression
|
|
CreatedDate psql.Expression
|
|
LastEditedUser psql.Expression
|
|
LastEditedDate psql.Expression
|
|
Firstresponsedate psql.Expression
|
|
Responsedaycount psql.Expression
|
|
Allowed psql.Expression
|
|
Xvalue psql.Expression
|
|
Yvalue psql.Expression
|
|
Validx psql.Expression
|
|
Validy psql.Expression
|
|
Externalid psql.Expression
|
|
Externalerror psql.Expression
|
|
Pointlocid psql.Expression
|
|
Notified psql.Expression
|
|
Notifieddate psql.Expression
|
|
Scheduled psql.Expression
|
|
Scheduleddate psql.Expression
|
|
Dog psql.Expression
|
|
SchedulePeriod psql.Expression
|
|
ScheduleNotes psql.Expression
|
|
Spanish psql.Expression
|
|
Creationdate psql.Expression
|
|
Creator psql.Expression
|
|
Editdate psql.Expression
|
|
Editor psql.Expression
|
|
Issuesreported psql.Expression
|
|
Jurisdiction psql.Expression
|
|
Notificationtimestamp psql.Expression
|
|
Zone psql.Expression
|
|
Zone2 psql.Expression
|
|
Geometry psql.Expression
|
|
Geospatial psql.Expression
|
|
Version psql.Expression
|
|
OrganizationID psql.Expression
|
|
H3cell psql.Expression
|
|
}
|
|
|
|
func (c fieldseekerServicerequestColumns) Alias() string {
|
|
return c.tableAlias
|
|
}
|
|
|
|
func (fieldseekerServicerequestColumns) AliasedAs(alias string) fieldseekerServicerequestColumns {
|
|
return buildFieldseekerServicerequestColumns(alias)
|
|
}
|
|
|
|
// FieldseekerServicerequestSetter is used for insert/upsert/update operations
|
|
// All values are optional, and do not have to be set
|
|
// Generated columns are not included
|
|
type FieldseekerServicerequestSetter struct {
|
|
Objectid omit.Val[int64] `db:"objectid" `
|
|
Recdatetime omitnull.Val[time.Time] `db:"recdatetime" `
|
|
Source omitnull.Val[string] `db:"source" `
|
|
Entrytech omitnull.Val[string] `db:"entrytech" `
|
|
Priority omitnull.Val[string] `db:"priority" `
|
|
Supervisor omitnull.Val[string] `db:"supervisor" `
|
|
Assignedtech omitnull.Val[string] `db:"assignedtech" `
|
|
Status omitnull.Val[string] `db:"status" `
|
|
Clranon omitnull.Val[int16] `db:"clranon" `
|
|
Clrfname omitnull.Val[string] `db:"clrfname" `
|
|
Clrphone1 omitnull.Val[string] `db:"clrphone1" `
|
|
Clrphone2 omitnull.Val[string] `db:"clrphone2" `
|
|
Clremail omitnull.Val[string] `db:"clremail" `
|
|
Clrcompany omitnull.Val[string] `db:"clrcompany" `
|
|
Clraddr1 omitnull.Val[string] `db:"clraddr1" `
|
|
Clraddr2 omitnull.Val[string] `db:"clraddr2" `
|
|
Clrcity omitnull.Val[string] `db:"clrcity" `
|
|
Clrstate omitnull.Val[string] `db:"clrstate" `
|
|
Clrzip omitnull.Val[string] `db:"clrzip" `
|
|
Clrother omitnull.Val[string] `db:"clrother" `
|
|
Clrcontpref omitnull.Val[string] `db:"clrcontpref" `
|
|
Reqcompany omitnull.Val[string] `db:"reqcompany" `
|
|
Reqaddr1 omitnull.Val[string] `db:"reqaddr1" `
|
|
Reqaddr2 omitnull.Val[string] `db:"reqaddr2" `
|
|
Reqcity omitnull.Val[string] `db:"reqcity" `
|
|
Reqstate omitnull.Val[string] `db:"reqstate" `
|
|
Reqzip omitnull.Val[string] `db:"reqzip" `
|
|
Reqcrossst omitnull.Val[string] `db:"reqcrossst" `
|
|
Reqsubdiv omitnull.Val[string] `db:"reqsubdiv" `
|
|
Reqmapgrid omitnull.Val[string] `db:"reqmapgrid" `
|
|
Reqpermission omitnull.Val[int16] `db:"reqpermission" `
|
|
Reqtarget omitnull.Val[string] `db:"reqtarget" `
|
|
Reqdescr omitnull.Val[string] `db:"reqdescr" `
|
|
Reqnotesfortech omitnull.Val[string] `db:"reqnotesfortech" `
|
|
Reqnotesforcust omitnull.Val[string] `db:"reqnotesforcust" `
|
|
Reqfldnotes omitnull.Val[string] `db:"reqfldnotes" `
|
|
Reqprogramactions omitnull.Val[string] `db:"reqprogramactions" `
|
|
Datetimeclosed omitnull.Val[time.Time] `db:"datetimeclosed" `
|
|
Techclosed omitnull.Val[string] `db:"techclosed" `
|
|
SRNumber omitnull.Val[int32] `db:"sr_number" `
|
|
Reviewed omitnull.Val[int16] `db:"reviewed" `
|
|
Reviewedby omitnull.Val[string] `db:"reviewedby" `
|
|
Revieweddate omitnull.Val[time.Time] `db:"revieweddate" `
|
|
Accepted omitnull.Val[int16] `db:"accepted" `
|
|
Accepteddate omitnull.Val[time.Time] `db:"accepteddate" `
|
|
Rejectedby omitnull.Val[string] `db:"rejectedby" `
|
|
Rejecteddate omitnull.Val[time.Time] `db:"rejecteddate" `
|
|
Rejectedreason omitnull.Val[string] `db:"rejectedreason" `
|
|
Duedate omitnull.Val[time.Time] `db:"duedate" `
|
|
Acceptedby omitnull.Val[string] `db:"acceptedby" `
|
|
Comments omitnull.Val[string] `db:"comments" `
|
|
Estcompletedate omitnull.Val[time.Time] `db:"estcompletedate" `
|
|
Nextaction omitnull.Val[string] `db:"nextaction" `
|
|
Recordstatus omitnull.Val[int16] `db:"recordstatus" `
|
|
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
|
CreatedUser omitnull.Val[string] `db:"created_user" `
|
|
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
|
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
|
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
|
Firstresponsedate omitnull.Val[time.Time] `db:"firstresponsedate" `
|
|
Responsedaycount omitnull.Val[int16] `db:"responsedaycount" `
|
|
Allowed omitnull.Val[string] `db:"allowed" `
|
|
Xvalue omitnull.Val[string] `db:"xvalue" `
|
|
Yvalue omitnull.Val[string] `db:"yvalue" `
|
|
Validx omitnull.Val[string] `db:"validx" `
|
|
Validy omitnull.Val[string] `db:"validy" `
|
|
Externalid omitnull.Val[string] `db:"externalid" `
|
|
Externalerror omitnull.Val[string] `db:"externalerror" `
|
|
Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" `
|
|
Notified omitnull.Val[int16] `db:"notified" `
|
|
Notifieddate omitnull.Val[time.Time] `db:"notifieddate" `
|
|
Scheduled omitnull.Val[int16] `db:"scheduled" `
|
|
Scheduleddate omitnull.Val[time.Time] `db:"scheduleddate" `
|
|
Dog omitnull.Val[int32] `db:"dog" `
|
|
SchedulePeriod omitnull.Val[string] `db:"schedule_period" `
|
|
ScheduleNotes omitnull.Val[string] `db:"schedule_notes" `
|
|
Spanish omitnull.Val[int32] `db:"spanish" `
|
|
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
|
Creator omitnull.Val[string] `db:"creator" `
|
|
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
|
Editor omitnull.Val[string] `db:"editor" `
|
|
Issuesreported omitnull.Val[string] `db:"issuesreported" `
|
|
Jurisdiction omitnull.Val[string] `db:"jurisdiction" `
|
|
Notificationtimestamp omitnull.Val[string] `db:"notificationtimestamp" `
|
|
Zone omitnull.Val[string] `db:"zone" `
|
|
Zone2 omitnull.Val[string] `db:"zone2" `
|
|
Geometry omit.Val[types.JSON[json.RawMessage]] `db:"geometry" `
|
|
Geospatial omitnull.Val[string] `db:"geospatial" `
|
|
Version omit.Val[int32] `db:"version,pk" `
|
|
OrganizationID omit.Val[int32] `db:"organization_id" `
|
|
}
|
|
|
|
func (s FieldseekerServicerequestSetter) SetColumns() []string {
|
|
vals := make([]string, 0, 90)
|
|
if s.Objectid.IsValue() {
|
|
vals = append(vals, "objectid")
|
|
}
|
|
if !s.Recdatetime.IsUnset() {
|
|
vals = append(vals, "recdatetime")
|
|
}
|
|
if !s.Source.IsUnset() {
|
|
vals = append(vals, "source")
|
|
}
|
|
if !s.Entrytech.IsUnset() {
|
|
vals = append(vals, "entrytech")
|
|
}
|
|
if !s.Priority.IsUnset() {
|
|
vals = append(vals, "priority")
|
|
}
|
|
if !s.Supervisor.IsUnset() {
|
|
vals = append(vals, "supervisor")
|
|
}
|
|
if !s.Assignedtech.IsUnset() {
|
|
vals = append(vals, "assignedtech")
|
|
}
|
|
if !s.Status.IsUnset() {
|
|
vals = append(vals, "status")
|
|
}
|
|
if !s.Clranon.IsUnset() {
|
|
vals = append(vals, "clranon")
|
|
}
|
|
if !s.Clrfname.IsUnset() {
|
|
vals = append(vals, "clrfname")
|
|
}
|
|
if !s.Clrphone1.IsUnset() {
|
|
vals = append(vals, "clrphone1")
|
|
}
|
|
if !s.Clrphone2.IsUnset() {
|
|
vals = append(vals, "clrphone2")
|
|
}
|
|
if !s.Clremail.IsUnset() {
|
|
vals = append(vals, "clremail")
|
|
}
|
|
if !s.Clrcompany.IsUnset() {
|
|
vals = append(vals, "clrcompany")
|
|
}
|
|
if !s.Clraddr1.IsUnset() {
|
|
vals = append(vals, "clraddr1")
|
|
}
|
|
if !s.Clraddr2.IsUnset() {
|
|
vals = append(vals, "clraddr2")
|
|
}
|
|
if !s.Clrcity.IsUnset() {
|
|
vals = append(vals, "clrcity")
|
|
}
|
|
if !s.Clrstate.IsUnset() {
|
|
vals = append(vals, "clrstate")
|
|
}
|
|
if !s.Clrzip.IsUnset() {
|
|
vals = append(vals, "clrzip")
|
|
}
|
|
if !s.Clrother.IsUnset() {
|
|
vals = append(vals, "clrother")
|
|
}
|
|
if !s.Clrcontpref.IsUnset() {
|
|
vals = append(vals, "clrcontpref")
|
|
}
|
|
if !s.Reqcompany.IsUnset() {
|
|
vals = append(vals, "reqcompany")
|
|
}
|
|
if !s.Reqaddr1.IsUnset() {
|
|
vals = append(vals, "reqaddr1")
|
|
}
|
|
if !s.Reqaddr2.IsUnset() {
|
|
vals = append(vals, "reqaddr2")
|
|
}
|
|
if !s.Reqcity.IsUnset() {
|
|
vals = append(vals, "reqcity")
|
|
}
|
|
if !s.Reqstate.IsUnset() {
|
|
vals = append(vals, "reqstate")
|
|
}
|
|
if !s.Reqzip.IsUnset() {
|
|
vals = append(vals, "reqzip")
|
|
}
|
|
if !s.Reqcrossst.IsUnset() {
|
|
vals = append(vals, "reqcrossst")
|
|
}
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
vals = append(vals, "reqsubdiv")
|
|
}
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
vals = append(vals, "reqmapgrid")
|
|
}
|
|
if !s.Reqpermission.IsUnset() {
|
|
vals = append(vals, "reqpermission")
|
|
}
|
|
if !s.Reqtarget.IsUnset() {
|
|
vals = append(vals, "reqtarget")
|
|
}
|
|
if !s.Reqdescr.IsUnset() {
|
|
vals = append(vals, "reqdescr")
|
|
}
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
vals = append(vals, "reqnotesfortech")
|
|
}
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
vals = append(vals, "reqnotesforcust")
|
|
}
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
vals = append(vals, "reqfldnotes")
|
|
}
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
vals = append(vals, "reqprogramactions")
|
|
}
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
vals = append(vals, "datetimeclosed")
|
|
}
|
|
if !s.Techclosed.IsUnset() {
|
|
vals = append(vals, "techclosed")
|
|
}
|
|
if !s.SRNumber.IsUnset() {
|
|
vals = append(vals, "sr_number")
|
|
}
|
|
if !s.Reviewed.IsUnset() {
|
|
vals = append(vals, "reviewed")
|
|
}
|
|
if !s.Reviewedby.IsUnset() {
|
|
vals = append(vals, "reviewedby")
|
|
}
|
|
if !s.Revieweddate.IsUnset() {
|
|
vals = append(vals, "revieweddate")
|
|
}
|
|
if !s.Accepted.IsUnset() {
|
|
vals = append(vals, "accepted")
|
|
}
|
|
if !s.Accepteddate.IsUnset() {
|
|
vals = append(vals, "accepteddate")
|
|
}
|
|
if !s.Rejectedby.IsUnset() {
|
|
vals = append(vals, "rejectedby")
|
|
}
|
|
if !s.Rejecteddate.IsUnset() {
|
|
vals = append(vals, "rejecteddate")
|
|
}
|
|
if !s.Rejectedreason.IsUnset() {
|
|
vals = append(vals, "rejectedreason")
|
|
}
|
|
if !s.Duedate.IsUnset() {
|
|
vals = append(vals, "duedate")
|
|
}
|
|
if !s.Acceptedby.IsUnset() {
|
|
vals = append(vals, "acceptedby")
|
|
}
|
|
if !s.Comments.IsUnset() {
|
|
vals = append(vals, "comments")
|
|
}
|
|
if !s.Estcompletedate.IsUnset() {
|
|
vals = append(vals, "estcompletedate")
|
|
}
|
|
if !s.Nextaction.IsUnset() {
|
|
vals = append(vals, "nextaction")
|
|
}
|
|
if !s.Recordstatus.IsUnset() {
|
|
vals = append(vals, "recordstatus")
|
|
}
|
|
if s.Globalid.IsValue() {
|
|
vals = append(vals, "globalid")
|
|
}
|
|
if !s.CreatedUser.IsUnset() {
|
|
vals = append(vals, "created_user")
|
|
}
|
|
if !s.CreatedDate.IsUnset() {
|
|
vals = append(vals, "created_date")
|
|
}
|
|
if !s.LastEditedUser.IsUnset() {
|
|
vals = append(vals, "last_edited_user")
|
|
}
|
|
if !s.LastEditedDate.IsUnset() {
|
|
vals = append(vals, "last_edited_date")
|
|
}
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
vals = append(vals, "firstresponsedate")
|
|
}
|
|
if !s.Responsedaycount.IsUnset() {
|
|
vals = append(vals, "responsedaycount")
|
|
}
|
|
if !s.Allowed.IsUnset() {
|
|
vals = append(vals, "allowed")
|
|
}
|
|
if !s.Xvalue.IsUnset() {
|
|
vals = append(vals, "xvalue")
|
|
}
|
|
if !s.Yvalue.IsUnset() {
|
|
vals = append(vals, "yvalue")
|
|
}
|
|
if !s.Validx.IsUnset() {
|
|
vals = append(vals, "validx")
|
|
}
|
|
if !s.Validy.IsUnset() {
|
|
vals = append(vals, "validy")
|
|
}
|
|
if !s.Externalid.IsUnset() {
|
|
vals = append(vals, "externalid")
|
|
}
|
|
if !s.Externalerror.IsUnset() {
|
|
vals = append(vals, "externalerror")
|
|
}
|
|
if !s.Pointlocid.IsUnset() {
|
|
vals = append(vals, "pointlocid")
|
|
}
|
|
if !s.Notified.IsUnset() {
|
|
vals = append(vals, "notified")
|
|
}
|
|
if !s.Notifieddate.IsUnset() {
|
|
vals = append(vals, "notifieddate")
|
|
}
|
|
if !s.Scheduled.IsUnset() {
|
|
vals = append(vals, "scheduled")
|
|
}
|
|
if !s.Scheduleddate.IsUnset() {
|
|
vals = append(vals, "scheduleddate")
|
|
}
|
|
if !s.Dog.IsUnset() {
|
|
vals = append(vals, "dog")
|
|
}
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
vals = append(vals, "schedule_period")
|
|
}
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
vals = append(vals, "schedule_notes")
|
|
}
|
|
if !s.Spanish.IsUnset() {
|
|
vals = append(vals, "spanish")
|
|
}
|
|
if !s.Creationdate.IsUnset() {
|
|
vals = append(vals, "creationdate")
|
|
}
|
|
if !s.Creator.IsUnset() {
|
|
vals = append(vals, "creator")
|
|
}
|
|
if !s.Editdate.IsUnset() {
|
|
vals = append(vals, "editdate")
|
|
}
|
|
if !s.Editor.IsUnset() {
|
|
vals = append(vals, "editor")
|
|
}
|
|
if !s.Issuesreported.IsUnset() {
|
|
vals = append(vals, "issuesreported")
|
|
}
|
|
if !s.Jurisdiction.IsUnset() {
|
|
vals = append(vals, "jurisdiction")
|
|
}
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
vals = append(vals, "notificationtimestamp")
|
|
}
|
|
if !s.Zone.IsUnset() {
|
|
vals = append(vals, "zone")
|
|
}
|
|
if !s.Zone2.IsUnset() {
|
|
vals = append(vals, "zone2")
|
|
}
|
|
if s.Geometry.IsValue() {
|
|
vals = append(vals, "geometry")
|
|
}
|
|
if !s.Geospatial.IsUnset() {
|
|
vals = append(vals, "geospatial")
|
|
}
|
|
if s.Version.IsValue() {
|
|
vals = append(vals, "version")
|
|
}
|
|
if s.OrganizationID.IsValue() {
|
|
vals = append(vals, "organization_id")
|
|
}
|
|
return vals
|
|
}
|
|
|
|
func (s FieldseekerServicerequestSetter) Overwrite(t *FieldseekerServicerequest) {
|
|
if s.Objectid.IsValue() {
|
|
t.Objectid = s.Objectid.MustGet()
|
|
}
|
|
if !s.Recdatetime.IsUnset() {
|
|
t.Recdatetime = s.Recdatetime.MustGetNull()
|
|
}
|
|
if !s.Source.IsUnset() {
|
|
t.Source = s.Source.MustGetNull()
|
|
}
|
|
if !s.Entrytech.IsUnset() {
|
|
t.Entrytech = s.Entrytech.MustGetNull()
|
|
}
|
|
if !s.Priority.IsUnset() {
|
|
t.Priority = s.Priority.MustGetNull()
|
|
}
|
|
if !s.Supervisor.IsUnset() {
|
|
t.Supervisor = s.Supervisor.MustGetNull()
|
|
}
|
|
if !s.Assignedtech.IsUnset() {
|
|
t.Assignedtech = s.Assignedtech.MustGetNull()
|
|
}
|
|
if !s.Status.IsUnset() {
|
|
t.Status = s.Status.MustGetNull()
|
|
}
|
|
if !s.Clranon.IsUnset() {
|
|
t.Clranon = s.Clranon.MustGetNull()
|
|
}
|
|
if !s.Clrfname.IsUnset() {
|
|
t.Clrfname = s.Clrfname.MustGetNull()
|
|
}
|
|
if !s.Clrphone1.IsUnset() {
|
|
t.Clrphone1 = s.Clrphone1.MustGetNull()
|
|
}
|
|
if !s.Clrphone2.IsUnset() {
|
|
t.Clrphone2 = s.Clrphone2.MustGetNull()
|
|
}
|
|
if !s.Clremail.IsUnset() {
|
|
t.Clremail = s.Clremail.MustGetNull()
|
|
}
|
|
if !s.Clrcompany.IsUnset() {
|
|
t.Clrcompany = s.Clrcompany.MustGetNull()
|
|
}
|
|
if !s.Clraddr1.IsUnset() {
|
|
t.Clraddr1 = s.Clraddr1.MustGetNull()
|
|
}
|
|
if !s.Clraddr2.IsUnset() {
|
|
t.Clraddr2 = s.Clraddr2.MustGetNull()
|
|
}
|
|
if !s.Clrcity.IsUnset() {
|
|
t.Clrcity = s.Clrcity.MustGetNull()
|
|
}
|
|
if !s.Clrstate.IsUnset() {
|
|
t.Clrstate = s.Clrstate.MustGetNull()
|
|
}
|
|
if !s.Clrzip.IsUnset() {
|
|
t.Clrzip = s.Clrzip.MustGetNull()
|
|
}
|
|
if !s.Clrother.IsUnset() {
|
|
t.Clrother = s.Clrother.MustGetNull()
|
|
}
|
|
if !s.Clrcontpref.IsUnset() {
|
|
t.Clrcontpref = s.Clrcontpref.MustGetNull()
|
|
}
|
|
if !s.Reqcompany.IsUnset() {
|
|
t.Reqcompany = s.Reqcompany.MustGetNull()
|
|
}
|
|
if !s.Reqaddr1.IsUnset() {
|
|
t.Reqaddr1 = s.Reqaddr1.MustGetNull()
|
|
}
|
|
if !s.Reqaddr2.IsUnset() {
|
|
t.Reqaddr2 = s.Reqaddr2.MustGetNull()
|
|
}
|
|
if !s.Reqcity.IsUnset() {
|
|
t.Reqcity = s.Reqcity.MustGetNull()
|
|
}
|
|
if !s.Reqstate.IsUnset() {
|
|
t.Reqstate = s.Reqstate.MustGetNull()
|
|
}
|
|
if !s.Reqzip.IsUnset() {
|
|
t.Reqzip = s.Reqzip.MustGetNull()
|
|
}
|
|
if !s.Reqcrossst.IsUnset() {
|
|
t.Reqcrossst = s.Reqcrossst.MustGetNull()
|
|
}
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
t.Reqsubdiv = s.Reqsubdiv.MustGetNull()
|
|
}
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
t.Reqmapgrid = s.Reqmapgrid.MustGetNull()
|
|
}
|
|
if !s.Reqpermission.IsUnset() {
|
|
t.Reqpermission = s.Reqpermission.MustGetNull()
|
|
}
|
|
if !s.Reqtarget.IsUnset() {
|
|
t.Reqtarget = s.Reqtarget.MustGetNull()
|
|
}
|
|
if !s.Reqdescr.IsUnset() {
|
|
t.Reqdescr = s.Reqdescr.MustGetNull()
|
|
}
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
t.Reqnotesfortech = s.Reqnotesfortech.MustGetNull()
|
|
}
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
t.Reqnotesforcust = s.Reqnotesforcust.MustGetNull()
|
|
}
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
t.Reqfldnotes = s.Reqfldnotes.MustGetNull()
|
|
}
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
t.Reqprogramactions = s.Reqprogramactions.MustGetNull()
|
|
}
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
t.Datetimeclosed = s.Datetimeclosed.MustGetNull()
|
|
}
|
|
if !s.Techclosed.IsUnset() {
|
|
t.Techclosed = s.Techclosed.MustGetNull()
|
|
}
|
|
if !s.SRNumber.IsUnset() {
|
|
t.SRNumber = s.SRNumber.MustGetNull()
|
|
}
|
|
if !s.Reviewed.IsUnset() {
|
|
t.Reviewed = s.Reviewed.MustGetNull()
|
|
}
|
|
if !s.Reviewedby.IsUnset() {
|
|
t.Reviewedby = s.Reviewedby.MustGetNull()
|
|
}
|
|
if !s.Revieweddate.IsUnset() {
|
|
t.Revieweddate = s.Revieweddate.MustGetNull()
|
|
}
|
|
if !s.Accepted.IsUnset() {
|
|
t.Accepted = s.Accepted.MustGetNull()
|
|
}
|
|
if !s.Accepteddate.IsUnset() {
|
|
t.Accepteddate = s.Accepteddate.MustGetNull()
|
|
}
|
|
if !s.Rejectedby.IsUnset() {
|
|
t.Rejectedby = s.Rejectedby.MustGetNull()
|
|
}
|
|
if !s.Rejecteddate.IsUnset() {
|
|
t.Rejecteddate = s.Rejecteddate.MustGetNull()
|
|
}
|
|
if !s.Rejectedreason.IsUnset() {
|
|
t.Rejectedreason = s.Rejectedreason.MustGetNull()
|
|
}
|
|
if !s.Duedate.IsUnset() {
|
|
t.Duedate = s.Duedate.MustGetNull()
|
|
}
|
|
if !s.Acceptedby.IsUnset() {
|
|
t.Acceptedby = s.Acceptedby.MustGetNull()
|
|
}
|
|
if !s.Comments.IsUnset() {
|
|
t.Comments = s.Comments.MustGetNull()
|
|
}
|
|
if !s.Estcompletedate.IsUnset() {
|
|
t.Estcompletedate = s.Estcompletedate.MustGetNull()
|
|
}
|
|
if !s.Nextaction.IsUnset() {
|
|
t.Nextaction = s.Nextaction.MustGetNull()
|
|
}
|
|
if !s.Recordstatus.IsUnset() {
|
|
t.Recordstatus = s.Recordstatus.MustGetNull()
|
|
}
|
|
if s.Globalid.IsValue() {
|
|
t.Globalid = s.Globalid.MustGet()
|
|
}
|
|
if !s.CreatedUser.IsUnset() {
|
|
t.CreatedUser = s.CreatedUser.MustGetNull()
|
|
}
|
|
if !s.CreatedDate.IsUnset() {
|
|
t.CreatedDate = s.CreatedDate.MustGetNull()
|
|
}
|
|
if !s.LastEditedUser.IsUnset() {
|
|
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
|
}
|
|
if !s.LastEditedDate.IsUnset() {
|
|
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
|
}
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
t.Firstresponsedate = s.Firstresponsedate.MustGetNull()
|
|
}
|
|
if !s.Responsedaycount.IsUnset() {
|
|
t.Responsedaycount = s.Responsedaycount.MustGetNull()
|
|
}
|
|
if !s.Allowed.IsUnset() {
|
|
t.Allowed = s.Allowed.MustGetNull()
|
|
}
|
|
if !s.Xvalue.IsUnset() {
|
|
t.Xvalue = s.Xvalue.MustGetNull()
|
|
}
|
|
if !s.Yvalue.IsUnset() {
|
|
t.Yvalue = s.Yvalue.MustGetNull()
|
|
}
|
|
if !s.Validx.IsUnset() {
|
|
t.Validx = s.Validx.MustGetNull()
|
|
}
|
|
if !s.Validy.IsUnset() {
|
|
t.Validy = s.Validy.MustGetNull()
|
|
}
|
|
if !s.Externalid.IsUnset() {
|
|
t.Externalid = s.Externalid.MustGetNull()
|
|
}
|
|
if !s.Externalerror.IsUnset() {
|
|
t.Externalerror = s.Externalerror.MustGetNull()
|
|
}
|
|
if !s.Pointlocid.IsUnset() {
|
|
t.Pointlocid = s.Pointlocid.MustGetNull()
|
|
}
|
|
if !s.Notified.IsUnset() {
|
|
t.Notified = s.Notified.MustGetNull()
|
|
}
|
|
if !s.Notifieddate.IsUnset() {
|
|
t.Notifieddate = s.Notifieddate.MustGetNull()
|
|
}
|
|
if !s.Scheduled.IsUnset() {
|
|
t.Scheduled = s.Scheduled.MustGetNull()
|
|
}
|
|
if !s.Scheduleddate.IsUnset() {
|
|
t.Scheduleddate = s.Scheduleddate.MustGetNull()
|
|
}
|
|
if !s.Dog.IsUnset() {
|
|
t.Dog = s.Dog.MustGetNull()
|
|
}
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
t.SchedulePeriod = s.SchedulePeriod.MustGetNull()
|
|
}
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
t.ScheduleNotes = s.ScheduleNotes.MustGetNull()
|
|
}
|
|
if !s.Spanish.IsUnset() {
|
|
t.Spanish = s.Spanish.MustGetNull()
|
|
}
|
|
if !s.Creationdate.IsUnset() {
|
|
t.Creationdate = s.Creationdate.MustGetNull()
|
|
}
|
|
if !s.Creator.IsUnset() {
|
|
t.Creator = s.Creator.MustGetNull()
|
|
}
|
|
if !s.Editdate.IsUnset() {
|
|
t.Editdate = s.Editdate.MustGetNull()
|
|
}
|
|
if !s.Editor.IsUnset() {
|
|
t.Editor = s.Editor.MustGetNull()
|
|
}
|
|
if !s.Issuesreported.IsUnset() {
|
|
t.Issuesreported = s.Issuesreported.MustGetNull()
|
|
}
|
|
if !s.Jurisdiction.IsUnset() {
|
|
t.Jurisdiction = s.Jurisdiction.MustGetNull()
|
|
}
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
t.Notificationtimestamp = s.Notificationtimestamp.MustGetNull()
|
|
}
|
|
if !s.Zone.IsUnset() {
|
|
t.Zone = s.Zone.MustGetNull()
|
|
}
|
|
if !s.Zone2.IsUnset() {
|
|
t.Zone2 = s.Zone2.MustGetNull()
|
|
}
|
|
if s.Geometry.IsValue() {
|
|
t.Geometry = s.Geometry.MustGet()
|
|
}
|
|
if !s.Geospatial.IsUnset() {
|
|
t.Geospatial = s.Geospatial.MustGetNull()
|
|
}
|
|
if s.Version.IsValue() {
|
|
t.Version = s.Version.MustGet()
|
|
}
|
|
if s.OrganizationID.IsValue() {
|
|
t.OrganizationID = s.OrganizationID.MustGet()
|
|
}
|
|
}
|
|
|
|
func (s *FieldseekerServicerequestSetter) Apply(q *dialect.InsertQuery) {
|
|
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
|
return FieldseekerServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
|
})
|
|
|
|
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
|
vals := make([]bob.Expression, 90)
|
|
if s.Objectid.IsValue() {
|
|
vals[0] = psql.Arg(s.Objectid.MustGet())
|
|
} else {
|
|
vals[0] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Recdatetime.IsUnset() {
|
|
vals[1] = psql.Arg(s.Recdatetime.MustGetNull())
|
|
} else {
|
|
vals[1] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Source.IsUnset() {
|
|
vals[2] = psql.Arg(s.Source.MustGetNull())
|
|
} else {
|
|
vals[2] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Entrytech.IsUnset() {
|
|
vals[3] = psql.Arg(s.Entrytech.MustGetNull())
|
|
} else {
|
|
vals[3] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Priority.IsUnset() {
|
|
vals[4] = psql.Arg(s.Priority.MustGetNull())
|
|
} else {
|
|
vals[4] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Supervisor.IsUnset() {
|
|
vals[5] = psql.Arg(s.Supervisor.MustGetNull())
|
|
} else {
|
|
vals[5] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Assignedtech.IsUnset() {
|
|
vals[6] = psql.Arg(s.Assignedtech.MustGetNull())
|
|
} else {
|
|
vals[6] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Status.IsUnset() {
|
|
vals[7] = psql.Arg(s.Status.MustGetNull())
|
|
} else {
|
|
vals[7] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clranon.IsUnset() {
|
|
vals[8] = psql.Arg(s.Clranon.MustGetNull())
|
|
} else {
|
|
vals[8] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrfname.IsUnset() {
|
|
vals[9] = psql.Arg(s.Clrfname.MustGetNull())
|
|
} else {
|
|
vals[9] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrphone1.IsUnset() {
|
|
vals[10] = psql.Arg(s.Clrphone1.MustGetNull())
|
|
} else {
|
|
vals[10] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrphone2.IsUnset() {
|
|
vals[11] = psql.Arg(s.Clrphone2.MustGetNull())
|
|
} else {
|
|
vals[11] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clremail.IsUnset() {
|
|
vals[12] = psql.Arg(s.Clremail.MustGetNull())
|
|
} else {
|
|
vals[12] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrcompany.IsUnset() {
|
|
vals[13] = psql.Arg(s.Clrcompany.MustGetNull())
|
|
} else {
|
|
vals[13] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clraddr1.IsUnset() {
|
|
vals[14] = psql.Arg(s.Clraddr1.MustGetNull())
|
|
} else {
|
|
vals[14] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clraddr2.IsUnset() {
|
|
vals[15] = psql.Arg(s.Clraddr2.MustGetNull())
|
|
} else {
|
|
vals[15] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrcity.IsUnset() {
|
|
vals[16] = psql.Arg(s.Clrcity.MustGetNull())
|
|
} else {
|
|
vals[16] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrstate.IsUnset() {
|
|
vals[17] = psql.Arg(s.Clrstate.MustGetNull())
|
|
} else {
|
|
vals[17] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrzip.IsUnset() {
|
|
vals[18] = psql.Arg(s.Clrzip.MustGetNull())
|
|
} else {
|
|
vals[18] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrother.IsUnset() {
|
|
vals[19] = psql.Arg(s.Clrother.MustGetNull())
|
|
} else {
|
|
vals[19] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrcontpref.IsUnset() {
|
|
vals[20] = psql.Arg(s.Clrcontpref.MustGetNull())
|
|
} else {
|
|
vals[20] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcompany.IsUnset() {
|
|
vals[21] = psql.Arg(s.Reqcompany.MustGetNull())
|
|
} else {
|
|
vals[21] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqaddr1.IsUnset() {
|
|
vals[22] = psql.Arg(s.Reqaddr1.MustGetNull())
|
|
} else {
|
|
vals[22] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqaddr2.IsUnset() {
|
|
vals[23] = psql.Arg(s.Reqaddr2.MustGetNull())
|
|
} else {
|
|
vals[23] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcity.IsUnset() {
|
|
vals[24] = psql.Arg(s.Reqcity.MustGetNull())
|
|
} else {
|
|
vals[24] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqstate.IsUnset() {
|
|
vals[25] = psql.Arg(s.Reqstate.MustGetNull())
|
|
} else {
|
|
vals[25] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqzip.IsUnset() {
|
|
vals[26] = psql.Arg(s.Reqzip.MustGetNull())
|
|
} else {
|
|
vals[26] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcrossst.IsUnset() {
|
|
vals[27] = psql.Arg(s.Reqcrossst.MustGetNull())
|
|
} else {
|
|
vals[27] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
vals[28] = psql.Arg(s.Reqsubdiv.MustGetNull())
|
|
} else {
|
|
vals[28] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
vals[29] = psql.Arg(s.Reqmapgrid.MustGetNull())
|
|
} else {
|
|
vals[29] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqpermission.IsUnset() {
|
|
vals[30] = psql.Arg(s.Reqpermission.MustGetNull())
|
|
} else {
|
|
vals[30] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqtarget.IsUnset() {
|
|
vals[31] = psql.Arg(s.Reqtarget.MustGetNull())
|
|
} else {
|
|
vals[31] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqdescr.IsUnset() {
|
|
vals[32] = psql.Arg(s.Reqdescr.MustGetNull())
|
|
} else {
|
|
vals[32] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
vals[33] = psql.Arg(s.Reqnotesfortech.MustGetNull())
|
|
} else {
|
|
vals[33] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
vals[34] = psql.Arg(s.Reqnotesforcust.MustGetNull())
|
|
} else {
|
|
vals[34] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
vals[35] = psql.Arg(s.Reqfldnotes.MustGetNull())
|
|
} else {
|
|
vals[35] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
vals[36] = psql.Arg(s.Reqprogramactions.MustGetNull())
|
|
} else {
|
|
vals[36] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
vals[37] = psql.Arg(s.Datetimeclosed.MustGetNull())
|
|
} else {
|
|
vals[37] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Techclosed.IsUnset() {
|
|
vals[38] = psql.Arg(s.Techclosed.MustGetNull())
|
|
} else {
|
|
vals[38] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.SRNumber.IsUnset() {
|
|
vals[39] = psql.Arg(s.SRNumber.MustGetNull())
|
|
} else {
|
|
vals[39] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reviewed.IsUnset() {
|
|
vals[40] = psql.Arg(s.Reviewed.MustGetNull())
|
|
} else {
|
|
vals[40] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reviewedby.IsUnset() {
|
|
vals[41] = psql.Arg(s.Reviewedby.MustGetNull())
|
|
} else {
|
|
vals[41] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Revieweddate.IsUnset() {
|
|
vals[42] = psql.Arg(s.Revieweddate.MustGetNull())
|
|
} else {
|
|
vals[42] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Accepted.IsUnset() {
|
|
vals[43] = psql.Arg(s.Accepted.MustGetNull())
|
|
} else {
|
|
vals[43] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Accepteddate.IsUnset() {
|
|
vals[44] = psql.Arg(s.Accepteddate.MustGetNull())
|
|
} else {
|
|
vals[44] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejectedby.IsUnset() {
|
|
vals[45] = psql.Arg(s.Rejectedby.MustGetNull())
|
|
} else {
|
|
vals[45] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejecteddate.IsUnset() {
|
|
vals[46] = psql.Arg(s.Rejecteddate.MustGetNull())
|
|
} else {
|
|
vals[46] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejectedreason.IsUnset() {
|
|
vals[47] = psql.Arg(s.Rejectedreason.MustGetNull())
|
|
} else {
|
|
vals[47] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Duedate.IsUnset() {
|
|
vals[48] = psql.Arg(s.Duedate.MustGetNull())
|
|
} else {
|
|
vals[48] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Acceptedby.IsUnset() {
|
|
vals[49] = psql.Arg(s.Acceptedby.MustGetNull())
|
|
} else {
|
|
vals[49] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Comments.IsUnset() {
|
|
vals[50] = psql.Arg(s.Comments.MustGetNull())
|
|
} else {
|
|
vals[50] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Estcompletedate.IsUnset() {
|
|
vals[51] = psql.Arg(s.Estcompletedate.MustGetNull())
|
|
} else {
|
|
vals[51] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Nextaction.IsUnset() {
|
|
vals[52] = psql.Arg(s.Nextaction.MustGetNull())
|
|
} else {
|
|
vals[52] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Recordstatus.IsUnset() {
|
|
vals[53] = psql.Arg(s.Recordstatus.MustGetNull())
|
|
} else {
|
|
vals[53] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.Globalid.IsValue() {
|
|
vals[54] = psql.Arg(s.Globalid.MustGet())
|
|
} else {
|
|
vals[54] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.CreatedUser.IsUnset() {
|
|
vals[55] = psql.Arg(s.CreatedUser.MustGetNull())
|
|
} else {
|
|
vals[55] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.CreatedDate.IsUnset() {
|
|
vals[56] = psql.Arg(s.CreatedDate.MustGetNull())
|
|
} else {
|
|
vals[56] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.LastEditedUser.IsUnset() {
|
|
vals[57] = psql.Arg(s.LastEditedUser.MustGetNull())
|
|
} else {
|
|
vals[57] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.LastEditedDate.IsUnset() {
|
|
vals[58] = psql.Arg(s.LastEditedDate.MustGetNull())
|
|
} else {
|
|
vals[58] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
vals[59] = psql.Arg(s.Firstresponsedate.MustGetNull())
|
|
} else {
|
|
vals[59] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Responsedaycount.IsUnset() {
|
|
vals[60] = psql.Arg(s.Responsedaycount.MustGetNull())
|
|
} else {
|
|
vals[60] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Allowed.IsUnset() {
|
|
vals[61] = psql.Arg(s.Allowed.MustGetNull())
|
|
} else {
|
|
vals[61] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Xvalue.IsUnset() {
|
|
vals[62] = psql.Arg(s.Xvalue.MustGetNull())
|
|
} else {
|
|
vals[62] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Yvalue.IsUnset() {
|
|
vals[63] = psql.Arg(s.Yvalue.MustGetNull())
|
|
} else {
|
|
vals[63] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Validx.IsUnset() {
|
|
vals[64] = psql.Arg(s.Validx.MustGetNull())
|
|
} else {
|
|
vals[64] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Validy.IsUnset() {
|
|
vals[65] = psql.Arg(s.Validy.MustGetNull())
|
|
} else {
|
|
vals[65] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Externalid.IsUnset() {
|
|
vals[66] = psql.Arg(s.Externalid.MustGetNull())
|
|
} else {
|
|
vals[66] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Externalerror.IsUnset() {
|
|
vals[67] = psql.Arg(s.Externalerror.MustGetNull())
|
|
} else {
|
|
vals[67] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Pointlocid.IsUnset() {
|
|
vals[68] = psql.Arg(s.Pointlocid.MustGetNull())
|
|
} else {
|
|
vals[68] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notified.IsUnset() {
|
|
vals[69] = psql.Arg(s.Notified.MustGetNull())
|
|
} else {
|
|
vals[69] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notifieddate.IsUnset() {
|
|
vals[70] = psql.Arg(s.Notifieddate.MustGetNull())
|
|
} else {
|
|
vals[70] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Scheduled.IsUnset() {
|
|
vals[71] = psql.Arg(s.Scheduled.MustGetNull())
|
|
} else {
|
|
vals[71] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Scheduleddate.IsUnset() {
|
|
vals[72] = psql.Arg(s.Scheduleddate.MustGetNull())
|
|
} else {
|
|
vals[72] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Dog.IsUnset() {
|
|
vals[73] = psql.Arg(s.Dog.MustGetNull())
|
|
} else {
|
|
vals[73] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
vals[74] = psql.Arg(s.SchedulePeriod.MustGetNull())
|
|
} else {
|
|
vals[74] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
vals[75] = psql.Arg(s.ScheduleNotes.MustGetNull())
|
|
} else {
|
|
vals[75] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Spanish.IsUnset() {
|
|
vals[76] = psql.Arg(s.Spanish.MustGetNull())
|
|
} else {
|
|
vals[76] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Creationdate.IsUnset() {
|
|
vals[77] = psql.Arg(s.Creationdate.MustGetNull())
|
|
} else {
|
|
vals[77] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Creator.IsUnset() {
|
|
vals[78] = psql.Arg(s.Creator.MustGetNull())
|
|
} else {
|
|
vals[78] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Editdate.IsUnset() {
|
|
vals[79] = psql.Arg(s.Editdate.MustGetNull())
|
|
} else {
|
|
vals[79] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Editor.IsUnset() {
|
|
vals[80] = psql.Arg(s.Editor.MustGetNull())
|
|
} else {
|
|
vals[80] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Issuesreported.IsUnset() {
|
|
vals[81] = psql.Arg(s.Issuesreported.MustGetNull())
|
|
} else {
|
|
vals[81] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Jurisdiction.IsUnset() {
|
|
vals[82] = psql.Arg(s.Jurisdiction.MustGetNull())
|
|
} else {
|
|
vals[82] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
vals[83] = psql.Arg(s.Notificationtimestamp.MustGetNull())
|
|
} else {
|
|
vals[83] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Zone.IsUnset() {
|
|
vals[84] = psql.Arg(s.Zone.MustGetNull())
|
|
} else {
|
|
vals[84] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Zone2.IsUnset() {
|
|
vals[85] = psql.Arg(s.Zone2.MustGetNull())
|
|
} else {
|
|
vals[85] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.Geometry.IsValue() {
|
|
vals[86] = psql.Arg(s.Geometry.MustGet())
|
|
} else {
|
|
vals[86] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Geospatial.IsUnset() {
|
|
vals[87] = psql.Arg(s.Geospatial.MustGetNull())
|
|
} else {
|
|
vals[87] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.Version.IsValue() {
|
|
vals[88] = psql.Arg(s.Version.MustGet())
|
|
} else {
|
|
vals[88] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.OrganizationID.IsValue() {
|
|
vals[89] = psql.Arg(s.OrganizationID.MustGet())
|
|
} else {
|
|
vals[89] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
|
}))
|
|
}
|
|
|
|
func (s FieldseekerServicerequestSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
|
return um.Set(s.Expressions()...)
|
|
}
|
|
|
|
func (s FieldseekerServicerequestSetter) Expressions(prefix ...string) []bob.Expression {
|
|
exprs := make([]bob.Expression, 0, 90)
|
|
|
|
if s.Objectid.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "objectid")...),
|
|
psql.Arg(s.Objectid),
|
|
}})
|
|
}
|
|
|
|
if !s.Recdatetime.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "recdatetime")...),
|
|
psql.Arg(s.Recdatetime),
|
|
}})
|
|
}
|
|
|
|
if !s.Source.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "source")...),
|
|
psql.Arg(s.Source),
|
|
}})
|
|
}
|
|
|
|
if !s.Entrytech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "entrytech")...),
|
|
psql.Arg(s.Entrytech),
|
|
}})
|
|
}
|
|
|
|
if !s.Priority.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "priority")...),
|
|
psql.Arg(s.Priority),
|
|
}})
|
|
}
|
|
|
|
if !s.Supervisor.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "supervisor")...),
|
|
psql.Arg(s.Supervisor),
|
|
}})
|
|
}
|
|
|
|
if !s.Assignedtech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "assignedtech")...),
|
|
psql.Arg(s.Assignedtech),
|
|
}})
|
|
}
|
|
|
|
if !s.Status.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "status")...),
|
|
psql.Arg(s.Status),
|
|
}})
|
|
}
|
|
|
|
if !s.Clranon.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clranon")...),
|
|
psql.Arg(s.Clranon),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrfname.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrfname")...),
|
|
psql.Arg(s.Clrfname),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrphone1.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrphone1")...),
|
|
psql.Arg(s.Clrphone1),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrphone2.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrphone2")...),
|
|
psql.Arg(s.Clrphone2),
|
|
}})
|
|
}
|
|
|
|
if !s.Clremail.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clremail")...),
|
|
psql.Arg(s.Clremail),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcompany.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcompany")...),
|
|
psql.Arg(s.Clrcompany),
|
|
}})
|
|
}
|
|
|
|
if !s.Clraddr1.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clraddr1")...),
|
|
psql.Arg(s.Clraddr1),
|
|
}})
|
|
}
|
|
|
|
if !s.Clraddr2.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clraddr2")...),
|
|
psql.Arg(s.Clraddr2),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcity.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcity")...),
|
|
psql.Arg(s.Clrcity),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrstate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrstate")...),
|
|
psql.Arg(s.Clrstate),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrzip.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrzip")...),
|
|
psql.Arg(s.Clrzip),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrother.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrother")...),
|
|
psql.Arg(s.Clrother),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcontpref.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcontpref")...),
|
|
psql.Arg(s.Clrcontpref),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqcompany.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqcompany")...),
|
|
psql.Arg(s.Reqcompany),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqaddr1.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqaddr1")...),
|
|
psql.Arg(s.Reqaddr1),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqaddr2.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqaddr2")...),
|
|
psql.Arg(s.Reqaddr2),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqcity.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqcity")...),
|
|
psql.Arg(s.Reqcity),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqstate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqstate")...),
|
|
psql.Arg(s.Reqstate),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqzip.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqzip")...),
|
|
psql.Arg(s.Reqzip),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqcrossst.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqcrossst")...),
|
|
psql.Arg(s.Reqcrossst),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqsubdiv")...),
|
|
psql.Arg(s.Reqsubdiv),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqmapgrid")...),
|
|
psql.Arg(s.Reqmapgrid),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqpermission.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqpermission")...),
|
|
psql.Arg(s.Reqpermission),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqtarget.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqtarget")...),
|
|
psql.Arg(s.Reqtarget),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqdescr.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqdescr")...),
|
|
psql.Arg(s.Reqdescr),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqnotesfortech")...),
|
|
psql.Arg(s.Reqnotesfortech),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqnotesforcust")...),
|
|
psql.Arg(s.Reqnotesforcust),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqfldnotes")...),
|
|
psql.Arg(s.Reqfldnotes),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqprogramactions")...),
|
|
psql.Arg(s.Reqprogramactions),
|
|
}})
|
|
}
|
|
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "datetimeclosed")...),
|
|
psql.Arg(s.Datetimeclosed),
|
|
}})
|
|
}
|
|
|
|
if !s.Techclosed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "techclosed")...),
|
|
psql.Arg(s.Techclosed),
|
|
}})
|
|
}
|
|
|
|
if !s.SRNumber.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "sr_number")...),
|
|
psql.Arg(s.SRNumber),
|
|
}})
|
|
}
|
|
|
|
if !s.Reviewed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reviewed")...),
|
|
psql.Arg(s.Reviewed),
|
|
}})
|
|
}
|
|
|
|
if !s.Reviewedby.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reviewedby")...),
|
|
psql.Arg(s.Reviewedby),
|
|
}})
|
|
}
|
|
|
|
if !s.Revieweddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "revieweddate")...),
|
|
psql.Arg(s.Revieweddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Accepted.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "accepted")...),
|
|
psql.Arg(s.Accepted),
|
|
}})
|
|
}
|
|
|
|
if !s.Accepteddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "accepteddate")...),
|
|
psql.Arg(s.Accepteddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Rejectedby.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "rejectedby")...),
|
|
psql.Arg(s.Rejectedby),
|
|
}})
|
|
}
|
|
|
|
if !s.Rejecteddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "rejecteddate")...),
|
|
psql.Arg(s.Rejecteddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Rejectedreason.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "rejectedreason")...),
|
|
psql.Arg(s.Rejectedreason),
|
|
}})
|
|
}
|
|
|
|
if !s.Duedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "duedate")...),
|
|
psql.Arg(s.Duedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Acceptedby.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "acceptedby")...),
|
|
psql.Arg(s.Acceptedby),
|
|
}})
|
|
}
|
|
|
|
if !s.Comments.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "comments")...),
|
|
psql.Arg(s.Comments),
|
|
}})
|
|
}
|
|
|
|
if !s.Estcompletedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "estcompletedate")...),
|
|
psql.Arg(s.Estcompletedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Nextaction.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "nextaction")...),
|
|
psql.Arg(s.Nextaction),
|
|
}})
|
|
}
|
|
|
|
if !s.Recordstatus.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "recordstatus")...),
|
|
psql.Arg(s.Recordstatus),
|
|
}})
|
|
}
|
|
|
|
if s.Globalid.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "globalid")...),
|
|
psql.Arg(s.Globalid),
|
|
}})
|
|
}
|
|
|
|
if !s.CreatedUser.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "created_user")...),
|
|
psql.Arg(s.CreatedUser),
|
|
}})
|
|
}
|
|
|
|
if !s.CreatedDate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "created_date")...),
|
|
psql.Arg(s.CreatedDate),
|
|
}})
|
|
}
|
|
|
|
if !s.LastEditedUser.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "last_edited_user")...),
|
|
psql.Arg(s.LastEditedUser),
|
|
}})
|
|
}
|
|
|
|
if !s.LastEditedDate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "last_edited_date")...),
|
|
psql.Arg(s.LastEditedDate),
|
|
}})
|
|
}
|
|
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "firstresponsedate")...),
|
|
psql.Arg(s.Firstresponsedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Responsedaycount.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "responsedaycount")...),
|
|
psql.Arg(s.Responsedaycount),
|
|
}})
|
|
}
|
|
|
|
if !s.Allowed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "allowed")...),
|
|
psql.Arg(s.Allowed),
|
|
}})
|
|
}
|
|
|
|
if !s.Xvalue.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "xvalue")...),
|
|
psql.Arg(s.Xvalue),
|
|
}})
|
|
}
|
|
|
|
if !s.Yvalue.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "yvalue")...),
|
|
psql.Arg(s.Yvalue),
|
|
}})
|
|
}
|
|
|
|
if !s.Validx.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "validx")...),
|
|
psql.Arg(s.Validx),
|
|
}})
|
|
}
|
|
|
|
if !s.Validy.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "validy")...),
|
|
psql.Arg(s.Validy),
|
|
}})
|
|
}
|
|
|
|
if !s.Externalid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "externalid")...),
|
|
psql.Arg(s.Externalid),
|
|
}})
|
|
}
|
|
|
|
if !s.Externalerror.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "externalerror")...),
|
|
psql.Arg(s.Externalerror),
|
|
}})
|
|
}
|
|
|
|
if !s.Pointlocid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "pointlocid")...),
|
|
psql.Arg(s.Pointlocid),
|
|
}})
|
|
}
|
|
|
|
if !s.Notified.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "notified")...),
|
|
psql.Arg(s.Notified),
|
|
}})
|
|
}
|
|
|
|
if !s.Notifieddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "notifieddate")...),
|
|
psql.Arg(s.Notifieddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Scheduled.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "scheduled")...),
|
|
psql.Arg(s.Scheduled),
|
|
}})
|
|
}
|
|
|
|
if !s.Scheduleddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "scheduleddate")...),
|
|
psql.Arg(s.Scheduleddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Dog.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "dog")...),
|
|
psql.Arg(s.Dog),
|
|
}})
|
|
}
|
|
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "schedule_period")...),
|
|
psql.Arg(s.SchedulePeriod),
|
|
}})
|
|
}
|
|
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "schedule_notes")...),
|
|
psql.Arg(s.ScheduleNotes),
|
|
}})
|
|
}
|
|
|
|
if !s.Spanish.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "spanish")...),
|
|
psql.Arg(s.Spanish),
|
|
}})
|
|
}
|
|
|
|
if !s.Creationdate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "creationdate")...),
|
|
psql.Arg(s.Creationdate),
|
|
}})
|
|
}
|
|
|
|
if !s.Creator.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "creator")...),
|
|
psql.Arg(s.Creator),
|
|
}})
|
|
}
|
|
|
|
if !s.Editdate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "editdate")...),
|
|
psql.Arg(s.Editdate),
|
|
}})
|
|
}
|
|
|
|
if !s.Editor.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "editor")...),
|
|
psql.Arg(s.Editor),
|
|
}})
|
|
}
|
|
|
|
if !s.Issuesreported.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "issuesreported")...),
|
|
psql.Arg(s.Issuesreported),
|
|
}})
|
|
}
|
|
|
|
if !s.Jurisdiction.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "jurisdiction")...),
|
|
psql.Arg(s.Jurisdiction),
|
|
}})
|
|
}
|
|
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "notificationtimestamp")...),
|
|
psql.Arg(s.Notificationtimestamp),
|
|
}})
|
|
}
|
|
|
|
if !s.Zone.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "zone")...),
|
|
psql.Arg(s.Zone),
|
|
}})
|
|
}
|
|
|
|
if !s.Zone2.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "zone2")...),
|
|
psql.Arg(s.Zone2),
|
|
}})
|
|
}
|
|
|
|
if s.Geometry.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "geometry")...),
|
|
psql.Arg(s.Geometry),
|
|
}})
|
|
}
|
|
|
|
if !s.Geospatial.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "geospatial")...),
|
|
psql.Arg(s.Geospatial),
|
|
}})
|
|
}
|
|
|
|
if s.Version.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "version")...),
|
|
psql.Arg(s.Version),
|
|
}})
|
|
}
|
|
|
|
if s.OrganizationID.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "organization_id")...),
|
|
psql.Arg(s.OrganizationID),
|
|
}})
|
|
}
|
|
|
|
return exprs
|
|
}
|
|
|
|
// FindFieldseekerServicerequest retrieves a single record by primary key
|
|
// If cols is empty Find will return all columns.
|
|
func FindFieldseekerServicerequest(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerServicerequest, error) {
|
|
if len(cols) == 0 {
|
|
return FieldseekerServicerequests.Query(
|
|
sm.Where(FieldseekerServicerequests.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
|
sm.Where(FieldseekerServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
).One(ctx, exec)
|
|
}
|
|
|
|
return FieldseekerServicerequests.Query(
|
|
sm.Where(FieldseekerServicerequests.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
|
sm.Where(FieldseekerServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
sm.Columns(FieldseekerServicerequests.Columns.Only(cols...)),
|
|
).One(ctx, exec)
|
|
}
|
|
|
|
// FieldseekerServicerequestExists checks the presence of a single record by primary key
|
|
func FieldseekerServicerequestExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
|
return FieldseekerServicerequests.Query(
|
|
sm.Where(FieldseekerServicerequests.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
|
sm.Where(FieldseekerServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
).Exists(ctx, exec)
|
|
}
|
|
|
|
// AfterQueryHook is called after FieldseekerServicerequest is retrieved from the database
|
|
func (o *FieldseekerServicerequest) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
|
var err error
|
|
|
|
switch queryType {
|
|
case bob.QueryTypeSelect:
|
|
ctx, err = FieldseekerServicerequests.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o})
|
|
case bob.QueryTypeInsert:
|
|
ctx, err = FieldseekerServicerequests.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o})
|
|
case bob.QueryTypeUpdate:
|
|
ctx, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o})
|
|
case bob.QueryTypeDelete:
|
|
ctx, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o})
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
// primaryKeyVals returns the primary key values of the FieldseekerServicerequest
|
|
func (o *FieldseekerServicerequest) primaryKeyVals() bob.Expression {
|
|
return psql.ArgGroup(
|
|
o.Globalid,
|
|
o.Version,
|
|
)
|
|
}
|
|
|
|
func (o *FieldseekerServicerequest) pkEQ() dialect.Expression {
|
|
return psql.Group(psql.Quote("fieldseeker.servicerequest", "globalid"), psql.Quote("fieldseeker.servicerequest", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
|
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
|
}))
|
|
}
|
|
|
|
// Update uses an executor to update the FieldseekerServicerequest
|
|
func (o *FieldseekerServicerequest) Update(ctx context.Context, exec bob.Executor, s *FieldseekerServicerequestSetter) error {
|
|
v, err := FieldseekerServicerequests.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.R = v.R
|
|
*o = *v
|
|
|
|
return nil
|
|
}
|
|
|
|
// Delete deletes a single FieldseekerServicerequest record with an executor
|
|
func (o *FieldseekerServicerequest) Delete(ctx context.Context, exec bob.Executor) error {
|
|
_, err := FieldseekerServicerequests.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
// Reload refreshes the FieldseekerServicerequest using the executor
|
|
func (o *FieldseekerServicerequest) Reload(ctx context.Context, exec bob.Executor) error {
|
|
o2, err := FieldseekerServicerequests.Query(
|
|
sm.Where(FieldseekerServicerequests.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
|
sm.Where(FieldseekerServicerequests.Columns.Version.EQ(psql.Arg(o.Version))),
|
|
).One(ctx, exec)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
o2.R = o.R
|
|
*o = *o2
|
|
|
|
return nil
|
|
}
|
|
|
|
// AfterQueryHook is called after FieldseekerServicerequestSlice is retrieved from the database
|
|
func (o FieldseekerServicerequestSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
|
var err error
|
|
|
|
switch queryType {
|
|
case bob.QueryTypeSelect:
|
|
ctx, err = FieldseekerServicerequests.AfterSelectHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeInsert:
|
|
ctx, err = FieldseekerServicerequests.AfterInsertHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeUpdate:
|
|
ctx, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeDelete:
|
|
ctx, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
func (o FieldseekerServicerequestSlice) pkIN() dialect.Expression {
|
|
if len(o) == 0 {
|
|
return psql.Raw("NULL")
|
|
}
|
|
|
|
return psql.Group(psql.Quote("fieldseeker.servicerequest", "globalid"), psql.Quote("fieldseeker.servicerequest", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
|
pkPairs := make([]bob.Expression, len(o))
|
|
for i, row := range o {
|
|
pkPairs[i] = row.primaryKeyVals()
|
|
}
|
|
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
|
}))
|
|
}
|
|
|
|
// copyMatchingRows finds models in the given slice that have the same primary key
|
|
// then it first copies the existing relationships from the old model to the new model
|
|
// and then replaces the old model in the slice with the new model
|
|
func (o FieldseekerServicerequestSlice) copyMatchingRows(from ...*FieldseekerServicerequest) {
|
|
for i, old := range o {
|
|
for _, new := range from {
|
|
if new.Globalid != old.Globalid {
|
|
continue
|
|
}
|
|
if new.Version != old.Version {
|
|
continue
|
|
}
|
|
new.R = old.R
|
|
o[i] = new
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
|
func (o FieldseekerServicerequestSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
|
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
|
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
|
return FieldseekerServicerequests.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
|
})
|
|
|
|
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
|
var err error
|
|
switch retrieved := retrieved.(type) {
|
|
case *FieldseekerServicerequest:
|
|
o.copyMatchingRows(retrieved)
|
|
case []*FieldseekerServicerequest:
|
|
o.copyMatchingRows(retrieved...)
|
|
case FieldseekerServicerequestSlice:
|
|
o.copyMatchingRows(retrieved...)
|
|
default:
|
|
// If the retrieved value is not a FieldseekerServicerequest or a slice of FieldseekerServicerequest
|
|
// then run the AfterUpdateHooks on the slice
|
|
_, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}))
|
|
|
|
q.AppendWhere(o.pkIN())
|
|
})
|
|
}
|
|
|
|
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
|
func (o FieldseekerServicerequestSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
|
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
|
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
|
return FieldseekerServicerequests.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
|
})
|
|
|
|
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
|
var err error
|
|
switch retrieved := retrieved.(type) {
|
|
case *FieldseekerServicerequest:
|
|
o.copyMatchingRows(retrieved)
|
|
case []*FieldseekerServicerequest:
|
|
o.copyMatchingRows(retrieved...)
|
|
case FieldseekerServicerequestSlice:
|
|
o.copyMatchingRows(retrieved...)
|
|
default:
|
|
// If the retrieved value is not a FieldseekerServicerequest or a slice of FieldseekerServicerequest
|
|
// then run the AfterDeleteHooks on the slice
|
|
_, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}))
|
|
|
|
q.AppendWhere(o.pkIN())
|
|
})
|
|
}
|
|
|
|
func (o FieldseekerServicerequestSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerServicerequestSetter) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
_, err := FieldseekerServicerequests.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
func (o FieldseekerServicerequestSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
_, err := FieldseekerServicerequests.Delete(o.DeleteMod()).Exec(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
func (o FieldseekerServicerequestSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
o2, err := FieldseekerServicerequests.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.copyMatchingRows(o2...)
|
|
|
|
return nil
|
|
}
|
|
|
|
// Organization starts a query for related objects on organization
|
|
func (o *FieldseekerServicerequest) Organization(mods ...bob.Mod[*dialect.SelectQuery]) OrganizationsQuery {
|
|
return Organizations.Query(append(mods,
|
|
sm.Where(Organizations.Columns.ID.EQ(psql.Arg(o.OrganizationID))),
|
|
)...)
|
|
}
|
|
|
|
func (os FieldseekerServicerequestSlice) Organization(mods ...bob.Mod[*dialect.SelectQuery]) OrganizationsQuery {
|
|
pkOrganizationID := make(pgtypes.Array[int32], 0, len(os))
|
|
for _, o := range os {
|
|
if o == nil {
|
|
continue
|
|
}
|
|
pkOrganizationID = append(pkOrganizationID, o.OrganizationID)
|
|
}
|
|
PKArgExpr := psql.Select(sm.Columns(
|
|
psql.F("unnest", psql.Cast(psql.Arg(pkOrganizationID), "integer[]")),
|
|
))
|
|
|
|
return Organizations.Query(append(mods,
|
|
sm.Where(psql.Group(Organizations.Columns.ID).OP("IN", PKArgExpr)),
|
|
)...)
|
|
}
|
|
|
|
func attachFieldseekerServicerequestOrganization0(ctx context.Context, exec bob.Executor, count int, fieldseekerServicerequest0 *FieldseekerServicerequest, organization1 *Organization) (*FieldseekerServicerequest, error) {
|
|
setter := &FieldseekerServicerequestSetter{
|
|
OrganizationID: omit.From(organization1.ID),
|
|
}
|
|
|
|
err := fieldseekerServicerequest0.Update(ctx, exec, setter)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("attachFieldseekerServicerequestOrganization0: %w", err)
|
|
}
|
|
|
|
return fieldseekerServicerequest0, nil
|
|
}
|
|
|
|
func (fieldseekerServicerequest0 *FieldseekerServicerequest) InsertOrganization(ctx context.Context, exec bob.Executor, related *OrganizationSetter) error {
|
|
var err error
|
|
|
|
organization1, err := Organizations.Insert(related).One(ctx, exec)
|
|
if err != nil {
|
|
return fmt.Errorf("inserting related objects: %w", err)
|
|
}
|
|
|
|
_, err = attachFieldseekerServicerequestOrganization0(ctx, exec, 1, fieldseekerServicerequest0, organization1)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fieldseekerServicerequest0.R.Organization = organization1
|
|
|
|
organization1.R.Servicerequests = append(organization1.R.Servicerequests, fieldseekerServicerequest0)
|
|
|
|
return nil
|
|
}
|
|
|
|
func (fieldseekerServicerequest0 *FieldseekerServicerequest) AttachOrganization(ctx context.Context, exec bob.Executor, organization1 *Organization) error {
|
|
var err error
|
|
|
|
_, err = attachFieldseekerServicerequestOrganization0(ctx, exec, 1, fieldseekerServicerequest0, organization1)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fieldseekerServicerequest0.R.Organization = organization1
|
|
|
|
organization1.R.Servicerequests = append(organization1.R.Servicerequests, fieldseekerServicerequest0)
|
|
|
|
return nil
|
|
}
|
|
|
|
type fieldseekerServicerequestWhere[Q psql.Filterable] struct {
|
|
Objectid psql.WhereMod[Q, int64]
|
|
Recdatetime psql.WhereNullMod[Q, time.Time]
|
|
Source psql.WhereNullMod[Q, string]
|
|
Entrytech psql.WhereNullMod[Q, string]
|
|
Priority psql.WhereNullMod[Q, string]
|
|
Supervisor psql.WhereNullMod[Q, string]
|
|
Assignedtech psql.WhereNullMod[Q, string]
|
|
Status psql.WhereNullMod[Q, string]
|
|
Clranon psql.WhereNullMod[Q, int16]
|
|
Clrfname psql.WhereNullMod[Q, string]
|
|
Clrphone1 psql.WhereNullMod[Q, string]
|
|
Clrphone2 psql.WhereNullMod[Q, string]
|
|
Clremail psql.WhereNullMod[Q, string]
|
|
Clrcompany psql.WhereNullMod[Q, string]
|
|
Clraddr1 psql.WhereNullMod[Q, string]
|
|
Clraddr2 psql.WhereNullMod[Q, string]
|
|
Clrcity psql.WhereNullMod[Q, string]
|
|
Clrstate psql.WhereNullMod[Q, string]
|
|
Clrzip psql.WhereNullMod[Q, string]
|
|
Clrother psql.WhereNullMod[Q, string]
|
|
Clrcontpref psql.WhereNullMod[Q, string]
|
|
Reqcompany psql.WhereNullMod[Q, string]
|
|
Reqaddr1 psql.WhereNullMod[Q, string]
|
|
Reqaddr2 psql.WhereNullMod[Q, string]
|
|
Reqcity psql.WhereNullMod[Q, string]
|
|
Reqstate psql.WhereNullMod[Q, string]
|
|
Reqzip psql.WhereNullMod[Q, string]
|
|
Reqcrossst psql.WhereNullMod[Q, string]
|
|
Reqsubdiv psql.WhereNullMod[Q, string]
|
|
Reqmapgrid psql.WhereNullMod[Q, string]
|
|
Reqpermission psql.WhereNullMod[Q, int16]
|
|
Reqtarget psql.WhereNullMod[Q, string]
|
|
Reqdescr psql.WhereNullMod[Q, string]
|
|
Reqnotesfortech psql.WhereNullMod[Q, string]
|
|
Reqnotesforcust psql.WhereNullMod[Q, string]
|
|
Reqfldnotes psql.WhereNullMod[Q, string]
|
|
Reqprogramactions psql.WhereNullMod[Q, string]
|
|
Datetimeclosed psql.WhereNullMod[Q, time.Time]
|
|
Techclosed psql.WhereNullMod[Q, string]
|
|
SRNumber psql.WhereNullMod[Q, int32]
|
|
Reviewed psql.WhereNullMod[Q, int16]
|
|
Reviewedby psql.WhereNullMod[Q, string]
|
|
Revieweddate psql.WhereNullMod[Q, time.Time]
|
|
Accepted psql.WhereNullMod[Q, int16]
|
|
Accepteddate psql.WhereNullMod[Q, time.Time]
|
|
Rejectedby psql.WhereNullMod[Q, string]
|
|
Rejecteddate psql.WhereNullMod[Q, time.Time]
|
|
Rejectedreason psql.WhereNullMod[Q, string]
|
|
Duedate psql.WhereNullMod[Q, time.Time]
|
|
Acceptedby psql.WhereNullMod[Q, string]
|
|
Comments psql.WhereNullMod[Q, string]
|
|
Estcompletedate psql.WhereNullMod[Q, time.Time]
|
|
Nextaction psql.WhereNullMod[Q, string]
|
|
Recordstatus psql.WhereNullMod[Q, int16]
|
|
Globalid psql.WhereMod[Q, uuid.UUID]
|
|
CreatedUser psql.WhereNullMod[Q, string]
|
|
CreatedDate psql.WhereNullMod[Q, time.Time]
|
|
LastEditedUser psql.WhereNullMod[Q, string]
|
|
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
|
Firstresponsedate psql.WhereNullMod[Q, time.Time]
|
|
Responsedaycount psql.WhereNullMod[Q, int16]
|
|
Allowed psql.WhereNullMod[Q, string]
|
|
Xvalue psql.WhereNullMod[Q, string]
|
|
Yvalue psql.WhereNullMod[Q, string]
|
|
Validx psql.WhereNullMod[Q, string]
|
|
Validy psql.WhereNullMod[Q, string]
|
|
Externalid psql.WhereNullMod[Q, string]
|
|
Externalerror psql.WhereNullMod[Q, string]
|
|
Pointlocid psql.WhereNullMod[Q, uuid.UUID]
|
|
Notified psql.WhereNullMod[Q, int16]
|
|
Notifieddate psql.WhereNullMod[Q, time.Time]
|
|
Scheduled psql.WhereNullMod[Q, int16]
|
|
Scheduleddate psql.WhereNullMod[Q, time.Time]
|
|
Dog psql.WhereNullMod[Q, int32]
|
|
SchedulePeriod psql.WhereNullMod[Q, string]
|
|
ScheduleNotes psql.WhereNullMod[Q, string]
|
|
Spanish psql.WhereNullMod[Q, int32]
|
|
Creationdate psql.WhereNullMod[Q, time.Time]
|
|
Creator psql.WhereNullMod[Q, string]
|
|
Editdate psql.WhereNullMod[Q, time.Time]
|
|
Editor psql.WhereNullMod[Q, string]
|
|
Issuesreported psql.WhereNullMod[Q, string]
|
|
Jurisdiction psql.WhereNullMod[Q, string]
|
|
Notificationtimestamp psql.WhereNullMod[Q, string]
|
|
Zone psql.WhereNullMod[Q, string]
|
|
Zone2 psql.WhereNullMod[Q, string]
|
|
Geometry psql.WhereMod[Q, types.JSON[json.RawMessage]]
|
|
Geospatial psql.WhereNullMod[Q, string]
|
|
Version psql.WhereMod[Q, int32]
|
|
OrganizationID psql.WhereMod[Q, int32]
|
|
H3cell psql.WhereNullMod[Q, string]
|
|
}
|
|
|
|
func (fieldseekerServicerequestWhere[Q]) AliasedAs(alias string) fieldseekerServicerequestWhere[Q] {
|
|
return buildFieldseekerServicerequestWhere[Q](buildFieldseekerServicerequestColumns(alias))
|
|
}
|
|
|
|
func buildFieldseekerServicerequestWhere[Q psql.Filterable](cols fieldseekerServicerequestColumns) fieldseekerServicerequestWhere[Q] {
|
|
return fieldseekerServicerequestWhere[Q]{
|
|
Objectid: psql.Where[Q, int64](cols.Objectid),
|
|
Recdatetime: psql.WhereNull[Q, time.Time](cols.Recdatetime),
|
|
Source: psql.WhereNull[Q, string](cols.Source),
|
|
Entrytech: psql.WhereNull[Q, string](cols.Entrytech),
|
|
Priority: psql.WhereNull[Q, string](cols.Priority),
|
|
Supervisor: psql.WhereNull[Q, string](cols.Supervisor),
|
|
Assignedtech: psql.WhereNull[Q, string](cols.Assignedtech),
|
|
Status: psql.WhereNull[Q, string](cols.Status),
|
|
Clranon: psql.WhereNull[Q, int16](cols.Clranon),
|
|
Clrfname: psql.WhereNull[Q, string](cols.Clrfname),
|
|
Clrphone1: psql.WhereNull[Q, string](cols.Clrphone1),
|
|
Clrphone2: psql.WhereNull[Q, string](cols.Clrphone2),
|
|
Clremail: psql.WhereNull[Q, string](cols.Clremail),
|
|
Clrcompany: psql.WhereNull[Q, string](cols.Clrcompany),
|
|
Clraddr1: psql.WhereNull[Q, string](cols.Clraddr1),
|
|
Clraddr2: psql.WhereNull[Q, string](cols.Clraddr2),
|
|
Clrcity: psql.WhereNull[Q, string](cols.Clrcity),
|
|
Clrstate: psql.WhereNull[Q, string](cols.Clrstate),
|
|
Clrzip: psql.WhereNull[Q, string](cols.Clrzip),
|
|
Clrother: psql.WhereNull[Q, string](cols.Clrother),
|
|
Clrcontpref: psql.WhereNull[Q, string](cols.Clrcontpref),
|
|
Reqcompany: psql.WhereNull[Q, string](cols.Reqcompany),
|
|
Reqaddr1: psql.WhereNull[Q, string](cols.Reqaddr1),
|
|
Reqaddr2: psql.WhereNull[Q, string](cols.Reqaddr2),
|
|
Reqcity: psql.WhereNull[Q, string](cols.Reqcity),
|
|
Reqstate: psql.WhereNull[Q, string](cols.Reqstate),
|
|
Reqzip: psql.WhereNull[Q, string](cols.Reqzip),
|
|
Reqcrossst: psql.WhereNull[Q, string](cols.Reqcrossst),
|
|
Reqsubdiv: psql.WhereNull[Q, string](cols.Reqsubdiv),
|
|
Reqmapgrid: psql.WhereNull[Q, string](cols.Reqmapgrid),
|
|
Reqpermission: psql.WhereNull[Q, int16](cols.Reqpermission),
|
|
Reqtarget: psql.WhereNull[Q, string](cols.Reqtarget),
|
|
Reqdescr: psql.WhereNull[Q, string](cols.Reqdescr),
|
|
Reqnotesfortech: psql.WhereNull[Q, string](cols.Reqnotesfortech),
|
|
Reqnotesforcust: psql.WhereNull[Q, string](cols.Reqnotesforcust),
|
|
Reqfldnotes: psql.WhereNull[Q, string](cols.Reqfldnotes),
|
|
Reqprogramactions: psql.WhereNull[Q, string](cols.Reqprogramactions),
|
|
Datetimeclosed: psql.WhereNull[Q, time.Time](cols.Datetimeclosed),
|
|
Techclosed: psql.WhereNull[Q, string](cols.Techclosed),
|
|
SRNumber: psql.WhereNull[Q, int32](cols.SRNumber),
|
|
Reviewed: psql.WhereNull[Q, int16](cols.Reviewed),
|
|
Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby),
|
|
Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate),
|
|
Accepted: psql.WhereNull[Q, int16](cols.Accepted),
|
|
Accepteddate: psql.WhereNull[Q, time.Time](cols.Accepteddate),
|
|
Rejectedby: psql.WhereNull[Q, string](cols.Rejectedby),
|
|
Rejecteddate: psql.WhereNull[Q, time.Time](cols.Rejecteddate),
|
|
Rejectedreason: psql.WhereNull[Q, string](cols.Rejectedreason),
|
|
Duedate: psql.WhereNull[Q, time.Time](cols.Duedate),
|
|
Acceptedby: psql.WhereNull[Q, string](cols.Acceptedby),
|
|
Comments: psql.WhereNull[Q, string](cols.Comments),
|
|
Estcompletedate: psql.WhereNull[Q, time.Time](cols.Estcompletedate),
|
|
Nextaction: psql.WhereNull[Q, string](cols.Nextaction),
|
|
Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus),
|
|
Globalid: psql.Where[Q, uuid.UUID](cols.Globalid),
|
|
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
|
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
|
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
|
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
|
Firstresponsedate: psql.WhereNull[Q, time.Time](cols.Firstresponsedate),
|
|
Responsedaycount: psql.WhereNull[Q, int16](cols.Responsedaycount),
|
|
Allowed: psql.WhereNull[Q, string](cols.Allowed),
|
|
Xvalue: psql.WhereNull[Q, string](cols.Xvalue),
|
|
Yvalue: psql.WhereNull[Q, string](cols.Yvalue),
|
|
Validx: psql.WhereNull[Q, string](cols.Validx),
|
|
Validy: psql.WhereNull[Q, string](cols.Validy),
|
|
Externalid: psql.WhereNull[Q, string](cols.Externalid),
|
|
Externalerror: psql.WhereNull[Q, string](cols.Externalerror),
|
|
Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid),
|
|
Notified: psql.WhereNull[Q, int16](cols.Notified),
|
|
Notifieddate: psql.WhereNull[Q, time.Time](cols.Notifieddate),
|
|
Scheduled: psql.WhereNull[Q, int16](cols.Scheduled),
|
|
Scheduleddate: psql.WhereNull[Q, time.Time](cols.Scheduleddate),
|
|
Dog: psql.WhereNull[Q, int32](cols.Dog),
|
|
SchedulePeriod: psql.WhereNull[Q, string](cols.SchedulePeriod),
|
|
ScheduleNotes: psql.WhereNull[Q, string](cols.ScheduleNotes),
|
|
Spanish: psql.WhereNull[Q, int32](cols.Spanish),
|
|
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
|
Creator: psql.WhereNull[Q, string](cols.Creator),
|
|
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
|
Editor: psql.WhereNull[Q, string](cols.Editor),
|
|
Issuesreported: psql.WhereNull[Q, string](cols.Issuesreported),
|
|
Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction),
|
|
Notificationtimestamp: psql.WhereNull[Q, string](cols.Notificationtimestamp),
|
|
Zone: psql.WhereNull[Q, string](cols.Zone),
|
|
Zone2: psql.WhereNull[Q, string](cols.Zone2),
|
|
Geometry: psql.Where[Q, types.JSON[json.RawMessage]](cols.Geometry),
|
|
Geospatial: psql.WhereNull[Q, string](cols.Geospatial),
|
|
Version: psql.Where[Q, int32](cols.Version),
|
|
OrganizationID: psql.Where[Q, int32](cols.OrganizationID),
|
|
H3cell: psql.WhereNull[Q, string](cols.H3cell),
|
|
}
|
|
}
|
|
|
|
func (o *FieldseekerServicerequest) Preload(name string, retrieved any) error {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
|
|
switch name {
|
|
case "Organization":
|
|
rel, ok := retrieved.(*Organization)
|
|
if !ok {
|
|
return fmt.Errorf("fieldseekerServicerequest cannot load %T as %q", retrieved, name)
|
|
}
|
|
|
|
o.R.Organization = rel
|
|
|
|
if rel != nil {
|
|
rel.R.Servicerequests = FieldseekerServicerequestSlice{o}
|
|
}
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("fieldseekerServicerequest has no relationship %q", name)
|
|
}
|
|
}
|
|
|
|
type fieldseekerServicerequestPreloader struct {
|
|
Organization func(...psql.PreloadOption) psql.Preloader
|
|
}
|
|
|
|
func buildFieldseekerServicerequestPreloader() fieldseekerServicerequestPreloader {
|
|
return fieldseekerServicerequestPreloader{
|
|
Organization: func(opts ...psql.PreloadOption) psql.Preloader {
|
|
return psql.Preload[*Organization, OrganizationSlice](psql.PreloadRel{
|
|
Name: "Organization",
|
|
Sides: []psql.PreloadSide{
|
|
{
|
|
From: FieldseekerServicerequests,
|
|
To: Organizations,
|
|
FromColumns: []string{"organization_id"},
|
|
ToColumns: []string{"id"},
|
|
},
|
|
},
|
|
}, Organizations.Columns.Names(), opts...)
|
|
},
|
|
}
|
|
}
|
|
|
|
type fieldseekerServicerequestThenLoader[Q orm.Loadable] struct {
|
|
Organization func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
|
}
|
|
|
|
func buildFieldseekerServicerequestThenLoader[Q orm.Loadable]() fieldseekerServicerequestThenLoader[Q] {
|
|
type OrganizationLoadInterface interface {
|
|
LoadOrganization(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error
|
|
}
|
|
|
|
return fieldseekerServicerequestThenLoader[Q]{
|
|
Organization: thenLoadBuilder[Q](
|
|
"Organization",
|
|
func(ctx context.Context, exec bob.Executor, retrieved OrganizationLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
|
return retrieved.LoadOrganization(ctx, exec, mods...)
|
|
},
|
|
),
|
|
}
|
|
}
|
|
|
|
// LoadOrganization loads the fieldseekerServicerequest's Organization into the .R struct
|
|
func (o *FieldseekerServicerequest) LoadOrganization(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
|
|
// Reset the relationship
|
|
o.R.Organization = nil
|
|
|
|
related, err := o.Organization(mods...).One(ctx, exec)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
related.R.Servicerequests = FieldseekerServicerequestSlice{o}
|
|
|
|
o.R.Organization = related
|
|
return nil
|
|
}
|
|
|
|
// LoadOrganization loads the fieldseekerServicerequest's Organization into the .R struct
|
|
func (os FieldseekerServicerequestSlice) LoadOrganization(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
|
if len(os) == 0 {
|
|
return nil
|
|
}
|
|
|
|
organizations, err := os.Organization(mods...).All(ctx, exec)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
for _, o := range os {
|
|
if o == nil {
|
|
continue
|
|
}
|
|
|
|
for _, rel := range organizations {
|
|
|
|
if !(o.OrganizationID == rel.ID) {
|
|
continue
|
|
}
|
|
|
|
rel.R.Servicerequests = append(rel.R.Servicerequests, o)
|
|
|
|
o.R.Organization = rel
|
|
break
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|