(Feat): Initial Commit
This commit is contained in:
17
internal/util/db/query_mods.go
Normal file
17
internal/util/db/query_mods.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/aarondl/sqlboiler/v4/queries"
|
||||
"github.com/aarondl/sqlboiler/v4/queries/qm"
|
||||
)
|
||||
|
||||
// QueryMods represents a slice of query mods, implementing the `queries.Applicator`
|
||||
// interface to allow for usage with eager loading methods of models. Unfortunately,
|
||||
// sqlboiler does not import the (identical) type used by the library, so we have to
|
||||
// declare and "implemented" it ourselves...
|
||||
type QueryMods []qm.QueryMod
|
||||
|
||||
// Apply applies the query mods to the query provided
|
||||
func (m QueryMods) Apply(q *queries.Query) {
|
||||
qm.Apply(q, m...)
|
||||
}
|
||||
Reference in New Issue
Block a user