This commit is contained in:
2026-03-25 02:23:12 +01:00
parent c13365916c
commit 0f21ed1f81
6 changed files with 151 additions and 119 deletions

View File

@@ -46,7 +46,7 @@ func ParseWhereScopes[T any](c fiber.Ctx, ignoredKeys []string, formColumnMappin
}
func extractOperator(key string) (base string, operatorSuffix string) {
suffixes := []string{"_gt", "_gte", "_lt", "_lte", "_eq", "_neq"}
suffixes := []string{"_gt", "_gte", "_lt", "_lte", "_eq", "_neq", "_in"}
for _, suf := range suffixes {
if strings.HasSuffix(key, suf) {
return strings.TrimSuffix(key, suf), suf[1:]
@@ -69,6 +69,8 @@ func resolveOperator(suffix string) string {
return "!="
case "eq":
return "="
case "in":
return "IN"
default:
return "LIKE"
}