diff --git a/coverage.html b/coverage.html index c19c491..b311411 100644 --- a/coverage.html +++ b/coverage.html @@ -8941,70 +8941,70 @@ } // scanValues returns the types for scanning values from sql.Rows. -func (*User) scanValues(columns []string) ([]any, error) { +func (*User) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) - for i := range columns { + for i := range columns { switch columns[i] { - case user.FieldID, user.FieldUsername, user.FieldEmail, user.FieldPassword: + case user.FieldID, user.FieldUsername, user.FieldEmail, user.FieldPassword: values[i] = new(sql.NullString) - case user.FieldCreatedAt, user.FieldUpdatedAt: + case user.FieldCreatedAt, user.FieldUpdatedAt: values[i] = new(sql.NullTime) default: values[i] = new(sql.UnknownType) } } - return values, nil + return values, nil } // assignValues assigns the values that were returned from sql.Rows (after scanning) // to the User fields. -func (u *User) assignValues(columns []string, values []any) error { +func (u *User) assignValues(columns []string, values []any) error { if m, n := len(values), len(columns); m < n { return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) } - for i := range columns { + for i := range columns { switch columns[i] { - case user.FieldID: + case user.FieldID: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field id", values[i]) - } else if value.Valid { + } else if value.Valid { u.ID = value.String } - case user.FieldUsername: + case user.FieldUsername: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field username", values[i]) - } else if value.Valid { + } else if value.Valid { u.Username = value.String } - case user.FieldEmail: + case user.FieldEmail: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field email", values[i]) - } else if value.Valid { + } else if value.Valid { u.Email = value.String } - case user.FieldPassword: + case user.FieldPassword: if value, ok := values[i].(*sql.NullString); !ok { return fmt.Errorf("unexpected type %T for field password", values[i]) - } else if value.Valid { + } else if value.Valid { u.Password = value.String } - case user.FieldCreatedAt: + case user.FieldCreatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) - } else if value.Valid { + } else if value.Valid { u.CreatedAt = value.Time } - case user.FieldUpdatedAt: + case user.FieldUpdatedAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field updated_at", values[i]) - } else if value.Valid { + } else if value.Valid { u.UpdatedAt = value.Time } default: u.selectValues.Set(columns[i], values[i]) } } - return nil + return nil } // Value returns the ent.Value that was dynamically selected and assigned to the User. @@ -10533,10 +10533,10 @@ uq.withTokens != nil, } ) - _spec.ScanValues = func(columns []string) ([]any, error) { + _spec.ScanValues = func(columns []string) ([]any, error) { return (*User).scanValues(nil, columns) } - _spec.Assign = func(columns []string, values []any) error { + _spec.Assign = func(columns []string, values []any) error { node := &User{config: uq.config} nodes = append(nodes, node) node.Edges.loadedTypes = loadedTypes diff --git a/coverage.txt b/coverage.txt index d7ad2a8..bfea92f 100644 --- a/coverage.txt +++ b/coverage.txt @@ -6296,42 +6296,42 @@ auth/ent/user.go:53.2,53.44 1 0 auth/ent/user.go:58.52,59.22 1 0 auth/ent/user.go:59.22,61.3 1 0 auth/ent/user.go:62.2,62.45 1 0 -auth/ent/user.go:66.58,68.25 2 41 -auth/ent/user.go:68.25,69.21 1 246 -auth/ent/user.go:70.78,71.35 1 164 -auth/ent/user.go:72.49,73.33 1 82 +auth/ent/user.go:66.58,68.25 2 40 +auth/ent/user.go:68.25,69.21 1 240 +auth/ent/user.go:70.78,71.35 1 160 +auth/ent/user.go:72.49,73.33 1 80 auth/ent/user.go:74.11,75.36 1 0 -auth/ent/user.go:78.2,78.20 1 41 -auth/ent/user.go:83.67,84.46 1 41 +auth/ent/user.go:78.2,78.20 1 40 +auth/ent/user.go:83.67,84.46 1 40 auth/ent/user.go:84.46,86.3 1 0 -auth/ent/user.go:87.2,87.25 1 41 -auth/ent/user.go:87.25,88.21 1 246 -auth/ent/user.go:89.21,90.53 1 41 +auth/ent/user.go:87.2,87.25 1 40 +auth/ent/user.go:87.25,88.21 1 240 +auth/ent/user.go:89.21,90.53 1 40 auth/ent/user.go:90.53,92.5 1 0 -auth/ent/user.go:92.10,92.26 1 41 -auth/ent/user.go:92.26,94.5 1 41 -auth/ent/user.go:95.27,96.53 1 41 +auth/ent/user.go:92.10,92.26 1 40 +auth/ent/user.go:92.26,94.5 1 40 +auth/ent/user.go:95.27,96.53 1 40 auth/ent/user.go:96.53,98.5 1 0 -auth/ent/user.go:98.10,98.26 1 41 -auth/ent/user.go:98.26,100.5 1 41 -auth/ent/user.go:101.24,102.53 1 41 +auth/ent/user.go:98.10,98.26 1 40 +auth/ent/user.go:98.26,100.5 1 40 +auth/ent/user.go:101.24,102.53 1 40 auth/ent/user.go:102.53,104.5 1 0 -auth/ent/user.go:104.10,104.26 1 41 -auth/ent/user.go:104.26,106.5 1 41 -auth/ent/user.go:107.27,108.53 1 41 +auth/ent/user.go:104.10,104.26 1 40 +auth/ent/user.go:104.26,106.5 1 40 +auth/ent/user.go:107.27,108.53 1 40 auth/ent/user.go:108.53,110.5 1 0 -auth/ent/user.go:110.10,110.26 1 41 -auth/ent/user.go:110.26,112.5 1 41 -auth/ent/user.go:113.28,114.51 1 41 +auth/ent/user.go:110.10,110.26 1 40 +auth/ent/user.go:110.26,112.5 1 40 +auth/ent/user.go:113.28,114.51 1 40 auth/ent/user.go:114.51,116.5 1 0 -auth/ent/user.go:116.10,116.26 1 41 -auth/ent/user.go:116.26,118.5 1 41 -auth/ent/user.go:119.28,120.51 1 41 +auth/ent/user.go:116.10,116.26 1 40 +auth/ent/user.go:116.26,118.5 1 40 +auth/ent/user.go:119.28,120.51 1 40 auth/ent/user.go:120.51,122.5 1 0 -auth/ent/user.go:122.10,122.26 1 41 -auth/ent/user.go:122.26,124.5 1 41 +auth/ent/user.go:122.10,122.26 1 40 +auth/ent/user.go:122.26,124.5 1 40 auth/ent/user.go:125.11,126.45 1 0 -auth/ent/user.go:129.2,129.12 1 41 +auth/ent/user.go:129.2,129.12 1 40 auth/ent/user.go:134.54,136.2 1 0 auth/ent/user.go:139.40,141.2 1 1 auth/ent/user.go:144.42,146.2 1 1 @@ -6586,9 +6586,9 @@ auth/ent/user_query.go:397.17,399.4 1 0 auth/ent/user_query.go:400.3,400.16 1 2 auth/ent/user_query.go:402.2,402.12 1 30 auth/ent/user_query.go:405.87,414.59 2 28 -auth/ent/user_query.go:414.59,416.3 1 28 +auth/ent/user_query.go:414.59,416.3 1 27 auth/ent/user_query.go:417.2,417.60 1 28 -auth/ent/user_query.go:417.60,422.3 4 28 +auth/ent/user_query.go:417.60,422.3 4 27 auth/ent/user_query.go:423.2,423.23 1 28 auth/ent/user_query.go:423.23,425.3 1 1 auth/ent/user_query.go:426.2,426.67 1 28 @@ -8079,26 +8079,6 @@ datasource/grpc/server/datasource.go:176.23,178.3 1 0 datasource/grpc/server/datasource.go:179.2,179.22 1 0 datasource/grpc/server/datasource.go:179.22,181.3 1 0 datasource/grpc/server/datasource.go:183.2,183.12 1 0 -datasource/managers/manager.go:19.46,23.2 1 0 -datasource/managers/manager.go:26.87,30.45 3 0 -datasource/managers/manager.go:30.45,32.3 1 0 -datasource/managers/manager.go:34.2,35.16 2 0 -datasource/managers/manager.go:35.16,37.3 1 0 -datasource/managers/manager.go:39.2,40.12 2 0 -datasource/managers/manager.go:44.84,49.13 4 0 -datasource/managers/manager.go:49.13,51.3 1 0 -datasource/managers/manager.go:53.2,53.23 1 0 -datasource/managers/manager.go:57.63,61.46 3 0 -datasource/managers/manager.go:61.46,63.3 1 0 -datasource/managers/manager.go:65.2,66.12 2 0 -datasource/managers/manager.go:70.66,74.44 3 0 -datasource/managers/manager.go:74.44,75.48 1 0 -datasource/managers/manager.go:75.48,77.4 1 0 -datasource/managers/manager.go:80.2,80.12 1 0 -datasource/managers/manager.go:84.64,88.44 3 0 -datasource/managers/manager.go:88.44,89.46 1 0 -datasource/managers/manager.go:89.46,91.4 1 0 -datasource/managers/manager.go:94.2,94.12 1 0 datasource/managers/query/query.go:40.70,42.2 1 0 datasource/managers/query/query.go:45.102,46.34 1 0 datasource/managers/query/query.go:47.32,48.38 1 0 @@ -8161,6 +8141,26 @@ datasource/managers/query/query.go:190.22,192.4 1 0 datasource/managers/query/query.go:193.3,193.23 1 0 datasource/managers/query/query.go:193.23,195.4 1 0 datasource/managers/query/query.go:198.2,198.32 1 0 +datasource/managers/manager.go:19.46,23.2 1 0 +datasource/managers/manager.go:26.87,30.45 3 0 +datasource/managers/manager.go:30.45,32.3 1 0 +datasource/managers/manager.go:34.2,35.16 2 0 +datasource/managers/manager.go:35.16,37.3 1 0 +datasource/managers/manager.go:39.2,40.12 2 0 +datasource/managers/manager.go:44.84,49.13 4 0 +datasource/managers/manager.go:49.13,51.3 1 0 +datasource/managers/manager.go:53.2,53.23 1 0 +datasource/managers/manager.go:57.63,61.46 3 0 +datasource/managers/manager.go:61.46,63.3 1 0 +datasource/managers/manager.go:65.2,66.12 2 0 +datasource/managers/manager.go:70.66,74.44 3 0 +datasource/managers/manager.go:74.44,75.48 1 0 +datasource/managers/manager.go:75.48,77.4 1 0 +datasource/managers/manager.go:80.2,80.12 1 0 +datasource/managers/manager.go:84.64,88.44 3 0 +datasource/managers/manager.go:88.44,89.46 1 0 +datasource/managers/manager.go:89.46,91.4 1 0 +datasource/managers/manager.go:94.2,94.12 1 0 datasource/managers/transform/transform.go:55.36,57.2 1 0 datasource/managers/transform/transform.go:60.97,61.22 1 0 datasource/managers/transform/transform.go:62.14,63.24 1 0