Make GlobalID required for all Fieldseeker tables

I'm pretty sure it has to be there, and it allows me to clean up my
code.
This commit is contained in:
Eli Ribble 2026-01-05 02:28:28 +00:00
parent 53e08d840e
commit 1aefca2f5d
217 changed files with 871 additions and 1358 deletions

View file

@ -1,4 +1,4 @@
// Code generated by BobGen psql v0.0.4-0.20251216163753-8e325b7c773a+dirty. DO NOT EDIT.
// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models
@ -33,7 +33,7 @@ type FieldseekerHabitatrelate struct {
// Original attribute from ArcGIS API is FOREIGN_ID
ForeignID null.Val[uuid.UUID] `db:"foreign_id" `
// Original attribute from ArcGIS API is GlobalID
Globalid null.Val[uuid.UUID] `db:"globalid" `
Globalid uuid.UUID `db:"globalid" `
// Original attribute from ArcGIS API is created_user
CreatedUser null.Val[string] `db:"created_user" `
// Original attribute from ArcGIS API is created_date
@ -135,7 +135,7 @@ func (fieldseekerHabitatrelateColumns) AliasedAs(alias string) fieldseekerHabita
type FieldseekerHabitatrelateSetter struct {
Objectid omit.Val[int64] `db:"objectid,pk" `
ForeignID omitnull.Val[uuid.UUID] `db:"foreign_id" `
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
Globalid omit.Val[uuid.UUID] `db:"globalid" `
CreatedUser omitnull.Val[string] `db:"created_user" `
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
@ -159,7 +159,7 @@ func (s FieldseekerHabitatrelateSetter) SetColumns() []string {
if !s.ForeignID.IsUnset() {
vals = append(vals, "foreign_id")
}
if !s.Globalid.IsUnset() {
if s.Globalid.IsValue() {
vals = append(vals, "globalid")
}
if !s.CreatedUser.IsUnset() {
@ -211,8 +211,8 @@ func (s FieldseekerHabitatrelateSetter) Overwrite(t *FieldseekerHabitatrelate) {
if !s.ForeignID.IsUnset() {
t.ForeignID = s.ForeignID.MustGetNull()
}
if !s.Globalid.IsUnset() {
t.Globalid = s.Globalid.MustGetNull()
if s.Globalid.IsValue() {
t.Globalid = s.Globalid.MustGet()
}
if !s.CreatedUser.IsUnset() {
t.CreatedUser = s.CreatedUser.MustGetNull()
@ -274,8 +274,8 @@ func (s *FieldseekerHabitatrelateSetter) Apply(q *dialect.InsertQuery) {
vals[1] = psql.Raw("DEFAULT")
}
if !s.Globalid.IsUnset() {
vals[2] = psql.Arg(s.Globalid.MustGetNull())
if s.Globalid.IsValue() {
vals[2] = psql.Arg(s.Globalid.MustGet())
} else {
vals[2] = psql.Raw("DEFAULT")
}
@ -383,7 +383,7 @@ func (s FieldseekerHabitatrelateSetter) Expressions(prefix ...string) []bob.Expr
}})
}
if !s.Globalid.IsUnset() {
if s.Globalid.IsValue() {
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
psql.Quote(append(prefix, "globalid")...),
psql.Arg(s.Globalid),
@ -792,7 +792,7 @@ func (fieldseekerHabitatrelate0 *FieldseekerHabitatrelate) AttachOrganization(ct
type fieldseekerHabitatrelateWhere[Q psql.Filterable] struct {
Objectid psql.WhereMod[Q, int64]
ForeignID psql.WhereNullMod[Q, uuid.UUID]
Globalid psql.WhereNullMod[Q, uuid.UUID]
Globalid psql.WhereMod[Q, uuid.UUID]
CreatedUser psql.WhereNullMod[Q, string]
CreatedDate psql.WhereNullMod[Q, time.Time]
LastEditedUser psql.WhereNullMod[Q, string]
@ -816,7 +816,7 @@ func buildFieldseekerHabitatrelateWhere[Q psql.Filterable](cols fieldseekerHabit
return fieldseekerHabitatrelateWhere[Q]{
Objectid: psql.Where[Q, int64](cols.Objectid),
ForeignID: psql.WhereNull[Q, uuid.UUID](cols.ForeignID),
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
Globalid: psql.Where[Q, uuid.UUID](cols.Globalid),
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),