-
Notifications
You must be signed in to change notification settings - Fork 8
SublimateQueryBuilder
mxcl edited this page Dec 15, 2020
·
8 revisions
public struct SublimateQueryBuilder<Model: FluentKit.Model>
public init(_ kernel: QueryBuilder<Model>)
let kernel: QueryBuilder<Model>
@discardableResult @inlinable func join<Foreign, Local, Value>(_ foreign: Foreign.Type, on filter: JoinFilter<Foreign, Local, Value>, method: DatabaseQuery.Join.Method = .inner) -> Self where Foreign: Schema, Local: Schema
@discardableResult @inlinable func group(_ relation: DatabaseQuery.Filter.Relation = .and, _ closure: (QueryBuilder<Model>) throws -> ()) rethrows -> Self
@discardableResult @inlinable func filter(_ filter: ModelValueFilter<Model>) -> Self
@discardableResult @inlinable func filter<Field>(_ field: KeyPath<Model, Field>, _ method: DatabaseQuery.Filter.Method, _ value: Field.Value) -> Self where Field: QueryableProperty, Field.Model == Model
@discardableResult @inlinable func filter<Joined>(_ schema: Joined.Type, _ filter: FluentKit.ModelValueFilter<Joined>) -> Self where Joined: FluentKit.Schema
@inlinable func all() throws -> [Model]
@inlinable func limit(_ count: Int) -> Self
@inlinable func offset(_ count: Int) -> Self
@inlinable func unique() -> Self
@inlinable func chunk(max: Int, closure: @escaping ([Result<Model, Error>]) -> ()) throws -> Void
@inlinable func first() throws -> Model?
func first<With: FluentKit.Model>(with other: With.Type) throws -> (Model, With)?
func first<With: FluentKit.Model, And: FluentKit.Model>(with: With.Type, _ and: And.Type) throws -> (Model, With, And)?
func first(or _: CO₂.QueryOptions? = nil, file: String = #file, line: UInt = #line) throws -> Model
func first<With: FluentKit.Model>(or _: CO₂.QueryOptions, with other: With.Type, file: String = #file, line: UInt = #line) throws -> (Model, With)
@inlinable func exists() throws -> Bool
@inlinable func range(_ range: PartialRangeThrough<Int>) -> Self
@inlinable func delete() throws
@inlinable func with<Relation>(_ relationKey: KeyPath<Model, Relation>) -> Self where Relation: EagerLoadable, Relation.From == Model
@inlinable func sort<Field>(_ field: KeyPath<Model, Field>, _ direction: DatabaseQuery.Sort.Direction = .ascending) -> Self where Field: QueryableProperty, Field.Model == Model
@inlinable func sort(_ path: FieldKey, _ direction: DatabaseQuery.Sort.Direction = .ascending) -> Self
@inlinable func sort(_ path: [FieldKey], _ direction: DatabaseQuery.Sort.Direction = .ascending) -> Self
@inlinable func sort<Joined, Field>(_ joined: Joined.Type, _ field: KeyPath<Joined, Field>, _ direction: DatabaseQuery.Sort.Direction = .ascending, alias: String? = nil) -> Self where Field: QueryableProperty, Field.Model == Joined, Joined: Schema
@inlinable func sort<Joined>(_ model: Joined.Type, _ path: FieldKey, _ direction: DatabaseQuery.Sort.Direction = .ascending, alias: String? = nil) -> Self where Joined: Schema
@inlinable func sort<Joined>(_ model: Joined.Type, _ path: [FieldKey], _ direction: DatabaseQuery.Sort.Direction = .ascending, alias: String? = nil) -> Self where Joined: Schema
@inlinable func sort(_ field: DatabaseQuery.Field, _ direction: DatabaseQuery.Sort.Direction) -> Self
@inlinable func sort(_ sort: DatabaseQuery.Sort) -> Self
@inlinable func count() throws -> Int
@inlinable func count<Field>(_ key: KeyPath<Model, Field>) throws -> Int where Field: QueryableProperty, Field.Model == Model
@inlinable func sum<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value? where Field: QueryableProperty, Field.Model == Model
@inlinable func sum<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value where Field: QueryableProperty, Field.Value: OptionalType, Field.Model == Model
@inlinable func average<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value? where Field: QueryableProperty, Field.Model == Model
@inlinable func average<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value where Field: QueryableProperty, Field.Value: OptionalType, Field.Model == Model
@inlinable func min<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value? where Field: QueryableProperty, Field.Model == Model
@inlinable func min<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value where Field: QueryableProperty, Field.Value: OptionalType, Field.Model == Model
@inlinable func max<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value? where Field: QueryableProperty, Field.Model == Model
@inlinable func max<Field>(_ key: KeyPath<Model, Field>) throws -> Field.Value where Field: QueryableProperty, Field.Value: OptionalType, Field.Model == Model
Generated at 2020-12-15T20:31:16+0000 using swift-doc 1.0.0-beta.5.