Delete() with a map[string]interface{} parameter #1897

Closed
opened 2021-04-15 01:18:41 +00:00 by gepeng · 1 comment

Can the following code support it?

  1. x.Table("abc").Delete(map[string]interface{}{...})
  2. x.Table("abc").Where(...).Delete()
Can the following code support it? 1. x.Table("abc").Delete(map[string]interface{}{...}) 2. x.Table("abc").Where(...).Delete()
Author

type Any struct {
Name string
}
)

func (this *Any) TableName() string {
return this.Name
}

...
x.Where("id=?", 1).Delete(&Any{"user"})

type Any struct { Name string } ) func (this *Any) TableName() string { return this.Name } ... x.Where("id=?", 1).Delete(&Any{"user"})
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1897
No description provided.