chore: Bump ent to 0.11.2 (#2640)

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
Maksim Nabokikh
2022-08-29 11:16:12 +04:00
committed by GitHub
parent c5833e6b6f
commit 7efe1e28a8
88 changed files with 982 additions and 5380 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package db
@@ -96,11 +96,11 @@ func (pa *Password) Update() *PasswordUpdateOne {
// Unwrap unwraps the Password entity that was returned from a transaction after it was closed,
// so that all future queries will be executed through the driver which created the transaction.
func (pa *Password) Unwrap() *Password {
tx, ok := pa.config.driver.(*txDriver)
_tx, ok := pa.config.driver.(*txDriver)
if !ok {
panic("db: Password is not a transactional entity")
}
pa.config.driver = tx.drv
pa.config.driver = _tx.drv
return pa
}
@@ -108,14 +108,17 @@ func (pa *Password) Unwrap() *Password {
func (pa *Password) String() string {
var builder strings.Builder
builder.WriteString("Password(")
builder.WriteString(fmt.Sprintf("id=%v", pa.ID))
builder.WriteString(", email=")
builder.WriteString(fmt.Sprintf("id=%v, ", pa.ID))
builder.WriteString("email=")
builder.WriteString(pa.Email)
builder.WriteString(", hash=")
builder.WriteString(", ")
builder.WriteString("hash=")
builder.WriteString(fmt.Sprintf("%v", pa.Hash))
builder.WriteString(", username=")
builder.WriteString(", ")
builder.WriteString("username=")
builder.WriteString(pa.Username)
builder.WriteString(", user_id=")
builder.WriteString(", ")
builder.WriteString("user_id=")
builder.WriteString(pa.UserID)
builder.WriteByte(')')
return builder.String()