refactored some functions, added demo download retry
This commit is contained in:
@@ -25,8 +25,6 @@ const (
|
||||
FieldMatchResult = "match_result"
|
||||
// FieldMaxRounds holds the string denoting the max_rounds field in the database.
|
||||
FieldMaxRounds = "max_rounds"
|
||||
// FieldDemoExpired holds the string denoting the demo_expired field in the database.
|
||||
FieldDemoExpired = "demo_expired"
|
||||
// FieldDemoParsed holds the string denoting the demo_parsed field in the database.
|
||||
FieldDemoParsed = "demo_parsed"
|
||||
// FieldEco holds the string denoting the eco field in the database.
|
||||
@@ -63,7 +61,6 @@ var Columns = []string{
|
||||
FieldDuration,
|
||||
FieldMatchResult,
|
||||
FieldMaxRounds,
|
||||
FieldDemoExpired,
|
||||
FieldDemoParsed,
|
||||
FieldEco,
|
||||
}
|
||||
@@ -85,8 +82,6 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultDemoExpired holds the default value on creation for the "demo_expired" field.
|
||||
DefaultDemoExpired bool
|
||||
// DefaultDemoParsed holds the default value on creation for the "demo_parsed" field.
|
||||
DefaultDemoParsed bool
|
||||
)
|
||||
|
@@ -156,13 +156,6 @@ func MaxRounds(v int) predicate.Match {
|
||||
})
|
||||
}
|
||||
|
||||
// DemoExpired applies equality check predicate on the "demo_expired" field. It's identical to DemoExpiredEQ.
|
||||
func DemoExpired(v bool) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldDemoExpired), v))
|
||||
})
|
||||
}
|
||||
|
||||
// DemoParsed applies equality check predicate on the "demo_parsed" field. It's identical to DemoParsedEQ.
|
||||
func DemoParsed(v bool) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
@@ -987,20 +980,6 @@ func MaxRoundsLTE(v int) predicate.Match {
|
||||
})
|
||||
}
|
||||
|
||||
// DemoExpiredEQ applies the EQ predicate on the "demo_expired" field.
|
||||
func DemoExpiredEQ(v bool) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldDemoExpired), v))
|
||||
})
|
||||
}
|
||||
|
||||
// DemoExpiredNEQ applies the NEQ predicate on the "demo_expired" field.
|
||||
func DemoExpiredNEQ(v bool) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldDemoExpired), v))
|
||||
})
|
||||
}
|
||||
|
||||
// DemoParsedEQ applies the EQ predicate on the "demo_parsed" field.
|
||||
func DemoParsedEQ(v bool) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
|
Reference in New Issue
Block a user