This is an intermediate step between shifting from the old fs_* prefixed table names to an entire fieldseeker schema. At this point we have both, and we aren't doing much with the new schema but compiling.
2840 lines
91 KiB
Go
2840 lines
91 KiB
Go
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package models
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"io"
|
|
"time"
|
|
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/stephenafamo/bob"
|
|
"github.com/stephenafamo/bob/dialect/psql"
|
|
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
|
"github.com/stephenafamo/bob/dialect/psql/dm"
|
|
"github.com/stephenafamo/bob/dialect/psql/sm"
|
|
"github.com/stephenafamo/bob/dialect/psql/um"
|
|
"github.com/stephenafamo/bob/expr"
|
|
"github.com/stephenafamo/bob/mods"
|
|
"github.com/stephenafamo/bob/orm"
|
|
"github.com/stephenafamo/bob/types/pgtypes"
|
|
)
|
|
|
|
// HistoryServicerequest is an object representing the database table.
|
|
type HistoryServicerequest struct {
|
|
OrganizationID int32 `db:"organization_id" `
|
|
Accepted null.Val[int16] `db:"accepted" `
|
|
Acceptedby null.Val[string] `db:"acceptedby" `
|
|
Accepteddate null.Val[int64] `db:"accepteddate" `
|
|
Allowed null.Val[string] `db:"allowed" `
|
|
Assignedtech null.Val[string] `db:"assignedtech" `
|
|
Clraddr1 null.Val[string] `db:"clraddr1" `
|
|
Clraddr2 null.Val[string] `db:"clraddr2" `
|
|
Clranon null.Val[int16] `db:"clranon" `
|
|
Clrcity null.Val[string] `db:"clrcity" `
|
|
Clrcompany null.Val[string] `db:"clrcompany" `
|
|
Clrcontpref null.Val[string] `db:"clrcontpref" `
|
|
Clremail null.Val[string] `db:"clremail" `
|
|
Clrfname null.Val[string] `db:"clrfname" `
|
|
Clrother null.Val[string] `db:"clrother" `
|
|
Clrphone1 null.Val[string] `db:"clrphone1" `
|
|
Clrphone2 null.Val[string] `db:"clrphone2" `
|
|
Clrstate null.Val[string] `db:"clrstate" `
|
|
Clrzip null.Val[string] `db:"clrzip" `
|
|
Comments null.Val[string] `db:"comments" `
|
|
Creationdate null.Val[int64] `db:"creationdate" `
|
|
Creator null.Val[string] `db:"creator" `
|
|
Datetimeclosed null.Val[int64] `db:"datetimeclosed" `
|
|
Duedate null.Val[int64] `db:"duedate" `
|
|
Entrytech null.Val[string] `db:"entrytech" `
|
|
Estcompletedate null.Val[int64] `db:"estcompletedate" `
|
|
Externalerror null.Val[string] `db:"externalerror" `
|
|
Externalid null.Val[string] `db:"externalid" `
|
|
Editdate null.Val[int64] `db:"editdate" `
|
|
Editor null.Val[string] `db:"editor" `
|
|
Firstresponsedate null.Val[int64] `db:"firstresponsedate" `
|
|
Globalid null.Val[string] `db:"globalid" `
|
|
Issuesreported null.Val[string] `db:"issuesreported" `
|
|
Jurisdiction null.Val[string] `db:"jurisdiction" `
|
|
Nextaction null.Val[string] `db:"nextaction" `
|
|
Notificationtimestamp null.Val[string] `db:"notificationtimestamp" `
|
|
Notified null.Val[int16] `db:"notified" `
|
|
Notifieddate null.Val[int64] `db:"notifieddate" `
|
|
Objectid int32 `db:"objectid,pk" `
|
|
Pointlocid null.Val[string] `db:"pointlocid" `
|
|
Priority null.Val[string] `db:"priority" `
|
|
Recdatetime null.Val[int64] `db:"recdatetime" `
|
|
Recordstatus null.Val[int16] `db:"recordstatus" `
|
|
Rejectedby null.Val[string] `db:"rejectedby" `
|
|
Rejecteddate null.Val[int64] `db:"rejecteddate" `
|
|
Rejectedreason null.Val[string] `db:"rejectedreason" `
|
|
Reqaddr1 null.Val[string] `db:"reqaddr1" `
|
|
Reqaddr2 null.Val[string] `db:"reqaddr2" `
|
|
Reqcity null.Val[string] `db:"reqcity" `
|
|
Reqcompany null.Val[string] `db:"reqcompany" `
|
|
Reqcrossst null.Val[string] `db:"reqcrossst" `
|
|
Reqdescr null.Val[string] `db:"reqdescr" `
|
|
Reqfldnotes null.Val[string] `db:"reqfldnotes" `
|
|
Reqmapgrid null.Val[string] `db:"reqmapgrid" `
|
|
Reqnotesforcust null.Val[string] `db:"reqnotesforcust" `
|
|
Reqnotesfortech null.Val[string] `db:"reqnotesfortech" `
|
|
Reqpermission null.Val[int16] `db:"reqpermission" `
|
|
Reqprogramactions null.Val[string] `db:"reqprogramactions" `
|
|
Reqstate null.Val[string] `db:"reqstate" `
|
|
Reqsubdiv null.Val[string] `db:"reqsubdiv" `
|
|
Reqtarget null.Val[string] `db:"reqtarget" `
|
|
Reqzip null.Val[string] `db:"reqzip" `
|
|
Responsedaycount null.Val[int16] `db:"responsedaycount" `
|
|
Reviewed null.Val[int16] `db:"reviewed" `
|
|
Reviewedby null.Val[string] `db:"reviewedby" `
|
|
Revieweddate null.Val[int64] `db:"revieweddate" `
|
|
Scheduled null.Val[int16] `db:"scheduled" `
|
|
Scheduleddate null.Val[int64] `db:"scheduleddate" `
|
|
Source null.Val[string] `db:"source" `
|
|
SRNumber null.Val[int64] `db:"sr_number" `
|
|
Status null.Val[string] `db:"status" `
|
|
Supervisor null.Val[string] `db:"supervisor" `
|
|
Techclosed null.Val[string] `db:"techclosed" `
|
|
Validx null.Val[string] `db:"validx" `
|
|
Validy null.Val[string] `db:"validy" `
|
|
Xvalue null.Val[string] `db:"xvalue" `
|
|
Yvalue null.Val[string] `db:"yvalue" `
|
|
Zone null.Val[string] `db:"zone" `
|
|
Zone2 null.Val[string] `db:"zone2" `
|
|
Created null.Val[time.Time] `db:"created" `
|
|
CreatedDate null.Val[int64] `db:"created_date" `
|
|
CreatedUser null.Val[string] `db:"created_user" `
|
|
GeometryX null.Val[float64] `db:"geometry_x" `
|
|
GeometryY null.Val[float64] `db:"geometry_y" `
|
|
LastEditedDate null.Val[int64] `db:"last_edited_date" `
|
|
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
|
Dog null.Val[int64] `db:"dog" `
|
|
Spanish null.Val[int64] `db:"spanish" `
|
|
ScheduleNotes null.Val[string] `db:"schedule_notes" `
|
|
SchedulePeriod null.Val[string] `db:"schedule_period" `
|
|
Version int32 `db:"version,pk" `
|
|
|
|
R historyServicerequestR `db:"-" `
|
|
}
|
|
|
|
// HistoryServicerequestSlice is an alias for a slice of pointers to HistoryServicerequest.
|
|
// This should almost always be used instead of []*HistoryServicerequest.
|
|
type HistoryServicerequestSlice []*HistoryServicerequest
|
|
|
|
// HistoryServicerequests contains methods to work with the history_servicerequest table
|
|
var HistoryServicerequests = psql.NewTablex[*HistoryServicerequest, HistoryServicerequestSlice, *HistoryServicerequestSetter]("", "history_servicerequest", buildHistoryServicerequestColumns("history_servicerequest"))
|
|
|
|
// HistoryServicerequestsQuery is a query on the history_servicerequest table
|
|
type HistoryServicerequestsQuery = *psql.ViewQuery[*HistoryServicerequest, HistoryServicerequestSlice]
|
|
|
|
// historyServicerequestR is where relationships are stored.
|
|
type historyServicerequestR struct {
|
|
Organization *Organization // history_servicerequest.history_servicerequest_organization_id_fkey
|
|
}
|
|
|
|
func buildHistoryServicerequestColumns(alias string) historyServicerequestColumns {
|
|
return historyServicerequestColumns{
|
|
ColumnsExpr: expr.NewColumnsExpr(
|
|
"organization_id", "accepted", "acceptedby", "accepteddate", "allowed", "assignedtech", "clraddr1", "clraddr2", "clranon", "clrcity", "clrcompany", "clrcontpref", "clremail", "clrfname", "clrother", "clrphone1", "clrphone2", "clrstate", "clrzip", "comments", "creationdate", "creator", "datetimeclosed", "duedate", "entrytech", "estcompletedate", "externalerror", "externalid", "editdate", "editor", "firstresponsedate", "globalid", "issuesreported", "jurisdiction", "nextaction", "notificationtimestamp", "notified", "notifieddate", "objectid", "pointlocid", "priority", "recdatetime", "recordstatus", "rejectedby", "rejecteddate", "rejectedreason", "reqaddr1", "reqaddr2", "reqcity", "reqcompany", "reqcrossst", "reqdescr", "reqfldnotes", "reqmapgrid", "reqnotesforcust", "reqnotesfortech", "reqpermission", "reqprogramactions", "reqstate", "reqsubdiv", "reqtarget", "reqzip", "responsedaycount", "reviewed", "reviewedby", "revieweddate", "scheduled", "scheduleddate", "source", "sr_number", "status", "supervisor", "techclosed", "validx", "validy", "xvalue", "yvalue", "zone", "zone2", "created", "created_date", "created_user", "geometry_x", "geometry_y", "last_edited_date", "last_edited_user", "dog", "spanish", "schedule_notes", "schedule_period", "version",
|
|
).WithParent("history_servicerequest"),
|
|
tableAlias: alias,
|
|
OrganizationID: psql.Quote(alias, "organization_id"),
|
|
Accepted: psql.Quote(alias, "accepted"),
|
|
Acceptedby: psql.Quote(alias, "acceptedby"),
|
|
Accepteddate: psql.Quote(alias, "accepteddate"),
|
|
Allowed: psql.Quote(alias, "allowed"),
|
|
Assignedtech: psql.Quote(alias, "assignedtech"),
|
|
Clraddr1: psql.Quote(alias, "clraddr1"),
|
|
Clraddr2: psql.Quote(alias, "clraddr2"),
|
|
Clranon: psql.Quote(alias, "clranon"),
|
|
Clrcity: psql.Quote(alias, "clrcity"),
|
|
Clrcompany: psql.Quote(alias, "clrcompany"),
|
|
Clrcontpref: psql.Quote(alias, "clrcontpref"),
|
|
Clremail: psql.Quote(alias, "clremail"),
|
|
Clrfname: psql.Quote(alias, "clrfname"),
|
|
Clrother: psql.Quote(alias, "clrother"),
|
|
Clrphone1: psql.Quote(alias, "clrphone1"),
|
|
Clrphone2: psql.Quote(alias, "clrphone2"),
|
|
Clrstate: psql.Quote(alias, "clrstate"),
|
|
Clrzip: psql.Quote(alias, "clrzip"),
|
|
Comments: psql.Quote(alias, "comments"),
|
|
Creationdate: psql.Quote(alias, "creationdate"),
|
|
Creator: psql.Quote(alias, "creator"),
|
|
Datetimeclosed: psql.Quote(alias, "datetimeclosed"),
|
|
Duedate: psql.Quote(alias, "duedate"),
|
|
Entrytech: psql.Quote(alias, "entrytech"),
|
|
Estcompletedate: psql.Quote(alias, "estcompletedate"),
|
|
Externalerror: psql.Quote(alias, "externalerror"),
|
|
Externalid: psql.Quote(alias, "externalid"),
|
|
Editdate: psql.Quote(alias, "editdate"),
|
|
Editor: psql.Quote(alias, "editor"),
|
|
Firstresponsedate: psql.Quote(alias, "firstresponsedate"),
|
|
Globalid: psql.Quote(alias, "globalid"),
|
|
Issuesreported: psql.Quote(alias, "issuesreported"),
|
|
Jurisdiction: psql.Quote(alias, "jurisdiction"),
|
|
Nextaction: psql.Quote(alias, "nextaction"),
|
|
Notificationtimestamp: psql.Quote(alias, "notificationtimestamp"),
|
|
Notified: psql.Quote(alias, "notified"),
|
|
Notifieddate: psql.Quote(alias, "notifieddate"),
|
|
Objectid: psql.Quote(alias, "objectid"),
|
|
Pointlocid: psql.Quote(alias, "pointlocid"),
|
|
Priority: psql.Quote(alias, "priority"),
|
|
Recdatetime: psql.Quote(alias, "recdatetime"),
|
|
Recordstatus: psql.Quote(alias, "recordstatus"),
|
|
Rejectedby: psql.Quote(alias, "rejectedby"),
|
|
Rejecteddate: psql.Quote(alias, "rejecteddate"),
|
|
Rejectedreason: psql.Quote(alias, "rejectedreason"),
|
|
Reqaddr1: psql.Quote(alias, "reqaddr1"),
|
|
Reqaddr2: psql.Quote(alias, "reqaddr2"),
|
|
Reqcity: psql.Quote(alias, "reqcity"),
|
|
Reqcompany: psql.Quote(alias, "reqcompany"),
|
|
Reqcrossst: psql.Quote(alias, "reqcrossst"),
|
|
Reqdescr: psql.Quote(alias, "reqdescr"),
|
|
Reqfldnotes: psql.Quote(alias, "reqfldnotes"),
|
|
Reqmapgrid: psql.Quote(alias, "reqmapgrid"),
|
|
Reqnotesforcust: psql.Quote(alias, "reqnotesforcust"),
|
|
Reqnotesfortech: psql.Quote(alias, "reqnotesfortech"),
|
|
Reqpermission: psql.Quote(alias, "reqpermission"),
|
|
Reqprogramactions: psql.Quote(alias, "reqprogramactions"),
|
|
Reqstate: psql.Quote(alias, "reqstate"),
|
|
Reqsubdiv: psql.Quote(alias, "reqsubdiv"),
|
|
Reqtarget: psql.Quote(alias, "reqtarget"),
|
|
Reqzip: psql.Quote(alias, "reqzip"),
|
|
Responsedaycount: psql.Quote(alias, "responsedaycount"),
|
|
Reviewed: psql.Quote(alias, "reviewed"),
|
|
Reviewedby: psql.Quote(alias, "reviewedby"),
|
|
Revieweddate: psql.Quote(alias, "revieweddate"),
|
|
Scheduled: psql.Quote(alias, "scheduled"),
|
|
Scheduleddate: psql.Quote(alias, "scheduleddate"),
|
|
Source: psql.Quote(alias, "source"),
|
|
SRNumber: psql.Quote(alias, "sr_number"),
|
|
Status: psql.Quote(alias, "status"),
|
|
Supervisor: psql.Quote(alias, "supervisor"),
|
|
Techclosed: psql.Quote(alias, "techclosed"),
|
|
Validx: psql.Quote(alias, "validx"),
|
|
Validy: psql.Quote(alias, "validy"),
|
|
Xvalue: psql.Quote(alias, "xvalue"),
|
|
Yvalue: psql.Quote(alias, "yvalue"),
|
|
Zone: psql.Quote(alias, "zone"),
|
|
Zone2: psql.Quote(alias, "zone2"),
|
|
Created: psql.Quote(alias, "created"),
|
|
CreatedDate: psql.Quote(alias, "created_date"),
|
|
CreatedUser: psql.Quote(alias, "created_user"),
|
|
GeometryX: psql.Quote(alias, "geometry_x"),
|
|
GeometryY: psql.Quote(alias, "geometry_y"),
|
|
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
|
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
|
Dog: psql.Quote(alias, "dog"),
|
|
Spanish: psql.Quote(alias, "spanish"),
|
|
ScheduleNotes: psql.Quote(alias, "schedule_notes"),
|
|
SchedulePeriod: psql.Quote(alias, "schedule_period"),
|
|
Version: psql.Quote(alias, "version"),
|
|
}
|
|
}
|
|
|
|
type historyServicerequestColumns struct {
|
|
expr.ColumnsExpr
|
|
tableAlias string
|
|
OrganizationID psql.Expression
|
|
Accepted psql.Expression
|
|
Acceptedby psql.Expression
|
|
Accepteddate psql.Expression
|
|
Allowed psql.Expression
|
|
Assignedtech psql.Expression
|
|
Clraddr1 psql.Expression
|
|
Clraddr2 psql.Expression
|
|
Clranon psql.Expression
|
|
Clrcity psql.Expression
|
|
Clrcompany psql.Expression
|
|
Clrcontpref psql.Expression
|
|
Clremail psql.Expression
|
|
Clrfname psql.Expression
|
|
Clrother psql.Expression
|
|
Clrphone1 psql.Expression
|
|
Clrphone2 psql.Expression
|
|
Clrstate psql.Expression
|
|
Clrzip psql.Expression
|
|
Comments psql.Expression
|
|
Creationdate psql.Expression
|
|
Creator psql.Expression
|
|
Datetimeclosed psql.Expression
|
|
Duedate psql.Expression
|
|
Entrytech psql.Expression
|
|
Estcompletedate psql.Expression
|
|
Externalerror psql.Expression
|
|
Externalid psql.Expression
|
|
Editdate psql.Expression
|
|
Editor psql.Expression
|
|
Firstresponsedate psql.Expression
|
|
Globalid psql.Expression
|
|
Issuesreported psql.Expression
|
|
Jurisdiction psql.Expression
|
|
Nextaction psql.Expression
|
|
Notificationtimestamp psql.Expression
|
|
Notified psql.Expression
|
|
Notifieddate psql.Expression
|
|
Objectid psql.Expression
|
|
Pointlocid psql.Expression
|
|
Priority psql.Expression
|
|
Recdatetime psql.Expression
|
|
Recordstatus psql.Expression
|
|
Rejectedby psql.Expression
|
|
Rejecteddate psql.Expression
|
|
Rejectedreason psql.Expression
|
|
Reqaddr1 psql.Expression
|
|
Reqaddr2 psql.Expression
|
|
Reqcity psql.Expression
|
|
Reqcompany psql.Expression
|
|
Reqcrossst psql.Expression
|
|
Reqdescr psql.Expression
|
|
Reqfldnotes psql.Expression
|
|
Reqmapgrid psql.Expression
|
|
Reqnotesforcust psql.Expression
|
|
Reqnotesfortech psql.Expression
|
|
Reqpermission psql.Expression
|
|
Reqprogramactions psql.Expression
|
|
Reqstate psql.Expression
|
|
Reqsubdiv psql.Expression
|
|
Reqtarget psql.Expression
|
|
Reqzip psql.Expression
|
|
Responsedaycount psql.Expression
|
|
Reviewed psql.Expression
|
|
Reviewedby psql.Expression
|
|
Revieweddate psql.Expression
|
|
Scheduled psql.Expression
|
|
Scheduleddate psql.Expression
|
|
Source psql.Expression
|
|
SRNumber psql.Expression
|
|
Status psql.Expression
|
|
Supervisor psql.Expression
|
|
Techclosed psql.Expression
|
|
Validx psql.Expression
|
|
Validy psql.Expression
|
|
Xvalue psql.Expression
|
|
Yvalue psql.Expression
|
|
Zone psql.Expression
|
|
Zone2 psql.Expression
|
|
Created psql.Expression
|
|
CreatedDate psql.Expression
|
|
CreatedUser psql.Expression
|
|
GeometryX psql.Expression
|
|
GeometryY psql.Expression
|
|
LastEditedDate psql.Expression
|
|
LastEditedUser psql.Expression
|
|
Dog psql.Expression
|
|
Spanish psql.Expression
|
|
ScheduleNotes psql.Expression
|
|
SchedulePeriod psql.Expression
|
|
Version psql.Expression
|
|
}
|
|
|
|
func (c historyServicerequestColumns) Alias() string {
|
|
return c.tableAlias
|
|
}
|
|
|
|
func (historyServicerequestColumns) AliasedAs(alias string) historyServicerequestColumns {
|
|
return buildHistoryServicerequestColumns(alias)
|
|
}
|
|
|
|
// HistoryServicerequestSetter is used for insert/upsert/update operations
|
|
// All values are optional, and do not have to be set
|
|
// Generated columns are not included
|
|
type HistoryServicerequestSetter struct {
|
|
OrganizationID omit.Val[int32] `db:"organization_id" `
|
|
Accepted omitnull.Val[int16] `db:"accepted" `
|
|
Acceptedby omitnull.Val[string] `db:"acceptedby" `
|
|
Accepteddate omitnull.Val[int64] `db:"accepteddate" `
|
|
Allowed omitnull.Val[string] `db:"allowed" `
|
|
Assignedtech omitnull.Val[string] `db:"assignedtech" `
|
|
Clraddr1 omitnull.Val[string] `db:"clraddr1" `
|
|
Clraddr2 omitnull.Val[string] `db:"clraddr2" `
|
|
Clranon omitnull.Val[int16] `db:"clranon" `
|
|
Clrcity omitnull.Val[string] `db:"clrcity" `
|
|
Clrcompany omitnull.Val[string] `db:"clrcompany" `
|
|
Clrcontpref omitnull.Val[string] `db:"clrcontpref" `
|
|
Clremail omitnull.Val[string] `db:"clremail" `
|
|
Clrfname omitnull.Val[string] `db:"clrfname" `
|
|
Clrother omitnull.Val[string] `db:"clrother" `
|
|
Clrphone1 omitnull.Val[string] `db:"clrphone1" `
|
|
Clrphone2 omitnull.Val[string] `db:"clrphone2" `
|
|
Clrstate omitnull.Val[string] `db:"clrstate" `
|
|
Clrzip omitnull.Val[string] `db:"clrzip" `
|
|
Comments omitnull.Val[string] `db:"comments" `
|
|
Creationdate omitnull.Val[int64] `db:"creationdate" `
|
|
Creator omitnull.Val[string] `db:"creator" `
|
|
Datetimeclosed omitnull.Val[int64] `db:"datetimeclosed" `
|
|
Duedate omitnull.Val[int64] `db:"duedate" `
|
|
Entrytech omitnull.Val[string] `db:"entrytech" `
|
|
Estcompletedate omitnull.Val[int64] `db:"estcompletedate" `
|
|
Externalerror omitnull.Val[string] `db:"externalerror" `
|
|
Externalid omitnull.Val[string] `db:"externalid" `
|
|
Editdate omitnull.Val[int64] `db:"editdate" `
|
|
Editor omitnull.Val[string] `db:"editor" `
|
|
Firstresponsedate omitnull.Val[int64] `db:"firstresponsedate" `
|
|
Globalid omitnull.Val[string] `db:"globalid" `
|
|
Issuesreported omitnull.Val[string] `db:"issuesreported" `
|
|
Jurisdiction omitnull.Val[string] `db:"jurisdiction" `
|
|
Nextaction omitnull.Val[string] `db:"nextaction" `
|
|
Notificationtimestamp omitnull.Val[string] `db:"notificationtimestamp" `
|
|
Notified omitnull.Val[int16] `db:"notified" `
|
|
Notifieddate omitnull.Val[int64] `db:"notifieddate" `
|
|
Objectid omit.Val[int32] `db:"objectid,pk" `
|
|
Pointlocid omitnull.Val[string] `db:"pointlocid" `
|
|
Priority omitnull.Val[string] `db:"priority" `
|
|
Recdatetime omitnull.Val[int64] `db:"recdatetime" `
|
|
Recordstatus omitnull.Val[int16] `db:"recordstatus" `
|
|
Rejectedby omitnull.Val[string] `db:"rejectedby" `
|
|
Rejecteddate omitnull.Val[int64] `db:"rejecteddate" `
|
|
Rejectedreason omitnull.Val[string] `db:"rejectedreason" `
|
|
Reqaddr1 omitnull.Val[string] `db:"reqaddr1" `
|
|
Reqaddr2 omitnull.Val[string] `db:"reqaddr2" `
|
|
Reqcity omitnull.Val[string] `db:"reqcity" `
|
|
Reqcompany omitnull.Val[string] `db:"reqcompany" `
|
|
Reqcrossst omitnull.Val[string] `db:"reqcrossst" `
|
|
Reqdescr omitnull.Val[string] `db:"reqdescr" `
|
|
Reqfldnotes omitnull.Val[string] `db:"reqfldnotes" `
|
|
Reqmapgrid omitnull.Val[string] `db:"reqmapgrid" `
|
|
Reqnotesforcust omitnull.Val[string] `db:"reqnotesforcust" `
|
|
Reqnotesfortech omitnull.Val[string] `db:"reqnotesfortech" `
|
|
Reqpermission omitnull.Val[int16] `db:"reqpermission" `
|
|
Reqprogramactions omitnull.Val[string] `db:"reqprogramactions" `
|
|
Reqstate omitnull.Val[string] `db:"reqstate" `
|
|
Reqsubdiv omitnull.Val[string] `db:"reqsubdiv" `
|
|
Reqtarget omitnull.Val[string] `db:"reqtarget" `
|
|
Reqzip omitnull.Val[string] `db:"reqzip" `
|
|
Responsedaycount omitnull.Val[int16] `db:"responsedaycount" `
|
|
Reviewed omitnull.Val[int16] `db:"reviewed" `
|
|
Reviewedby omitnull.Val[string] `db:"reviewedby" `
|
|
Revieweddate omitnull.Val[int64] `db:"revieweddate" `
|
|
Scheduled omitnull.Val[int16] `db:"scheduled" `
|
|
Scheduleddate omitnull.Val[int64] `db:"scheduleddate" `
|
|
Source omitnull.Val[string] `db:"source" `
|
|
SRNumber omitnull.Val[int64] `db:"sr_number" `
|
|
Status omitnull.Val[string] `db:"status" `
|
|
Supervisor omitnull.Val[string] `db:"supervisor" `
|
|
Techclosed omitnull.Val[string] `db:"techclosed" `
|
|
Validx omitnull.Val[string] `db:"validx" `
|
|
Validy omitnull.Val[string] `db:"validy" `
|
|
Xvalue omitnull.Val[string] `db:"xvalue" `
|
|
Yvalue omitnull.Val[string] `db:"yvalue" `
|
|
Zone omitnull.Val[string] `db:"zone" `
|
|
Zone2 omitnull.Val[string] `db:"zone2" `
|
|
Created omitnull.Val[time.Time] `db:"created" `
|
|
CreatedDate omitnull.Val[int64] `db:"created_date" `
|
|
CreatedUser omitnull.Val[string] `db:"created_user" `
|
|
GeometryX omitnull.Val[float64] `db:"geometry_x" `
|
|
GeometryY omitnull.Val[float64] `db:"geometry_y" `
|
|
LastEditedDate omitnull.Val[int64] `db:"last_edited_date" `
|
|
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
|
Dog omitnull.Val[int64] `db:"dog" `
|
|
Spanish omitnull.Val[int64] `db:"spanish" `
|
|
ScheduleNotes omitnull.Val[string] `db:"schedule_notes" `
|
|
SchedulePeriod omitnull.Val[string] `db:"schedule_period" `
|
|
Version omit.Val[int32] `db:"version,pk" `
|
|
}
|
|
|
|
func (s HistoryServicerequestSetter) SetColumns() []string {
|
|
vals := make([]string, 0, 91)
|
|
if s.OrganizationID.IsValue() {
|
|
vals = append(vals, "organization_id")
|
|
}
|
|
if !s.Accepted.IsUnset() {
|
|
vals = append(vals, "accepted")
|
|
}
|
|
if !s.Acceptedby.IsUnset() {
|
|
vals = append(vals, "acceptedby")
|
|
}
|
|
if !s.Accepteddate.IsUnset() {
|
|
vals = append(vals, "accepteddate")
|
|
}
|
|
if !s.Allowed.IsUnset() {
|
|
vals = append(vals, "allowed")
|
|
}
|
|
if !s.Assignedtech.IsUnset() {
|
|
vals = append(vals, "assignedtech")
|
|
}
|
|
if !s.Clraddr1.IsUnset() {
|
|
vals = append(vals, "clraddr1")
|
|
}
|
|
if !s.Clraddr2.IsUnset() {
|
|
vals = append(vals, "clraddr2")
|
|
}
|
|
if !s.Clranon.IsUnset() {
|
|
vals = append(vals, "clranon")
|
|
}
|
|
if !s.Clrcity.IsUnset() {
|
|
vals = append(vals, "clrcity")
|
|
}
|
|
if !s.Clrcompany.IsUnset() {
|
|
vals = append(vals, "clrcompany")
|
|
}
|
|
if !s.Clrcontpref.IsUnset() {
|
|
vals = append(vals, "clrcontpref")
|
|
}
|
|
if !s.Clremail.IsUnset() {
|
|
vals = append(vals, "clremail")
|
|
}
|
|
if !s.Clrfname.IsUnset() {
|
|
vals = append(vals, "clrfname")
|
|
}
|
|
if !s.Clrother.IsUnset() {
|
|
vals = append(vals, "clrother")
|
|
}
|
|
if !s.Clrphone1.IsUnset() {
|
|
vals = append(vals, "clrphone1")
|
|
}
|
|
if !s.Clrphone2.IsUnset() {
|
|
vals = append(vals, "clrphone2")
|
|
}
|
|
if !s.Clrstate.IsUnset() {
|
|
vals = append(vals, "clrstate")
|
|
}
|
|
if !s.Clrzip.IsUnset() {
|
|
vals = append(vals, "clrzip")
|
|
}
|
|
if !s.Comments.IsUnset() {
|
|
vals = append(vals, "comments")
|
|
}
|
|
if !s.Creationdate.IsUnset() {
|
|
vals = append(vals, "creationdate")
|
|
}
|
|
if !s.Creator.IsUnset() {
|
|
vals = append(vals, "creator")
|
|
}
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
vals = append(vals, "datetimeclosed")
|
|
}
|
|
if !s.Duedate.IsUnset() {
|
|
vals = append(vals, "duedate")
|
|
}
|
|
if !s.Entrytech.IsUnset() {
|
|
vals = append(vals, "entrytech")
|
|
}
|
|
if !s.Estcompletedate.IsUnset() {
|
|
vals = append(vals, "estcompletedate")
|
|
}
|
|
if !s.Externalerror.IsUnset() {
|
|
vals = append(vals, "externalerror")
|
|
}
|
|
if !s.Externalid.IsUnset() {
|
|
vals = append(vals, "externalid")
|
|
}
|
|
if !s.Editdate.IsUnset() {
|
|
vals = append(vals, "editdate")
|
|
}
|
|
if !s.Editor.IsUnset() {
|
|
vals = append(vals, "editor")
|
|
}
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
vals = append(vals, "firstresponsedate")
|
|
}
|
|
if !s.Globalid.IsUnset() {
|
|
vals = append(vals, "globalid")
|
|
}
|
|
if !s.Issuesreported.IsUnset() {
|
|
vals = append(vals, "issuesreported")
|
|
}
|
|
if !s.Jurisdiction.IsUnset() {
|
|
vals = append(vals, "jurisdiction")
|
|
}
|
|
if !s.Nextaction.IsUnset() {
|
|
vals = append(vals, "nextaction")
|
|
}
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
vals = append(vals, "notificationtimestamp")
|
|
}
|
|
if !s.Notified.IsUnset() {
|
|
vals = append(vals, "notified")
|
|
}
|
|
if !s.Notifieddate.IsUnset() {
|
|
vals = append(vals, "notifieddate")
|
|
}
|
|
if s.Objectid.IsValue() {
|
|
vals = append(vals, "objectid")
|
|
}
|
|
if !s.Pointlocid.IsUnset() {
|
|
vals = append(vals, "pointlocid")
|
|
}
|
|
if !s.Priority.IsUnset() {
|
|
vals = append(vals, "priority")
|
|
}
|
|
if !s.Recdatetime.IsUnset() {
|
|
vals = append(vals, "recdatetime")
|
|
}
|
|
if !s.Recordstatus.IsUnset() {
|
|
vals = append(vals, "recordstatus")
|
|
}
|
|
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.Reqaddr1.IsUnset() {
|
|
vals = append(vals, "reqaddr1")
|
|
}
|
|
if !s.Reqaddr2.IsUnset() {
|
|
vals = append(vals, "reqaddr2")
|
|
}
|
|
if !s.Reqcity.IsUnset() {
|
|
vals = append(vals, "reqcity")
|
|
}
|
|
if !s.Reqcompany.IsUnset() {
|
|
vals = append(vals, "reqcompany")
|
|
}
|
|
if !s.Reqcrossst.IsUnset() {
|
|
vals = append(vals, "reqcrossst")
|
|
}
|
|
if !s.Reqdescr.IsUnset() {
|
|
vals = append(vals, "reqdescr")
|
|
}
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
vals = append(vals, "reqfldnotes")
|
|
}
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
vals = append(vals, "reqmapgrid")
|
|
}
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
vals = append(vals, "reqnotesforcust")
|
|
}
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
vals = append(vals, "reqnotesfortech")
|
|
}
|
|
if !s.Reqpermission.IsUnset() {
|
|
vals = append(vals, "reqpermission")
|
|
}
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
vals = append(vals, "reqprogramactions")
|
|
}
|
|
if !s.Reqstate.IsUnset() {
|
|
vals = append(vals, "reqstate")
|
|
}
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
vals = append(vals, "reqsubdiv")
|
|
}
|
|
if !s.Reqtarget.IsUnset() {
|
|
vals = append(vals, "reqtarget")
|
|
}
|
|
if !s.Reqzip.IsUnset() {
|
|
vals = append(vals, "reqzip")
|
|
}
|
|
if !s.Responsedaycount.IsUnset() {
|
|
vals = append(vals, "responsedaycount")
|
|
}
|
|
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.Scheduled.IsUnset() {
|
|
vals = append(vals, "scheduled")
|
|
}
|
|
if !s.Scheduleddate.IsUnset() {
|
|
vals = append(vals, "scheduleddate")
|
|
}
|
|
if !s.Source.IsUnset() {
|
|
vals = append(vals, "source")
|
|
}
|
|
if !s.SRNumber.IsUnset() {
|
|
vals = append(vals, "sr_number")
|
|
}
|
|
if !s.Status.IsUnset() {
|
|
vals = append(vals, "status")
|
|
}
|
|
if !s.Supervisor.IsUnset() {
|
|
vals = append(vals, "supervisor")
|
|
}
|
|
if !s.Techclosed.IsUnset() {
|
|
vals = append(vals, "techclosed")
|
|
}
|
|
if !s.Validx.IsUnset() {
|
|
vals = append(vals, "validx")
|
|
}
|
|
if !s.Validy.IsUnset() {
|
|
vals = append(vals, "validy")
|
|
}
|
|
if !s.Xvalue.IsUnset() {
|
|
vals = append(vals, "xvalue")
|
|
}
|
|
if !s.Yvalue.IsUnset() {
|
|
vals = append(vals, "yvalue")
|
|
}
|
|
if !s.Zone.IsUnset() {
|
|
vals = append(vals, "zone")
|
|
}
|
|
if !s.Zone2.IsUnset() {
|
|
vals = append(vals, "zone2")
|
|
}
|
|
if !s.Created.IsUnset() {
|
|
vals = append(vals, "created")
|
|
}
|
|
if !s.CreatedDate.IsUnset() {
|
|
vals = append(vals, "created_date")
|
|
}
|
|
if !s.CreatedUser.IsUnset() {
|
|
vals = append(vals, "created_user")
|
|
}
|
|
if !s.GeometryX.IsUnset() {
|
|
vals = append(vals, "geometry_x")
|
|
}
|
|
if !s.GeometryY.IsUnset() {
|
|
vals = append(vals, "geometry_y")
|
|
}
|
|
if !s.LastEditedDate.IsUnset() {
|
|
vals = append(vals, "last_edited_date")
|
|
}
|
|
if !s.LastEditedUser.IsUnset() {
|
|
vals = append(vals, "last_edited_user")
|
|
}
|
|
if !s.Dog.IsUnset() {
|
|
vals = append(vals, "dog")
|
|
}
|
|
if !s.Spanish.IsUnset() {
|
|
vals = append(vals, "spanish")
|
|
}
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
vals = append(vals, "schedule_notes")
|
|
}
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
vals = append(vals, "schedule_period")
|
|
}
|
|
if s.Version.IsValue() {
|
|
vals = append(vals, "version")
|
|
}
|
|
return vals
|
|
}
|
|
|
|
func (s HistoryServicerequestSetter) Overwrite(t *HistoryServicerequest) {
|
|
if s.OrganizationID.IsValue() {
|
|
t.OrganizationID = s.OrganizationID.MustGet()
|
|
}
|
|
if !s.Accepted.IsUnset() {
|
|
t.Accepted = s.Accepted.MustGetNull()
|
|
}
|
|
if !s.Acceptedby.IsUnset() {
|
|
t.Acceptedby = s.Acceptedby.MustGetNull()
|
|
}
|
|
if !s.Accepteddate.IsUnset() {
|
|
t.Accepteddate = s.Accepteddate.MustGetNull()
|
|
}
|
|
if !s.Allowed.IsUnset() {
|
|
t.Allowed = s.Allowed.MustGetNull()
|
|
}
|
|
if !s.Assignedtech.IsUnset() {
|
|
t.Assignedtech = s.Assignedtech.MustGetNull()
|
|
}
|
|
if !s.Clraddr1.IsUnset() {
|
|
t.Clraddr1 = s.Clraddr1.MustGetNull()
|
|
}
|
|
if !s.Clraddr2.IsUnset() {
|
|
t.Clraddr2 = s.Clraddr2.MustGetNull()
|
|
}
|
|
if !s.Clranon.IsUnset() {
|
|
t.Clranon = s.Clranon.MustGetNull()
|
|
}
|
|
if !s.Clrcity.IsUnset() {
|
|
t.Clrcity = s.Clrcity.MustGetNull()
|
|
}
|
|
if !s.Clrcompany.IsUnset() {
|
|
t.Clrcompany = s.Clrcompany.MustGetNull()
|
|
}
|
|
if !s.Clrcontpref.IsUnset() {
|
|
t.Clrcontpref = s.Clrcontpref.MustGetNull()
|
|
}
|
|
if !s.Clremail.IsUnset() {
|
|
t.Clremail = s.Clremail.MustGetNull()
|
|
}
|
|
if !s.Clrfname.IsUnset() {
|
|
t.Clrfname = s.Clrfname.MustGetNull()
|
|
}
|
|
if !s.Clrother.IsUnset() {
|
|
t.Clrother = s.Clrother.MustGetNull()
|
|
}
|
|
if !s.Clrphone1.IsUnset() {
|
|
t.Clrphone1 = s.Clrphone1.MustGetNull()
|
|
}
|
|
if !s.Clrphone2.IsUnset() {
|
|
t.Clrphone2 = s.Clrphone2.MustGetNull()
|
|
}
|
|
if !s.Clrstate.IsUnset() {
|
|
t.Clrstate = s.Clrstate.MustGetNull()
|
|
}
|
|
if !s.Clrzip.IsUnset() {
|
|
t.Clrzip = s.Clrzip.MustGetNull()
|
|
}
|
|
if !s.Comments.IsUnset() {
|
|
t.Comments = s.Comments.MustGetNull()
|
|
}
|
|
if !s.Creationdate.IsUnset() {
|
|
t.Creationdate = s.Creationdate.MustGetNull()
|
|
}
|
|
if !s.Creator.IsUnset() {
|
|
t.Creator = s.Creator.MustGetNull()
|
|
}
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
t.Datetimeclosed = s.Datetimeclosed.MustGetNull()
|
|
}
|
|
if !s.Duedate.IsUnset() {
|
|
t.Duedate = s.Duedate.MustGetNull()
|
|
}
|
|
if !s.Entrytech.IsUnset() {
|
|
t.Entrytech = s.Entrytech.MustGetNull()
|
|
}
|
|
if !s.Estcompletedate.IsUnset() {
|
|
t.Estcompletedate = s.Estcompletedate.MustGetNull()
|
|
}
|
|
if !s.Externalerror.IsUnset() {
|
|
t.Externalerror = s.Externalerror.MustGetNull()
|
|
}
|
|
if !s.Externalid.IsUnset() {
|
|
t.Externalid = s.Externalid.MustGetNull()
|
|
}
|
|
if !s.Editdate.IsUnset() {
|
|
t.Editdate = s.Editdate.MustGetNull()
|
|
}
|
|
if !s.Editor.IsUnset() {
|
|
t.Editor = s.Editor.MustGetNull()
|
|
}
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
t.Firstresponsedate = s.Firstresponsedate.MustGetNull()
|
|
}
|
|
if !s.Globalid.IsUnset() {
|
|
t.Globalid = s.Globalid.MustGetNull()
|
|
}
|
|
if !s.Issuesreported.IsUnset() {
|
|
t.Issuesreported = s.Issuesreported.MustGetNull()
|
|
}
|
|
if !s.Jurisdiction.IsUnset() {
|
|
t.Jurisdiction = s.Jurisdiction.MustGetNull()
|
|
}
|
|
if !s.Nextaction.IsUnset() {
|
|
t.Nextaction = s.Nextaction.MustGetNull()
|
|
}
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
t.Notificationtimestamp = s.Notificationtimestamp.MustGetNull()
|
|
}
|
|
if !s.Notified.IsUnset() {
|
|
t.Notified = s.Notified.MustGetNull()
|
|
}
|
|
if !s.Notifieddate.IsUnset() {
|
|
t.Notifieddate = s.Notifieddate.MustGetNull()
|
|
}
|
|
if s.Objectid.IsValue() {
|
|
t.Objectid = s.Objectid.MustGet()
|
|
}
|
|
if !s.Pointlocid.IsUnset() {
|
|
t.Pointlocid = s.Pointlocid.MustGetNull()
|
|
}
|
|
if !s.Priority.IsUnset() {
|
|
t.Priority = s.Priority.MustGetNull()
|
|
}
|
|
if !s.Recdatetime.IsUnset() {
|
|
t.Recdatetime = s.Recdatetime.MustGetNull()
|
|
}
|
|
if !s.Recordstatus.IsUnset() {
|
|
t.Recordstatus = s.Recordstatus.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.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.Reqcompany.IsUnset() {
|
|
t.Reqcompany = s.Reqcompany.MustGetNull()
|
|
}
|
|
if !s.Reqcrossst.IsUnset() {
|
|
t.Reqcrossst = s.Reqcrossst.MustGetNull()
|
|
}
|
|
if !s.Reqdescr.IsUnset() {
|
|
t.Reqdescr = s.Reqdescr.MustGetNull()
|
|
}
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
t.Reqfldnotes = s.Reqfldnotes.MustGetNull()
|
|
}
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
t.Reqmapgrid = s.Reqmapgrid.MustGetNull()
|
|
}
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
t.Reqnotesforcust = s.Reqnotesforcust.MustGetNull()
|
|
}
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
t.Reqnotesfortech = s.Reqnotesfortech.MustGetNull()
|
|
}
|
|
if !s.Reqpermission.IsUnset() {
|
|
t.Reqpermission = s.Reqpermission.MustGetNull()
|
|
}
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
t.Reqprogramactions = s.Reqprogramactions.MustGetNull()
|
|
}
|
|
if !s.Reqstate.IsUnset() {
|
|
t.Reqstate = s.Reqstate.MustGetNull()
|
|
}
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
t.Reqsubdiv = s.Reqsubdiv.MustGetNull()
|
|
}
|
|
if !s.Reqtarget.IsUnset() {
|
|
t.Reqtarget = s.Reqtarget.MustGetNull()
|
|
}
|
|
if !s.Reqzip.IsUnset() {
|
|
t.Reqzip = s.Reqzip.MustGetNull()
|
|
}
|
|
if !s.Responsedaycount.IsUnset() {
|
|
t.Responsedaycount = s.Responsedaycount.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.Scheduled.IsUnset() {
|
|
t.Scheduled = s.Scheduled.MustGetNull()
|
|
}
|
|
if !s.Scheduleddate.IsUnset() {
|
|
t.Scheduleddate = s.Scheduleddate.MustGetNull()
|
|
}
|
|
if !s.Source.IsUnset() {
|
|
t.Source = s.Source.MustGetNull()
|
|
}
|
|
if !s.SRNumber.IsUnset() {
|
|
t.SRNumber = s.SRNumber.MustGetNull()
|
|
}
|
|
if !s.Status.IsUnset() {
|
|
t.Status = s.Status.MustGetNull()
|
|
}
|
|
if !s.Supervisor.IsUnset() {
|
|
t.Supervisor = s.Supervisor.MustGetNull()
|
|
}
|
|
if !s.Techclosed.IsUnset() {
|
|
t.Techclosed = s.Techclosed.MustGetNull()
|
|
}
|
|
if !s.Validx.IsUnset() {
|
|
t.Validx = s.Validx.MustGetNull()
|
|
}
|
|
if !s.Validy.IsUnset() {
|
|
t.Validy = s.Validy.MustGetNull()
|
|
}
|
|
if !s.Xvalue.IsUnset() {
|
|
t.Xvalue = s.Xvalue.MustGetNull()
|
|
}
|
|
if !s.Yvalue.IsUnset() {
|
|
t.Yvalue = s.Yvalue.MustGetNull()
|
|
}
|
|
if !s.Zone.IsUnset() {
|
|
t.Zone = s.Zone.MustGetNull()
|
|
}
|
|
if !s.Zone2.IsUnset() {
|
|
t.Zone2 = s.Zone2.MustGetNull()
|
|
}
|
|
if !s.Created.IsUnset() {
|
|
t.Created = s.Created.MustGetNull()
|
|
}
|
|
if !s.CreatedDate.IsUnset() {
|
|
t.CreatedDate = s.CreatedDate.MustGetNull()
|
|
}
|
|
if !s.CreatedUser.IsUnset() {
|
|
t.CreatedUser = s.CreatedUser.MustGetNull()
|
|
}
|
|
if !s.GeometryX.IsUnset() {
|
|
t.GeometryX = s.GeometryX.MustGetNull()
|
|
}
|
|
if !s.GeometryY.IsUnset() {
|
|
t.GeometryY = s.GeometryY.MustGetNull()
|
|
}
|
|
if !s.LastEditedDate.IsUnset() {
|
|
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
|
}
|
|
if !s.LastEditedUser.IsUnset() {
|
|
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
|
}
|
|
if !s.Dog.IsUnset() {
|
|
t.Dog = s.Dog.MustGetNull()
|
|
}
|
|
if !s.Spanish.IsUnset() {
|
|
t.Spanish = s.Spanish.MustGetNull()
|
|
}
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
t.ScheduleNotes = s.ScheduleNotes.MustGetNull()
|
|
}
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
t.SchedulePeriod = s.SchedulePeriod.MustGetNull()
|
|
}
|
|
if s.Version.IsValue() {
|
|
t.Version = s.Version.MustGet()
|
|
}
|
|
}
|
|
|
|
func (s *HistoryServicerequestSetter) Apply(q *dialect.InsertQuery) {
|
|
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
|
return HistoryServicerequests.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, 91)
|
|
if s.OrganizationID.IsValue() {
|
|
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
|
} else {
|
|
vals[0] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Accepted.IsUnset() {
|
|
vals[1] = psql.Arg(s.Accepted.MustGetNull())
|
|
} else {
|
|
vals[1] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Acceptedby.IsUnset() {
|
|
vals[2] = psql.Arg(s.Acceptedby.MustGetNull())
|
|
} else {
|
|
vals[2] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Accepteddate.IsUnset() {
|
|
vals[3] = psql.Arg(s.Accepteddate.MustGetNull())
|
|
} else {
|
|
vals[3] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Allowed.IsUnset() {
|
|
vals[4] = psql.Arg(s.Allowed.MustGetNull())
|
|
} else {
|
|
vals[4] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Assignedtech.IsUnset() {
|
|
vals[5] = psql.Arg(s.Assignedtech.MustGetNull())
|
|
} else {
|
|
vals[5] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clraddr1.IsUnset() {
|
|
vals[6] = psql.Arg(s.Clraddr1.MustGetNull())
|
|
} else {
|
|
vals[6] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clraddr2.IsUnset() {
|
|
vals[7] = psql.Arg(s.Clraddr2.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.Clrcity.IsUnset() {
|
|
vals[9] = psql.Arg(s.Clrcity.MustGetNull())
|
|
} else {
|
|
vals[9] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrcompany.IsUnset() {
|
|
vals[10] = psql.Arg(s.Clrcompany.MustGetNull())
|
|
} else {
|
|
vals[10] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrcontpref.IsUnset() {
|
|
vals[11] = psql.Arg(s.Clrcontpref.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.Clrfname.IsUnset() {
|
|
vals[13] = psql.Arg(s.Clrfname.MustGetNull())
|
|
} else {
|
|
vals[13] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrother.IsUnset() {
|
|
vals[14] = psql.Arg(s.Clrother.MustGetNull())
|
|
} else {
|
|
vals[14] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrphone1.IsUnset() {
|
|
vals[15] = psql.Arg(s.Clrphone1.MustGetNull())
|
|
} else {
|
|
vals[15] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Clrphone2.IsUnset() {
|
|
vals[16] = psql.Arg(s.Clrphone2.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.Comments.IsUnset() {
|
|
vals[19] = psql.Arg(s.Comments.MustGetNull())
|
|
} else {
|
|
vals[19] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Creationdate.IsUnset() {
|
|
vals[20] = psql.Arg(s.Creationdate.MustGetNull())
|
|
} else {
|
|
vals[20] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Creator.IsUnset() {
|
|
vals[21] = psql.Arg(s.Creator.MustGetNull())
|
|
} else {
|
|
vals[21] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Datetimeclosed.IsUnset() {
|
|
vals[22] = psql.Arg(s.Datetimeclosed.MustGetNull())
|
|
} else {
|
|
vals[22] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Duedate.IsUnset() {
|
|
vals[23] = psql.Arg(s.Duedate.MustGetNull())
|
|
} else {
|
|
vals[23] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Entrytech.IsUnset() {
|
|
vals[24] = psql.Arg(s.Entrytech.MustGetNull())
|
|
} else {
|
|
vals[24] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Estcompletedate.IsUnset() {
|
|
vals[25] = psql.Arg(s.Estcompletedate.MustGetNull())
|
|
} else {
|
|
vals[25] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Externalerror.IsUnset() {
|
|
vals[26] = psql.Arg(s.Externalerror.MustGetNull())
|
|
} else {
|
|
vals[26] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Externalid.IsUnset() {
|
|
vals[27] = psql.Arg(s.Externalid.MustGetNull())
|
|
} else {
|
|
vals[27] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Editdate.IsUnset() {
|
|
vals[28] = psql.Arg(s.Editdate.MustGetNull())
|
|
} else {
|
|
vals[28] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Editor.IsUnset() {
|
|
vals[29] = psql.Arg(s.Editor.MustGetNull())
|
|
} else {
|
|
vals[29] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Firstresponsedate.IsUnset() {
|
|
vals[30] = psql.Arg(s.Firstresponsedate.MustGetNull())
|
|
} else {
|
|
vals[30] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Globalid.IsUnset() {
|
|
vals[31] = psql.Arg(s.Globalid.MustGetNull())
|
|
} else {
|
|
vals[31] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Issuesreported.IsUnset() {
|
|
vals[32] = psql.Arg(s.Issuesreported.MustGetNull())
|
|
} else {
|
|
vals[32] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Jurisdiction.IsUnset() {
|
|
vals[33] = psql.Arg(s.Jurisdiction.MustGetNull())
|
|
} else {
|
|
vals[33] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Nextaction.IsUnset() {
|
|
vals[34] = psql.Arg(s.Nextaction.MustGetNull())
|
|
} else {
|
|
vals[34] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
vals[35] = psql.Arg(s.Notificationtimestamp.MustGetNull())
|
|
} else {
|
|
vals[35] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notified.IsUnset() {
|
|
vals[36] = psql.Arg(s.Notified.MustGetNull())
|
|
} else {
|
|
vals[36] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Notifieddate.IsUnset() {
|
|
vals[37] = psql.Arg(s.Notifieddate.MustGetNull())
|
|
} else {
|
|
vals[37] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.Objectid.IsValue() {
|
|
vals[38] = psql.Arg(s.Objectid.MustGet())
|
|
} else {
|
|
vals[38] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Pointlocid.IsUnset() {
|
|
vals[39] = psql.Arg(s.Pointlocid.MustGetNull())
|
|
} else {
|
|
vals[39] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Priority.IsUnset() {
|
|
vals[40] = psql.Arg(s.Priority.MustGetNull())
|
|
} else {
|
|
vals[40] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Recdatetime.IsUnset() {
|
|
vals[41] = psql.Arg(s.Recdatetime.MustGetNull())
|
|
} else {
|
|
vals[41] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Recordstatus.IsUnset() {
|
|
vals[42] = psql.Arg(s.Recordstatus.MustGetNull())
|
|
} else {
|
|
vals[42] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejectedby.IsUnset() {
|
|
vals[43] = psql.Arg(s.Rejectedby.MustGetNull())
|
|
} else {
|
|
vals[43] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejecteddate.IsUnset() {
|
|
vals[44] = psql.Arg(s.Rejecteddate.MustGetNull())
|
|
} else {
|
|
vals[44] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Rejectedreason.IsUnset() {
|
|
vals[45] = psql.Arg(s.Rejectedreason.MustGetNull())
|
|
} else {
|
|
vals[45] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqaddr1.IsUnset() {
|
|
vals[46] = psql.Arg(s.Reqaddr1.MustGetNull())
|
|
} else {
|
|
vals[46] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqaddr2.IsUnset() {
|
|
vals[47] = psql.Arg(s.Reqaddr2.MustGetNull())
|
|
} else {
|
|
vals[47] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcity.IsUnset() {
|
|
vals[48] = psql.Arg(s.Reqcity.MustGetNull())
|
|
} else {
|
|
vals[48] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcompany.IsUnset() {
|
|
vals[49] = psql.Arg(s.Reqcompany.MustGetNull())
|
|
} else {
|
|
vals[49] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqcrossst.IsUnset() {
|
|
vals[50] = psql.Arg(s.Reqcrossst.MustGetNull())
|
|
} else {
|
|
vals[50] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqdescr.IsUnset() {
|
|
vals[51] = psql.Arg(s.Reqdescr.MustGetNull())
|
|
} else {
|
|
vals[51] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
vals[52] = psql.Arg(s.Reqfldnotes.MustGetNull())
|
|
} else {
|
|
vals[52] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
vals[53] = psql.Arg(s.Reqmapgrid.MustGetNull())
|
|
} else {
|
|
vals[53] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
vals[54] = psql.Arg(s.Reqnotesforcust.MustGetNull())
|
|
} else {
|
|
vals[54] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
vals[55] = psql.Arg(s.Reqnotesfortech.MustGetNull())
|
|
} else {
|
|
vals[55] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqpermission.IsUnset() {
|
|
vals[56] = psql.Arg(s.Reqpermission.MustGetNull())
|
|
} else {
|
|
vals[56] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
vals[57] = psql.Arg(s.Reqprogramactions.MustGetNull())
|
|
} else {
|
|
vals[57] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqstate.IsUnset() {
|
|
vals[58] = psql.Arg(s.Reqstate.MustGetNull())
|
|
} else {
|
|
vals[58] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
vals[59] = psql.Arg(s.Reqsubdiv.MustGetNull())
|
|
} else {
|
|
vals[59] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqtarget.IsUnset() {
|
|
vals[60] = psql.Arg(s.Reqtarget.MustGetNull())
|
|
} else {
|
|
vals[60] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reqzip.IsUnset() {
|
|
vals[61] = psql.Arg(s.Reqzip.MustGetNull())
|
|
} else {
|
|
vals[61] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Responsedaycount.IsUnset() {
|
|
vals[62] = psql.Arg(s.Responsedaycount.MustGetNull())
|
|
} else {
|
|
vals[62] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reviewed.IsUnset() {
|
|
vals[63] = psql.Arg(s.Reviewed.MustGetNull())
|
|
} else {
|
|
vals[63] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Reviewedby.IsUnset() {
|
|
vals[64] = psql.Arg(s.Reviewedby.MustGetNull())
|
|
} else {
|
|
vals[64] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Revieweddate.IsUnset() {
|
|
vals[65] = psql.Arg(s.Revieweddate.MustGetNull())
|
|
} else {
|
|
vals[65] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Scheduled.IsUnset() {
|
|
vals[66] = psql.Arg(s.Scheduled.MustGetNull())
|
|
} else {
|
|
vals[66] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Scheduleddate.IsUnset() {
|
|
vals[67] = psql.Arg(s.Scheduleddate.MustGetNull())
|
|
} else {
|
|
vals[67] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Source.IsUnset() {
|
|
vals[68] = psql.Arg(s.Source.MustGetNull())
|
|
} else {
|
|
vals[68] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.SRNumber.IsUnset() {
|
|
vals[69] = psql.Arg(s.SRNumber.MustGetNull())
|
|
} else {
|
|
vals[69] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Status.IsUnset() {
|
|
vals[70] = psql.Arg(s.Status.MustGetNull())
|
|
} else {
|
|
vals[70] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Supervisor.IsUnset() {
|
|
vals[71] = psql.Arg(s.Supervisor.MustGetNull())
|
|
} else {
|
|
vals[71] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Techclosed.IsUnset() {
|
|
vals[72] = psql.Arg(s.Techclosed.MustGetNull())
|
|
} else {
|
|
vals[72] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Validx.IsUnset() {
|
|
vals[73] = psql.Arg(s.Validx.MustGetNull())
|
|
} else {
|
|
vals[73] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Validy.IsUnset() {
|
|
vals[74] = psql.Arg(s.Validy.MustGetNull())
|
|
} else {
|
|
vals[74] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Xvalue.IsUnset() {
|
|
vals[75] = psql.Arg(s.Xvalue.MustGetNull())
|
|
} else {
|
|
vals[75] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Yvalue.IsUnset() {
|
|
vals[76] = psql.Arg(s.Yvalue.MustGetNull())
|
|
} else {
|
|
vals[76] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Zone.IsUnset() {
|
|
vals[77] = psql.Arg(s.Zone.MustGetNull())
|
|
} else {
|
|
vals[77] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Zone2.IsUnset() {
|
|
vals[78] = psql.Arg(s.Zone2.MustGetNull())
|
|
} else {
|
|
vals[78] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Created.IsUnset() {
|
|
vals[79] = psql.Arg(s.Created.MustGetNull())
|
|
} else {
|
|
vals[79] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.CreatedDate.IsUnset() {
|
|
vals[80] = psql.Arg(s.CreatedDate.MustGetNull())
|
|
} else {
|
|
vals[80] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.CreatedUser.IsUnset() {
|
|
vals[81] = psql.Arg(s.CreatedUser.MustGetNull())
|
|
} else {
|
|
vals[81] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.GeometryX.IsUnset() {
|
|
vals[82] = psql.Arg(s.GeometryX.MustGetNull())
|
|
} else {
|
|
vals[82] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.GeometryY.IsUnset() {
|
|
vals[83] = psql.Arg(s.GeometryY.MustGetNull())
|
|
} else {
|
|
vals[83] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.LastEditedDate.IsUnset() {
|
|
vals[84] = psql.Arg(s.LastEditedDate.MustGetNull())
|
|
} else {
|
|
vals[84] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.LastEditedUser.IsUnset() {
|
|
vals[85] = psql.Arg(s.LastEditedUser.MustGetNull())
|
|
} else {
|
|
vals[85] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Dog.IsUnset() {
|
|
vals[86] = psql.Arg(s.Dog.MustGetNull())
|
|
} else {
|
|
vals[86] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.Spanish.IsUnset() {
|
|
vals[87] = psql.Arg(s.Spanish.MustGetNull())
|
|
} else {
|
|
vals[87] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.ScheduleNotes.IsUnset() {
|
|
vals[88] = psql.Arg(s.ScheduleNotes.MustGetNull())
|
|
} else {
|
|
vals[88] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if !s.SchedulePeriod.IsUnset() {
|
|
vals[89] = psql.Arg(s.SchedulePeriod.MustGetNull())
|
|
} else {
|
|
vals[89] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
if s.Version.IsValue() {
|
|
vals[90] = psql.Arg(s.Version.MustGet())
|
|
} else {
|
|
vals[90] = psql.Raw("DEFAULT")
|
|
}
|
|
|
|
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
|
}))
|
|
}
|
|
|
|
func (s HistoryServicerequestSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
|
return um.Set(s.Expressions()...)
|
|
}
|
|
|
|
func (s HistoryServicerequestSetter) Expressions(prefix ...string) []bob.Expression {
|
|
exprs := make([]bob.Expression, 0, 91)
|
|
|
|
if s.OrganizationID.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "organization_id")...),
|
|
psql.Arg(s.OrganizationID),
|
|
}})
|
|
}
|
|
|
|
if !s.Accepted.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "accepted")...),
|
|
psql.Arg(s.Accepted),
|
|
}})
|
|
}
|
|
|
|
if !s.Acceptedby.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "acceptedby")...),
|
|
psql.Arg(s.Acceptedby),
|
|
}})
|
|
}
|
|
|
|
if !s.Accepteddate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "accepteddate")...),
|
|
psql.Arg(s.Accepteddate),
|
|
}})
|
|
}
|
|
|
|
if !s.Allowed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "allowed")...),
|
|
psql.Arg(s.Allowed),
|
|
}})
|
|
}
|
|
|
|
if !s.Assignedtech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "assignedtech")...),
|
|
psql.Arg(s.Assignedtech),
|
|
}})
|
|
}
|
|
|
|
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.Clranon.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clranon")...),
|
|
psql.Arg(s.Clranon),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcity.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcity")...),
|
|
psql.Arg(s.Clrcity),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcompany.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcompany")...),
|
|
psql.Arg(s.Clrcompany),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrcontpref.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrcontpref")...),
|
|
psql.Arg(s.Clrcontpref),
|
|
}})
|
|
}
|
|
|
|
if !s.Clremail.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clremail")...),
|
|
psql.Arg(s.Clremail),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrfname.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrfname")...),
|
|
psql.Arg(s.Clrfname),
|
|
}})
|
|
}
|
|
|
|
if !s.Clrother.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "clrother")...),
|
|
psql.Arg(s.Clrother),
|
|
}})
|
|
}
|
|
|
|
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.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.Comments.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "comments")...),
|
|
psql.Arg(s.Comments),
|
|
}})
|
|
}
|
|
|
|
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.Datetimeclosed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "datetimeclosed")...),
|
|
psql.Arg(s.Datetimeclosed),
|
|
}})
|
|
}
|
|
|
|
if !s.Duedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "duedate")...),
|
|
psql.Arg(s.Duedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Entrytech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "entrytech")...),
|
|
psql.Arg(s.Entrytech),
|
|
}})
|
|
}
|
|
|
|
if !s.Estcompletedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "estcompletedate")...),
|
|
psql.Arg(s.Estcompletedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Externalerror.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "externalerror")...),
|
|
psql.Arg(s.Externalerror),
|
|
}})
|
|
}
|
|
|
|
if !s.Externalid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "externalid")...),
|
|
psql.Arg(s.Externalid),
|
|
}})
|
|
}
|
|
|
|
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.Firstresponsedate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "firstresponsedate")...),
|
|
psql.Arg(s.Firstresponsedate),
|
|
}})
|
|
}
|
|
|
|
if !s.Globalid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "globalid")...),
|
|
psql.Arg(s.Globalid),
|
|
}})
|
|
}
|
|
|
|
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.Nextaction.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "nextaction")...),
|
|
psql.Arg(s.Nextaction),
|
|
}})
|
|
}
|
|
|
|
if !s.Notificationtimestamp.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "notificationtimestamp")...),
|
|
psql.Arg(s.Notificationtimestamp),
|
|
}})
|
|
}
|
|
|
|
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.Objectid.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "objectid")...),
|
|
psql.Arg(s.Objectid),
|
|
}})
|
|
}
|
|
|
|
if !s.Pointlocid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "pointlocid")...),
|
|
psql.Arg(s.Pointlocid),
|
|
}})
|
|
}
|
|
|
|
if !s.Priority.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "priority")...),
|
|
psql.Arg(s.Priority),
|
|
}})
|
|
}
|
|
|
|
if !s.Recdatetime.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "recdatetime")...),
|
|
psql.Arg(s.Recdatetime),
|
|
}})
|
|
}
|
|
|
|
if !s.Recordstatus.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "recordstatus")...),
|
|
psql.Arg(s.Recordstatus),
|
|
}})
|
|
}
|
|
|
|
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.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.Reqcompany.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqcompany")...),
|
|
psql.Arg(s.Reqcompany),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqcrossst.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqcrossst")...),
|
|
psql.Arg(s.Reqcrossst),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqdescr.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqdescr")...),
|
|
psql.Arg(s.Reqdescr),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqfldnotes.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqfldnotes")...),
|
|
psql.Arg(s.Reqfldnotes),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqmapgrid.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqmapgrid")...),
|
|
psql.Arg(s.Reqmapgrid),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqnotesforcust.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqnotesforcust")...),
|
|
psql.Arg(s.Reqnotesforcust),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqnotesfortech.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqnotesfortech")...),
|
|
psql.Arg(s.Reqnotesfortech),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqpermission.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqpermission")...),
|
|
psql.Arg(s.Reqpermission),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqprogramactions.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqprogramactions")...),
|
|
psql.Arg(s.Reqprogramactions),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqstate.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqstate")...),
|
|
psql.Arg(s.Reqstate),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqsubdiv.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqsubdiv")...),
|
|
psql.Arg(s.Reqsubdiv),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqtarget.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqtarget")...),
|
|
psql.Arg(s.Reqtarget),
|
|
}})
|
|
}
|
|
|
|
if !s.Reqzip.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "reqzip")...),
|
|
psql.Arg(s.Reqzip),
|
|
}})
|
|
}
|
|
|
|
if !s.Responsedaycount.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "responsedaycount")...),
|
|
psql.Arg(s.Responsedaycount),
|
|
}})
|
|
}
|
|
|
|
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.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.Source.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "source")...),
|
|
psql.Arg(s.Source),
|
|
}})
|
|
}
|
|
|
|
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.Status.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "status")...),
|
|
psql.Arg(s.Status),
|
|
}})
|
|
}
|
|
|
|
if !s.Supervisor.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "supervisor")...),
|
|
psql.Arg(s.Supervisor),
|
|
}})
|
|
}
|
|
|
|
if !s.Techclosed.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "techclosed")...),
|
|
psql.Arg(s.Techclosed),
|
|
}})
|
|
}
|
|
|
|
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.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.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.Created.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "created")...),
|
|
psql.Arg(s.Created),
|
|
}})
|
|
}
|
|
|
|
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.CreatedUser.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "created_user")...),
|
|
psql.Arg(s.CreatedUser),
|
|
}})
|
|
}
|
|
|
|
if !s.GeometryX.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "geometry_x")...),
|
|
psql.Arg(s.GeometryX),
|
|
}})
|
|
}
|
|
|
|
if !s.GeometryY.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "geometry_y")...),
|
|
psql.Arg(s.GeometryY),
|
|
}})
|
|
}
|
|
|
|
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.LastEditedUser.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "last_edited_user")...),
|
|
psql.Arg(s.LastEditedUser),
|
|
}})
|
|
}
|
|
|
|
if !s.Dog.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "dog")...),
|
|
psql.Arg(s.Dog),
|
|
}})
|
|
}
|
|
|
|
if !s.Spanish.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "spanish")...),
|
|
psql.Arg(s.Spanish),
|
|
}})
|
|
}
|
|
|
|
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.SchedulePeriod.IsUnset() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "schedule_period")...),
|
|
psql.Arg(s.SchedulePeriod),
|
|
}})
|
|
}
|
|
|
|
if s.Version.IsValue() {
|
|
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
|
psql.Quote(append(prefix, "version")...),
|
|
psql.Arg(s.Version),
|
|
}})
|
|
}
|
|
|
|
return exprs
|
|
}
|
|
|
|
// FindHistoryServicerequest retrieves a single record by primary key
|
|
// If cols is empty Find will return all columns.
|
|
func FindHistoryServicerequest(ctx context.Context, exec bob.Executor, ObjectidPK int32, VersionPK int32, cols ...string) (*HistoryServicerequest, error) {
|
|
if len(cols) == 0 {
|
|
return HistoryServicerequests.Query(
|
|
sm.Where(HistoryServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
|
sm.Where(HistoryServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
).One(ctx, exec)
|
|
}
|
|
|
|
return HistoryServicerequests.Query(
|
|
sm.Where(HistoryServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
|
sm.Where(HistoryServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
sm.Columns(HistoryServicerequests.Columns.Only(cols...)),
|
|
).One(ctx, exec)
|
|
}
|
|
|
|
// HistoryServicerequestExists checks the presence of a single record by primary key
|
|
func HistoryServicerequestExists(ctx context.Context, exec bob.Executor, ObjectidPK int32, VersionPK int32) (bool, error) {
|
|
return HistoryServicerequests.Query(
|
|
sm.Where(HistoryServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
|
sm.Where(HistoryServicerequests.Columns.Version.EQ(psql.Arg(VersionPK))),
|
|
).Exists(ctx, exec)
|
|
}
|
|
|
|
// AfterQueryHook is called after HistoryServicerequest is retrieved from the database
|
|
func (o *HistoryServicerequest) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
|
var err error
|
|
|
|
switch queryType {
|
|
case bob.QueryTypeSelect:
|
|
ctx, err = HistoryServicerequests.AfterSelectHooks.RunHooks(ctx, exec, HistoryServicerequestSlice{o})
|
|
case bob.QueryTypeInsert:
|
|
ctx, err = HistoryServicerequests.AfterInsertHooks.RunHooks(ctx, exec, HistoryServicerequestSlice{o})
|
|
case bob.QueryTypeUpdate:
|
|
ctx, err = HistoryServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, HistoryServicerequestSlice{o})
|
|
case bob.QueryTypeDelete:
|
|
ctx, err = HistoryServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, HistoryServicerequestSlice{o})
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
// primaryKeyVals returns the primary key values of the HistoryServicerequest
|
|
func (o *HistoryServicerequest) primaryKeyVals() bob.Expression {
|
|
return psql.ArgGroup(
|
|
o.Objectid,
|
|
o.Version,
|
|
)
|
|
}
|
|
|
|
func (o *HistoryServicerequest) pkEQ() dialect.Expression {
|
|
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_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 HistoryServicerequest
|
|
func (o *HistoryServicerequest) Update(ctx context.Context, exec bob.Executor, s *HistoryServicerequestSetter) error {
|
|
v, err := HistoryServicerequests.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 HistoryServicerequest record with an executor
|
|
func (o *HistoryServicerequest) Delete(ctx context.Context, exec bob.Executor) error {
|
|
_, err := HistoryServicerequests.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
// Reload refreshes the HistoryServicerequest using the executor
|
|
func (o *HistoryServicerequest) Reload(ctx context.Context, exec bob.Executor) error {
|
|
o2, err := HistoryServicerequests.Query(
|
|
sm.Where(HistoryServicerequests.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
|
sm.Where(HistoryServicerequests.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 HistoryServicerequestSlice is retrieved from the database
|
|
func (o HistoryServicerequestSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
|
var err error
|
|
|
|
switch queryType {
|
|
case bob.QueryTypeSelect:
|
|
ctx, err = HistoryServicerequests.AfterSelectHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeInsert:
|
|
ctx, err = HistoryServicerequests.AfterInsertHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeUpdate:
|
|
ctx, err = HistoryServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
|
case bob.QueryTypeDelete:
|
|
ctx, err = HistoryServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
func (o HistoryServicerequestSlice) pkIN() dialect.Expression {
|
|
if len(o) == 0 {
|
|
return psql.Raw("NULL")
|
|
}
|
|
|
|
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_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 HistoryServicerequestSlice) copyMatchingRows(from ...*HistoryServicerequest) {
|
|
for i, old := range o {
|
|
for _, new := range from {
|
|
if new.Objectid != old.Objectid {
|
|
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 HistoryServicerequestSlice) 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 HistoryServicerequests.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 *HistoryServicerequest:
|
|
o.copyMatchingRows(retrieved)
|
|
case []*HistoryServicerequest:
|
|
o.copyMatchingRows(retrieved...)
|
|
case HistoryServicerequestSlice:
|
|
o.copyMatchingRows(retrieved...)
|
|
default:
|
|
// If the retrieved value is not a HistoryServicerequest or a slice of HistoryServicerequest
|
|
// then run the AfterUpdateHooks on the slice
|
|
_, err = HistoryServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}))
|
|
|
|
q.AppendWhere(o.pkIN())
|
|
})
|
|
}
|
|
|
|
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
|
func (o HistoryServicerequestSlice) 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 HistoryServicerequests.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 *HistoryServicerequest:
|
|
o.copyMatchingRows(retrieved)
|
|
case []*HistoryServicerequest:
|
|
o.copyMatchingRows(retrieved...)
|
|
case HistoryServicerequestSlice:
|
|
o.copyMatchingRows(retrieved...)
|
|
default:
|
|
// If the retrieved value is not a HistoryServicerequest or a slice of HistoryServicerequest
|
|
// then run the AfterDeleteHooks on the slice
|
|
_, err = HistoryServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
|
}
|
|
|
|
return err
|
|
}))
|
|
|
|
q.AppendWhere(o.pkIN())
|
|
})
|
|
}
|
|
|
|
func (o HistoryServicerequestSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals HistoryServicerequestSetter) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
_, err := HistoryServicerequests.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
func (o HistoryServicerequestSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
_, err := HistoryServicerequests.Delete(o.DeleteMod()).Exec(ctx, exec)
|
|
return err
|
|
}
|
|
|
|
func (o HistoryServicerequestSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
|
if len(o) == 0 {
|
|
return nil
|
|
}
|
|
|
|
o2, err := HistoryServicerequests.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 *HistoryServicerequest) Organization(mods ...bob.Mod[*dialect.SelectQuery]) OrganizationsQuery {
|
|
return Organizations.Query(append(mods,
|
|
sm.Where(Organizations.Columns.ID.EQ(psql.Arg(o.OrganizationID))),
|
|
)...)
|
|
}
|
|
|
|
func (os HistoryServicerequestSlice) 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 attachHistoryServicerequestOrganization0(ctx context.Context, exec bob.Executor, count int, historyServicerequest0 *HistoryServicerequest, organization1 *Organization) (*HistoryServicerequest, error) {
|
|
setter := &HistoryServicerequestSetter{
|
|
OrganizationID: omit.From(organization1.ID),
|
|
}
|
|
|
|
err := historyServicerequest0.Update(ctx, exec, setter)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("attachHistoryServicerequestOrganization0: %w", err)
|
|
}
|
|
|
|
return historyServicerequest0, nil
|
|
}
|
|
|
|
func (historyServicerequest0 *HistoryServicerequest) 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 = attachHistoryServicerequestOrganization0(ctx, exec, 1, historyServicerequest0, organization1)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
historyServicerequest0.R.Organization = organization1
|
|
|
|
organization1.R.HistoryServicerequests = append(organization1.R.HistoryServicerequests, historyServicerequest0)
|
|
|
|
return nil
|
|
}
|
|
|
|
func (historyServicerequest0 *HistoryServicerequest) AttachOrganization(ctx context.Context, exec bob.Executor, organization1 *Organization) error {
|
|
var err error
|
|
|
|
_, err = attachHistoryServicerequestOrganization0(ctx, exec, 1, historyServicerequest0, organization1)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
historyServicerequest0.R.Organization = organization1
|
|
|
|
organization1.R.HistoryServicerequests = append(organization1.R.HistoryServicerequests, historyServicerequest0)
|
|
|
|
return nil
|
|
}
|
|
|
|
type historyServicerequestWhere[Q psql.Filterable] struct {
|
|
OrganizationID psql.WhereMod[Q, int32]
|
|
Accepted psql.WhereNullMod[Q, int16]
|
|
Acceptedby psql.WhereNullMod[Q, string]
|
|
Accepteddate psql.WhereNullMod[Q, int64]
|
|
Allowed psql.WhereNullMod[Q, string]
|
|
Assignedtech psql.WhereNullMod[Q, string]
|
|
Clraddr1 psql.WhereNullMod[Q, string]
|
|
Clraddr2 psql.WhereNullMod[Q, string]
|
|
Clranon psql.WhereNullMod[Q, int16]
|
|
Clrcity psql.WhereNullMod[Q, string]
|
|
Clrcompany psql.WhereNullMod[Q, string]
|
|
Clrcontpref psql.WhereNullMod[Q, string]
|
|
Clremail psql.WhereNullMod[Q, string]
|
|
Clrfname psql.WhereNullMod[Q, string]
|
|
Clrother psql.WhereNullMod[Q, string]
|
|
Clrphone1 psql.WhereNullMod[Q, string]
|
|
Clrphone2 psql.WhereNullMod[Q, string]
|
|
Clrstate psql.WhereNullMod[Q, string]
|
|
Clrzip psql.WhereNullMod[Q, string]
|
|
Comments psql.WhereNullMod[Q, string]
|
|
Creationdate psql.WhereNullMod[Q, int64]
|
|
Creator psql.WhereNullMod[Q, string]
|
|
Datetimeclosed psql.WhereNullMod[Q, int64]
|
|
Duedate psql.WhereNullMod[Q, int64]
|
|
Entrytech psql.WhereNullMod[Q, string]
|
|
Estcompletedate psql.WhereNullMod[Q, int64]
|
|
Externalerror psql.WhereNullMod[Q, string]
|
|
Externalid psql.WhereNullMod[Q, string]
|
|
Editdate psql.WhereNullMod[Q, int64]
|
|
Editor psql.WhereNullMod[Q, string]
|
|
Firstresponsedate psql.WhereNullMod[Q, int64]
|
|
Globalid psql.WhereNullMod[Q, string]
|
|
Issuesreported psql.WhereNullMod[Q, string]
|
|
Jurisdiction psql.WhereNullMod[Q, string]
|
|
Nextaction psql.WhereNullMod[Q, string]
|
|
Notificationtimestamp psql.WhereNullMod[Q, string]
|
|
Notified psql.WhereNullMod[Q, int16]
|
|
Notifieddate psql.WhereNullMod[Q, int64]
|
|
Objectid psql.WhereMod[Q, int32]
|
|
Pointlocid psql.WhereNullMod[Q, string]
|
|
Priority psql.WhereNullMod[Q, string]
|
|
Recdatetime psql.WhereNullMod[Q, int64]
|
|
Recordstatus psql.WhereNullMod[Q, int16]
|
|
Rejectedby psql.WhereNullMod[Q, string]
|
|
Rejecteddate psql.WhereNullMod[Q, int64]
|
|
Rejectedreason psql.WhereNullMod[Q, string]
|
|
Reqaddr1 psql.WhereNullMod[Q, string]
|
|
Reqaddr2 psql.WhereNullMod[Q, string]
|
|
Reqcity psql.WhereNullMod[Q, string]
|
|
Reqcompany psql.WhereNullMod[Q, string]
|
|
Reqcrossst psql.WhereNullMod[Q, string]
|
|
Reqdescr psql.WhereNullMod[Q, string]
|
|
Reqfldnotes psql.WhereNullMod[Q, string]
|
|
Reqmapgrid psql.WhereNullMod[Q, string]
|
|
Reqnotesforcust psql.WhereNullMod[Q, string]
|
|
Reqnotesfortech psql.WhereNullMod[Q, string]
|
|
Reqpermission psql.WhereNullMod[Q, int16]
|
|
Reqprogramactions psql.WhereNullMod[Q, string]
|
|
Reqstate psql.WhereNullMod[Q, string]
|
|
Reqsubdiv psql.WhereNullMod[Q, string]
|
|
Reqtarget psql.WhereNullMod[Q, string]
|
|
Reqzip psql.WhereNullMod[Q, string]
|
|
Responsedaycount psql.WhereNullMod[Q, int16]
|
|
Reviewed psql.WhereNullMod[Q, int16]
|
|
Reviewedby psql.WhereNullMod[Q, string]
|
|
Revieweddate psql.WhereNullMod[Q, int64]
|
|
Scheduled psql.WhereNullMod[Q, int16]
|
|
Scheduleddate psql.WhereNullMod[Q, int64]
|
|
Source psql.WhereNullMod[Q, string]
|
|
SRNumber psql.WhereNullMod[Q, int64]
|
|
Status psql.WhereNullMod[Q, string]
|
|
Supervisor psql.WhereNullMod[Q, string]
|
|
Techclosed psql.WhereNullMod[Q, string]
|
|
Validx psql.WhereNullMod[Q, string]
|
|
Validy psql.WhereNullMod[Q, string]
|
|
Xvalue psql.WhereNullMod[Q, string]
|
|
Yvalue psql.WhereNullMod[Q, string]
|
|
Zone psql.WhereNullMod[Q, string]
|
|
Zone2 psql.WhereNullMod[Q, string]
|
|
Created psql.WhereNullMod[Q, time.Time]
|
|
CreatedDate psql.WhereNullMod[Q, int64]
|
|
CreatedUser psql.WhereNullMod[Q, string]
|
|
GeometryX psql.WhereNullMod[Q, float64]
|
|
GeometryY psql.WhereNullMod[Q, float64]
|
|
LastEditedDate psql.WhereNullMod[Q, int64]
|
|
LastEditedUser psql.WhereNullMod[Q, string]
|
|
Dog psql.WhereNullMod[Q, int64]
|
|
Spanish psql.WhereNullMod[Q, int64]
|
|
ScheduleNotes psql.WhereNullMod[Q, string]
|
|
SchedulePeriod psql.WhereNullMod[Q, string]
|
|
Version psql.WhereMod[Q, int32]
|
|
}
|
|
|
|
func (historyServicerequestWhere[Q]) AliasedAs(alias string) historyServicerequestWhere[Q] {
|
|
return buildHistoryServicerequestWhere[Q](buildHistoryServicerequestColumns(alias))
|
|
}
|
|
|
|
func buildHistoryServicerequestWhere[Q psql.Filterable](cols historyServicerequestColumns) historyServicerequestWhere[Q] {
|
|
return historyServicerequestWhere[Q]{
|
|
OrganizationID: psql.Where[Q, int32](cols.OrganizationID),
|
|
Accepted: psql.WhereNull[Q, int16](cols.Accepted),
|
|
Acceptedby: psql.WhereNull[Q, string](cols.Acceptedby),
|
|
Accepteddate: psql.WhereNull[Q, int64](cols.Accepteddate),
|
|
Allowed: psql.WhereNull[Q, string](cols.Allowed),
|
|
Assignedtech: psql.WhereNull[Q, string](cols.Assignedtech),
|
|
Clraddr1: psql.WhereNull[Q, string](cols.Clraddr1),
|
|
Clraddr2: psql.WhereNull[Q, string](cols.Clraddr2),
|
|
Clranon: psql.WhereNull[Q, int16](cols.Clranon),
|
|
Clrcity: psql.WhereNull[Q, string](cols.Clrcity),
|
|
Clrcompany: psql.WhereNull[Q, string](cols.Clrcompany),
|
|
Clrcontpref: psql.WhereNull[Q, string](cols.Clrcontpref),
|
|
Clremail: psql.WhereNull[Q, string](cols.Clremail),
|
|
Clrfname: psql.WhereNull[Q, string](cols.Clrfname),
|
|
Clrother: psql.WhereNull[Q, string](cols.Clrother),
|
|
Clrphone1: psql.WhereNull[Q, string](cols.Clrphone1),
|
|
Clrphone2: psql.WhereNull[Q, string](cols.Clrphone2),
|
|
Clrstate: psql.WhereNull[Q, string](cols.Clrstate),
|
|
Clrzip: psql.WhereNull[Q, string](cols.Clrzip),
|
|
Comments: psql.WhereNull[Q, string](cols.Comments),
|
|
Creationdate: psql.WhereNull[Q, int64](cols.Creationdate),
|
|
Creator: psql.WhereNull[Q, string](cols.Creator),
|
|
Datetimeclosed: psql.WhereNull[Q, int64](cols.Datetimeclosed),
|
|
Duedate: psql.WhereNull[Q, int64](cols.Duedate),
|
|
Entrytech: psql.WhereNull[Q, string](cols.Entrytech),
|
|
Estcompletedate: psql.WhereNull[Q, int64](cols.Estcompletedate),
|
|
Externalerror: psql.WhereNull[Q, string](cols.Externalerror),
|
|
Externalid: psql.WhereNull[Q, string](cols.Externalid),
|
|
Editdate: psql.WhereNull[Q, int64](cols.Editdate),
|
|
Editor: psql.WhereNull[Q, string](cols.Editor),
|
|
Firstresponsedate: psql.WhereNull[Q, int64](cols.Firstresponsedate),
|
|
Globalid: psql.WhereNull[Q, string](cols.Globalid),
|
|
Issuesreported: psql.WhereNull[Q, string](cols.Issuesreported),
|
|
Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction),
|
|
Nextaction: psql.WhereNull[Q, string](cols.Nextaction),
|
|
Notificationtimestamp: psql.WhereNull[Q, string](cols.Notificationtimestamp),
|
|
Notified: psql.WhereNull[Q, int16](cols.Notified),
|
|
Notifieddate: psql.WhereNull[Q, int64](cols.Notifieddate),
|
|
Objectid: psql.Where[Q, int32](cols.Objectid),
|
|
Pointlocid: psql.WhereNull[Q, string](cols.Pointlocid),
|
|
Priority: psql.WhereNull[Q, string](cols.Priority),
|
|
Recdatetime: psql.WhereNull[Q, int64](cols.Recdatetime),
|
|
Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus),
|
|
Rejectedby: psql.WhereNull[Q, string](cols.Rejectedby),
|
|
Rejecteddate: psql.WhereNull[Q, int64](cols.Rejecteddate),
|
|
Rejectedreason: psql.WhereNull[Q, string](cols.Rejectedreason),
|
|
Reqaddr1: psql.WhereNull[Q, string](cols.Reqaddr1),
|
|
Reqaddr2: psql.WhereNull[Q, string](cols.Reqaddr2),
|
|
Reqcity: psql.WhereNull[Q, string](cols.Reqcity),
|
|
Reqcompany: psql.WhereNull[Q, string](cols.Reqcompany),
|
|
Reqcrossst: psql.WhereNull[Q, string](cols.Reqcrossst),
|
|
Reqdescr: psql.WhereNull[Q, string](cols.Reqdescr),
|
|
Reqfldnotes: psql.WhereNull[Q, string](cols.Reqfldnotes),
|
|
Reqmapgrid: psql.WhereNull[Q, string](cols.Reqmapgrid),
|
|
Reqnotesforcust: psql.WhereNull[Q, string](cols.Reqnotesforcust),
|
|
Reqnotesfortech: psql.WhereNull[Q, string](cols.Reqnotesfortech),
|
|
Reqpermission: psql.WhereNull[Q, int16](cols.Reqpermission),
|
|
Reqprogramactions: psql.WhereNull[Q, string](cols.Reqprogramactions),
|
|
Reqstate: psql.WhereNull[Q, string](cols.Reqstate),
|
|
Reqsubdiv: psql.WhereNull[Q, string](cols.Reqsubdiv),
|
|
Reqtarget: psql.WhereNull[Q, string](cols.Reqtarget),
|
|
Reqzip: psql.WhereNull[Q, string](cols.Reqzip),
|
|
Responsedaycount: psql.WhereNull[Q, int16](cols.Responsedaycount),
|
|
Reviewed: psql.WhereNull[Q, int16](cols.Reviewed),
|
|
Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby),
|
|
Revieweddate: psql.WhereNull[Q, int64](cols.Revieweddate),
|
|
Scheduled: psql.WhereNull[Q, int16](cols.Scheduled),
|
|
Scheduleddate: psql.WhereNull[Q, int64](cols.Scheduleddate),
|
|
Source: psql.WhereNull[Q, string](cols.Source),
|
|
SRNumber: psql.WhereNull[Q, int64](cols.SRNumber),
|
|
Status: psql.WhereNull[Q, string](cols.Status),
|
|
Supervisor: psql.WhereNull[Q, string](cols.Supervisor),
|
|
Techclosed: psql.WhereNull[Q, string](cols.Techclosed),
|
|
Validx: psql.WhereNull[Q, string](cols.Validx),
|
|
Validy: psql.WhereNull[Q, string](cols.Validy),
|
|
Xvalue: psql.WhereNull[Q, string](cols.Xvalue),
|
|
Yvalue: psql.WhereNull[Q, string](cols.Yvalue),
|
|
Zone: psql.WhereNull[Q, string](cols.Zone),
|
|
Zone2: psql.WhereNull[Q, string](cols.Zone2),
|
|
Created: psql.WhereNull[Q, time.Time](cols.Created),
|
|
CreatedDate: psql.WhereNull[Q, int64](cols.CreatedDate),
|
|
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
|
GeometryX: psql.WhereNull[Q, float64](cols.GeometryX),
|
|
GeometryY: psql.WhereNull[Q, float64](cols.GeometryY),
|
|
LastEditedDate: psql.WhereNull[Q, int64](cols.LastEditedDate),
|
|
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
|
Dog: psql.WhereNull[Q, int64](cols.Dog),
|
|
Spanish: psql.WhereNull[Q, int64](cols.Spanish),
|
|
ScheduleNotes: psql.WhereNull[Q, string](cols.ScheduleNotes),
|
|
SchedulePeriod: psql.WhereNull[Q, string](cols.SchedulePeriod),
|
|
Version: psql.Where[Q, int32](cols.Version),
|
|
}
|
|
}
|
|
|
|
func (o *HistoryServicerequest) Preload(name string, retrieved any) error {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
|
|
switch name {
|
|
case "Organization":
|
|
rel, ok := retrieved.(*Organization)
|
|
if !ok {
|
|
return fmt.Errorf("historyServicerequest cannot load %T as %q", retrieved, name)
|
|
}
|
|
|
|
o.R.Organization = rel
|
|
|
|
if rel != nil {
|
|
rel.R.HistoryServicerequests = HistoryServicerequestSlice{o}
|
|
}
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("historyServicerequest has no relationship %q", name)
|
|
}
|
|
}
|
|
|
|
type historyServicerequestPreloader struct {
|
|
Organization func(...psql.PreloadOption) psql.Preloader
|
|
}
|
|
|
|
func buildHistoryServicerequestPreloader() historyServicerequestPreloader {
|
|
return historyServicerequestPreloader{
|
|
Organization: func(opts ...psql.PreloadOption) psql.Preloader {
|
|
return psql.Preload[*Organization, OrganizationSlice](psql.PreloadRel{
|
|
Name: "Organization",
|
|
Sides: []psql.PreloadSide{
|
|
{
|
|
From: HistoryServicerequests,
|
|
To: Organizations,
|
|
FromColumns: []string{"organization_id"},
|
|
ToColumns: []string{"id"},
|
|
},
|
|
},
|
|
}, Organizations.Columns.Names(), opts...)
|
|
},
|
|
}
|
|
}
|
|
|
|
type historyServicerequestThenLoader[Q orm.Loadable] struct {
|
|
Organization func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
|
}
|
|
|
|
func buildHistoryServicerequestThenLoader[Q orm.Loadable]() historyServicerequestThenLoader[Q] {
|
|
type OrganizationLoadInterface interface {
|
|
LoadOrganization(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error
|
|
}
|
|
|
|
return historyServicerequestThenLoader[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 historyServicerequest's Organization into the .R struct
|
|
func (o *HistoryServicerequest) 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.HistoryServicerequests = HistoryServicerequestSlice{o}
|
|
|
|
o.R.Organization = related
|
|
return nil
|
|
}
|
|
|
|
// LoadOrganization loads the historyServicerequest's Organization into the .R struct
|
|
func (os HistoryServicerequestSlice) 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.HistoryServicerequests = append(rel.R.HistoryServicerequests, o)
|
|
|
|
o.R.Organization = rel
|
|
break
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
type historyServicerequestJoins[Q dialect.Joinable] struct {
|
|
typ string
|
|
Organization modAs[Q, organizationColumns]
|
|
}
|
|
|
|
func (j historyServicerequestJoins[Q]) aliasedAs(alias string) historyServicerequestJoins[Q] {
|
|
return buildHistoryServicerequestJoins[Q](buildHistoryServicerequestColumns(alias), j.typ)
|
|
}
|
|
|
|
func buildHistoryServicerequestJoins[Q dialect.Joinable](cols historyServicerequestColumns, typ string) historyServicerequestJoins[Q] {
|
|
return historyServicerequestJoins[Q]{
|
|
typ: typ,
|
|
Organization: modAs[Q, organizationColumns]{
|
|
c: Organizations.Columns,
|
|
f: func(to organizationColumns) bob.Mod[Q] {
|
|
mods := make(mods.QueryMods[Q], 0, 1)
|
|
|
|
{
|
|
mods = append(mods, dialect.Join[Q](typ, Organizations.Name().As(to.Alias())).On(
|
|
to.ID.EQ(cols.OrganizationID),
|
|
))
|
|
}
|
|
|
|
return mods
|
|
},
|
|
},
|
|
}
|
|
}
|