Class
QueryBuilder
final class QueryBuilder<Model> where Model : Model
Topics
Initializers
Instance Properties
Instance Methods
func aggregate(_:_:as:)func aggregate(_:as:)func all()func all(_:)func all(_:_:)func average(_:)func chunk(max:closure:)func copy() -> QueryBuilder<Model>func count()func count(_:)func create()func delete(force:)func field(_:)func field<Joined, Field>(Joined.Type, KeyPath<Joined, Field>) -> Selffunc fields<Joined>(for: Joined.Type) -> Selffunc filter(_:)func filter(_:_:)func filter(_:_:_:)func filter<Joined, Field>(Joined.Type, KeyPath<Joined, Field>, DatabaseQuery.Filter.Method, Field.Value) -> Selffunc first()func group(DatabaseQuery.Filter.Relation, (QueryBuilder<Model>) throws -> ()) rethrows -> Selffunc join<Foreign>(Foreign.Type, [DatabaseQuery.Filter], method: DatabaseQuery.Join.Method) -> Self.join(Foreign.self, filters, method: method)func join<Foreign, Local>(Local.Type, Foreign.Type, on: DatabaseQuery.Join) -> Selffunc join<Foreign>(Foreign.Type, on: DatabaseQuery.Join) -> Self.join(Foreign.self, on: databaseJoin)func join(_:on:method:)func join<To>(child: KeyPath<Model, OptionalChildProperty<Model, To>>, method: DatabaseQuery.Join.Method) -> SelfThis will join a foreign table based on a@OptionalChildrelationfunc join<To>(children: KeyPath<Model, ChildrenProperty<Model, To>>, method: DatabaseQuery.Join.Method) -> SelfThis will join a foreign table based on a@Childrenrelationfunc join<From, To>(from: From.Type, child: KeyPath<From, OptionalChildProperty<From, To>>, method: DatabaseQuery.Join.Method) -> SelfThis will join a foreign table based on a@OptionalChildrelationfunc join<From, To>(from: From.Type, children: KeyPath<From, ChildrenProperty<From, To>>, method: DatabaseQuery.Join.Method) -> SelfThis will join a foreign table based on a@Childrenrelationfunc join(from:parent:method:)This will join a foreign table based on a@OptionalParentrelationfunc join<From, To, Through>(from: From.Type, siblings: KeyPath<From, SiblingsProperty<From, To, Through>>) -> SelfThis will join the foreign table based on a@Siblingsrelation This will result in joining two tables. The Pivot table and the wanted model tablefunc join(parent:method:)This will join a foreign table based on a@OptionalParentrelationfunc join<To, Through>(siblings: KeyPath<Model, SiblingsProperty<Model, To, Through>>) -> SelfThis will join the foreign table based on a@Siblingsrelation This will result in joining two tables. The Pivot table and the wanted model tablefunc limit(Int) -> Selffunc max(_:)func min(_:)func offset(Int) -> Selffunc page(withIndex:size:)Returns a singlePageout of the complete result set.func paginate(_:)Returns a singlePageout of the complete result set according to the suppliedPageRequest.func range(_:)Limits the results of this query to the specified range.func range(lower: Int, upper: Int?) -> SelfLimits the results of this query to the specified range.func run()func run(_:)func set(_:)func set(_:to:)func sort(DatabaseQuery.Sort) -> Selffunc sort(_:_:)func sort(_:_:_:alias:)func sum(_:)func unique() -> Selffunc update()func withDeleted() -> Self
Default Implementations
Relationships
Conforms To
EagerLoadBuilderSwift.CopyableSwift.Escapable