Skip to content

Commit

Permalink
chore: generate protos
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Jul 15, 2024
1 parent 26a79c7 commit 201072f
Show file tree
Hide file tree
Showing 34 changed files with 3,424 additions and 3,379 deletions.
418 changes: 263 additions & 155 deletions src/models/address.pb.go

Large diffs are not rendered by default.

16 changes: 4 additions & 12 deletions src/models/address.pb.gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package models
import (
context "context"
fmt "fmt"
gorm1 "github.com/infobloxopen/atlas-app-toolkit/gorm"
errors "github.com/infobloxopen/protoc-gen-gorm/errors"
gorm "github.com/jinzhu/gorm"
field_mask "google.golang.org/genproto/protobuf/field_mask"
gorm "gorm.io/gorm"
)

type AddressORM struct {
Address string `gorm:"primary_key"`
Address string `gorm:"primaryKey"`
AuditTxHash string
Balance float64 `gorm:"index:address_idx_balance"`
CodeHash string
Expand Down Expand Up @@ -152,7 +151,7 @@ func DefaultCreateAddress(ctx context.Context, in *Address, db *gorm.DB) (*Addre
return nil, err
}
}
if err = db.Create(&ormObj).Error; err != nil {
if err = db.Omit().Create(&ormObj).Error; err != nil {
return nil, err
}
if hook, ok := interface{}(&ormObj).(AddressORMWithAfterCreate_); ok {
Expand Down Expand Up @@ -187,9 +186,6 @@ func DefaultReadAddress(ctx context.Context, in *Address, db *gorm.DB) (*Address
return nil, err
}
}
if db, err = gorm1.ApplyFieldSelection(ctx, db, nil, &AddressORM{}); err != nil {
return nil, err
}
if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeReadFind); ok {
if db, err = hook.BeforeReadFind(ctx, db); err != nil {
return nil, err
Expand Down Expand Up @@ -310,7 +306,7 @@ func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm.DB) (
return nil, err
}
}
if err = db.Save(&ormObj).Error; err != nil {
if err = db.Omit().Save(&ormObj).Error; err != nil {
return nil, err
}
if hook, ok := interface{}(&ormObj).(AddressORMWithAfterStrictUpdateSave); ok {
Expand Down Expand Up @@ -520,10 +516,6 @@ func DefaultListAddress(ctx context.Context, db *gorm.DB) ([]*Address, error) {
return nil, err
}
}
db, err = gorm1.ApplyCollectionOperators(ctx, db, &AddressORM{}, &Address{}, nil, nil, nil, nil)
if err != nil {
return nil, err
}
if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeListFind); ok {
if db, err = hook.BeforeListFind(ctx, db); err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 201072f

Please sign in to comment.