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
17
db/query/public/lead.go
Normal file
17
db/query/public/lead.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package public
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/model"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/public/table"
|
||||
//"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
func LeadInsert(ctx context.Context, txn db.Ex, m model.Lead) (model.Lead, error) {
|
||||
statement := table.Lead.INSERT(table.Lead.MutableColumns).
|
||||
MODEL(m).
|
||||
RETURNING(table.Lead.AllColumns)
|
||||
return db.ExecuteOne[model.Lead](ctx, statement)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue