SwiftstructAppIntents
SystemEntityQuery
struct AppIntents.SystemEntityQuery
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolAppIntents.EntityQuery
- protocolAppIntents.EntityStringQuery
Members 14
- field
let targetDescriptor: AppIntents.AppIntentTargetDescriptor+0x0 - field
let typeIdentifier: AppIntents.SystemEntityQuery<A>.TypeIdentifier+0x10 - func
entities(for: [A.ID]) async throws -> [A] - func
entities(where: [AppIntents.SystemEntityQuery<A>.Comparison], compoundType: AppIntents.SystemEntityQuery<A>.CompoundType, maximumResultCount: Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] - func
entities<A where A1: AppIntents._IntentValue, A1: Sendable>(where: KeyPath<A, AppIntents.EntityProperty<A1>>, isBetween: (A1, A1), maximumResultCount: Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] - func
entities<A where A1: AppIntents._IntentValue, A1: Sendable>(where: KeyPath<A, AppIntents.EntityProperty<A1>>, _: AppIntents.SystemEntityQuery<A>.ComparisonType, _: A1, maximumResultCount: Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] - func
entities(matching: String) async throws -> [A] - init
init(targetDescriptor: AppIntents.AppIntentTargetDescriptor, typeIdentifier: String) -> AppIntents.SystemEntityQuery<A> - init
init(targetDescriptor: AppIntents.AppIntentTargetDescriptor, systemProtocolIdentifier: String) -> AppIntents.SystemEntityQuery<A> - init
init() -> AppIntents.SystemEntityQuery<A> - typealias
typealias DefaultValue = A - typealias
typealias Entity = A - typealias
typealias Result = Swift.Array<A> - typealias
typealias Result = Swift.Array<A>
Header
struct SystemEntityQuery<A> where A: AppIntents.AppEntityPrototype { enum QueryError { case unableToFindEntity case unableToFindPropertyQuery case providedValueIsNotEncodable case unableToFindEntityProperty } enum ComparisonType { case equalTo case notEqualTo case greaterThan case greaterThanOrEqualTo case lessThan case lessThanOrEqualTo case contains case hasPrefix case hasSuffix } enum SortOrder { case ascending case descending } enum CompoundType { case and case or } struct SortingOption { var keyPath: Swift.PartialKeyPath<A> var order: AppIntents.SystemEntityQuery<A>.SortOrder init<A1>(_: Swift.KeyPath<A, AppIntents.EntityProperty<A1>>, order: AppIntents.SystemEntityQuery<A>.SortOrder) where A1: AppIntents._IntentValue, A1: Swift.Sendable } struct Comparison { enum ComparisonTypeWrapper { case regular(AppIntents.SystemEntityQuery<A>.ComparisonType) case isBetween } var keyPath: Swift.PartialKeyPath<A> var value: any AppIntents._IntentValue var type: AppIntents.SystemEntityQuery<A>.Comparison.ComparisonTypeWrapper init<A1>(_: Swift.KeyPath<A, AppIntents.EntityProperty<A1>>, isBetween: (A1, A1)) where A1: AppIntents._IntentValue, A1: Swift.Sendable init<A1>(_: Swift.KeyPath<A, AppIntents.EntityProperty<A1>>, _: AppIntents.SystemEntityQuery<A>.ComparisonType, _: A1) where A1: AppIntents._IntentValue, A1: Swift.Sendable } enum TypeIdentifier { case id(Swift.String) case systemProtocolIdentifier(Swift.String) } let targetDescriptor: AppIntents.AppIntentTargetDescriptor let typeIdentifier: AppIntents.SystemEntityQuery<A>.TypeIdentifier init(targetDescriptor: AppIntents.AppIntentTargetDescriptor, typeIdentifier: Swift.String) init(targetDescriptor: AppIntents.AppIntentTargetDescriptor, systemProtocolIdentifier: Swift.String) init() func entities(for: [A.ID]) async throws -> [A] func entities(where: [AppIntents.SystemEntityQuery<A>.Comparison], compoundType: AppIntents.SystemEntityQuery<A>.CompoundType, maximumResultCount: Swift.Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] func entities<A1>(where: Swift.KeyPath<A, AppIntents.EntityProperty<A1>>, isBetween: (A1, A1), maximumResultCount: Swift.Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] where A1: AppIntents._IntentValue, A1: Swift.Sendable func entities<A1>(where: Swift.KeyPath<A, AppIntents.EntityProperty<A1>>, _: AppIntents.SystemEntityQuery<A>.ComparisonType, _: A1, maximumResultCount: Swift.Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A] where A1: AppIntents._IntentValue, A1: Swift.Sendable func entities(matching: Swift.String) async throws -> [A] }