QueryBuilder
-
Given a
ForumPost
,Forum
, orCategory
query, adds filters to the query to filter out entities in categories the current user cannot see. Joins the Category (and the Forum, if necessary) to the query to do this.Declaration
Swift
@discardableResult func categoryAccessFilter(for possibleUser: UserCacheData?) -> <<error type>>
-
Uses Postgres full text search capabilities for improved search when using a Postgres db. This fn is modeled after the many filter() methods in FluentKit’s QueryBuilder+Filter.swift.
Declaration
Swift
@discardableResult public func fullTextFilter<Field>(_ field: KeyPath<Model, Field>, _ value: String) -> Self where Field: QueryableProperty, Field.Model == Model, Field.Value == String
-
Declaration
Swift
@discardableResult public func fullTextFilter<Joined, Field>( _ joined: Joined.Type, _ field: KeyPath<Joined, Field>, _ value: String ) -> Self where Joined: Schema, Field: QueryableProperty, Field.Model == Joined, Field.Value == String