Remove now-extraneous latitude/longitude generated columns
Now that we can pull out the geometry directly into a go object we don't need these and they complicate our insertions
This commit is contained in:
parent
34a136eba5
commit
7a361a330d
40 changed files with 426 additions and 464 deletions
|
|
@ -19,6 +19,7 @@ func AccountFromID(ctx context.Context, org_id string) (model.Account, error) {
|
|||
}
|
||||
func AccountInsert(ctx context.Context, txn bob.Tx, m *model.Account) (model.Account, error) {
|
||||
statement := table.Account.INSERT(table.Account.AllColumns).
|
||||
MODEL(m)
|
||||
MODEL(m).
|
||||
RETURNING(table.Account.AllColumns)
|
||||
return db.ExecuteOneTxBob[model.Account](ctx, txn, statement)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ import (
|
|||
|
||||
func OAuthTokenInsert(ctx context.Context, m *model.OAuthToken) (model.OAuthToken, error) {
|
||||
statement := table.OAuthToken.INSERT(table.OAuthToken.MutableColumns).
|
||||
MODEL(m)
|
||||
MODEL(m).
|
||||
RETURNING(table.OAuthToken.AllColumns)
|
||||
return db.ExecuteOne[model.OAuthToken](ctx, statement)
|
||||
}
|
||||
func OAuthTokenInvalidate(ctx context.Context, id int64) error {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ func ServiceFeatureFromURL(ctx context.Context, url string) (model.ServiceFeatur
|
|||
}
|
||||
func ServiceFeatureInsert(ctx context.Context, txn bob.Tx, m model.ServiceFeature) error {
|
||||
statement := table.ServiceMap.INSERT(table.ServiceMap.MutableColumns).
|
||||
MODEL(m)
|
||||
MODEL(m).
|
||||
RETURNING(table.ServiceFeature.AllColumns)
|
||||
return db.ExecuteNoneTxBob(ctx, txn, statement)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ func ServiceMapsFromAccountID(ctx context.Context, account_id string) ([]model.S
|
|||
}
|
||||
func ServiceMapInsert(ctx context.Context, txn bob.Tx, m *model.ServiceMap) error {
|
||||
statement := table.ServiceMap.INSERT(table.ServiceMap.MutableColumns).
|
||||
MODEL(m)
|
||||
MODEL(m).
|
||||
RETURNING(table.ServiceMap.AllColumns)
|
||||
return db.ExecuteNoneTxBob(ctx, txn, statement)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ func UserPrivilegesDeleteByUserID(ctx context.Context, txn bob.Tx, id string) er
|
|||
}
|
||||
func UserPrivilegeInsert(ctx context.Context, txn bob.Tx, m *model.UserPrivilege) error {
|
||||
statement := table.UserPrivilege.INSERT(table.UserPrivilege.MutableColumns).
|
||||
MODEL(m)
|
||||
MODEL(m).
|
||||
RETURNING(table.UserPrivilege.AllColumns)
|
||||
return db.ExecuteNoneTxBob(ctx, txn, statement)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue