Skip to content

Commit

Permalink
updating golden-files
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Odermatt committed Nov 17, 2021
1 parent ab1534f commit 1f2d574
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/proto/join/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Employee) Value() (driver.Value, error) {
return m.EmployeeID, nil
}

func (m *Employee) GetIdentifier() interface{} {
return m.EmployeeID
}

type queryEmployeeConfig struct {
Store *TestStore
filter pg.Where
Expand Down Expand Up @@ -80,9 +84,11 @@ func EmployeeWithManager(opts ...EmployeeOption) EmployeeOption {
EmployeeOnRow(func(row *Employee) {

// one-to-one
item := mapManager[row.EmployeeID]
if config.rows[item.EmployeeID] != nil {
config.rows[item.EmployeeID].Manager = row
item, ok := mapManager[row.EmployeeID]
if ok && item != nil {
if config.rows[item.EmployeeID] != nil {
config.rows[item.EmployeeID].Manager = row
}
}

}),
Expand Down
4 changes: 4 additions & 0 deletions test/proto/jsonb/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Product) Value() (driver.Value, error) {
return m.ProductID, nil
}

func (m *Product) GetIdentifier() interface{} {
return m.ProductID
}

type queryProductConfig struct {
Store *TestStore
filter pg.Where
Expand Down
4 changes: 4 additions & 0 deletions test/proto/simple/create/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Employee) Value() (driver.Value, error) {
return m.Id, nil
}

func (m *Employee) GetIdentifier() interface{} {
return m.Id
}

func (m *Employee) Insert(s *TestStore, ctx context.Context) error {
ins := pg.NewInsert()
ins.Add(m.Firstname, m.Lastname)
Expand Down
4 changes: 4 additions & 0 deletions test/proto/simple/delete/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Employee) Value() (driver.Value, error) {
return m.Id, nil
}

func (m *Employee) GetIdentifier() interface{} {
return m.Id
}

func (m *Employee) Delete(s *TestStore, ctx context.Context) error {

stmt, err := s.conn.PrepareContext(ctx, `
Expand Down
4 changes: 4 additions & 0 deletions test/proto/simple/read/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Employee) Value() (driver.Value, error) {
return m.Id, nil
}

func (m *Employee) GetIdentifier() interface{} {
return m.Id
}

type queryEmployeeConfig struct {
Store *TestStore
filter pg.Where
Expand Down
4 changes: 4 additions & 0 deletions test/proto/simple/update/test.sqlmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func (m *Employee) Value() (driver.Value, error) {
return m.Id, nil
}

func (m *Employee) GetIdentifier() interface{} {
return m.Id
}

func (m *Employee) Update(s *TestStore, ctx context.Context, conf *pg.UpdateSQL) error {
base := 1
if conf == nil {
Expand Down

0 comments on commit 1f2d574

Please sign in to comment.