(Feat): Initial Commit
Some checks failed
Build & Test / build-test (push) Has been cancelled
Build & Test / swagger-codegen-cli (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled

This commit is contained in:
2026-07-03 19:41:31 +05:30
commit 7e940c83a7
461 changed files with 45002 additions and 0 deletions

22
internal/util/db/or.go Normal file
View File

@@ -0,0 +1,22 @@
package db
import "github.com/aarondl/sqlboiler/v4/queries/qm"
// CombineWithOr receives a slice of query mods and returns a new slice with
// a single query mod, combining all other query mods into an OR expression.
func CombineWithOr(qms []qm.QueryMod) []qm.QueryMod {
if len(qms) == 0 {
return []qm.QueryMod{}
}
if len(qms) == 1 {
return qms
}
q := []qm.QueryMod{qms[0]}
for _, sq := range qms[1:] {
q = append(q, qm.Or2(sq))
}
return []qm.QueryMod{qm.Expr(q...)}
}