Port all of the arcgis schema to using jet
Have not tested anything at this point, it just compiles.
This commit is contained in:
parent
89ed2003fa
commit
bab3200b6c
52 changed files with 479 additions and 13585 deletions
22
db/query/arcgis/user_privileges.go
Normal file
22
db/query/arcgis/user_privileges.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package arcgis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/Gleipnir-Technology/bob"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/arcgis/model"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/arcgis/table"
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
func UserPrivilegesDeleteByUserID(ctx context.Context, txn bob.Tx, id string) error {
|
||||
statement := table.User.DELETE().
|
||||
WHERE(table.User.ID.EQ(postgres.String(id)))
|
||||
return db.ExecuteNoneTx(ctx, txn, statement)
|
||||
}
|
||||
func UserPrivilegeInsert(ctx context.Context, txn bob.Tx, m *model.UserPrivilege) error {
|
||||
statement := table.UserPrivilege.INSERT(table.UserPrivilege.MutableColumns).
|
||||
MODEL(m)
|
||||
return db.ExecuteNoneTx(ctx, txn, statement)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue