Get back to compiling, but using new jet for publicreport
This was an epically long change, and a terrible idea, but it compiles. This was essentially a cascade that came about because I can't blend jet and bob in the same transaction. In for a penny, I guess...
This commit is contained in:
parent
a95e44cf42
commit
fcd95f1a25
65 changed files with 3129 additions and 3457 deletions
|
|
@ -10,14 +10,14 @@ import (
|
|||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
func AccountFromID(ctx context.Context, org_id string) (*model.Account, error) {
|
||||
func AccountFromID(ctx context.Context, org_id string) (model.Account, error) {
|
||||
statement := table.Account.SELECT(
|
||||
table.Account.AllColumns,
|
||||
).FROM(table.Account).
|
||||
WHERE(table.Account.ID.EQ(postgres.String(org_id)))
|
||||
return db.ExecuteOne[model.Account](ctx, statement)
|
||||
}
|
||||
func AccountInsert(ctx context.Context, txn bob.Tx, m *model.Account) (*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)
|
||||
return db.ExecuteOneTxBob[model.Account](ctx, txn, statement)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue