-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Autotag Improvements #1927
WIP: Autotag Improvements #1927
Conversation
@@ -12,6 +12,8 @@ type Tag { | |||
gallery_count: Int # Resolver | |||
performer_count: Int | |||
|
|||
allow_autotag: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naive question: why the Int
and not Bool
? Probably requires a comment what it encodes in the GraphQL schema.
I know the database doesn't support bools directly, but chances are the sql.NullBool or a straight bool will work at that level too because of the way Scanner/Valuer works. In any case, I don't think we should let the database schema bleed through to the GraphQL layer.
Name string `db:"name" json:"name"` // TODO make schema not null | ||
CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"` | ||
UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"` | ||
AllowAutotag int `db:"allow_autotag" json:"allow_autotag"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try using a bool here. I think it encodes it to 0/1.
@@ -443,14 +444,13 @@ func performerStudiosCriterionHandler(qb *performerQueryBuilder, studios *models | |||
if studios != nil { | |||
var clauseCondition string | |||
|
|||
switch studios.Modifier { | |||
case models.CriterionModifierIncludes: | |||
if studios.Modifier == models.CriterionModifierIncludes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gocritic linter is likely to ask for a switch here.
WIP, it probably doesn't even build yet.
Final goal is to have:
Current time to beat is about 2 weeks to autotag images on my instance.