SwiftstructAppIntents

struct AppIntents.SystemEntityQuery

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

Members 14

  1. fieldlet targetDescriptor: AppIntents.AppIntentTargetDescriptor+0x0
  2. fieldlet typeIdentifier: AppIntents.SystemEntityQuery<A>.TypeIdentifier+0x10
  3. funcentities(for: [A.ID]) async throws -> [A]
  4. funcentities(where: [AppIntents.SystemEntityQuery<A>.Comparison], compoundType: AppIntents.SystemEntityQuery<A>.CompoundType, maximumResultCount: Int?, sortingOptions: [AppIntents.SystemEntityQuery<A>.SortingOption]?) async throws -> [A]
  5. funcentities<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]
  6. funcentities<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]
  7. funcentities(matching: String) async throws -> [A]
  8. initinit(targetDescriptor: AppIntents.AppIntentTargetDescriptor, typeIdentifier: String) -> AppIntents.SystemEntityQuery<A>
  9. initinit(targetDescriptor: AppIntents.AppIntentTargetDescriptor, systemProtocolIdentifier: String) -> AppIntents.SystemEntityQuery<A>
  10. initinit() -> AppIntents.SystemEntityQuery<A>
  11. typealiastypealias DefaultValue = A
  12. typealiastypealias Entity = A
  13. typealiastypealias Result = Swift.Array<A>
  14. typealiastypealias Result = Swift.Array<A>
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]
}