EntitySet
open class EntitySet : ObjectBase, BindingPath, @unchecked Sendable
Encapsulates the metadata of an OData entity set.
Also used for OData isSingleton entities.
See also
DataService.createEntity, DataService.updateEntity, DataService.deleteEntity, DataService.getEntity, DataService.getEntityList.
-
Special value for
tableto indicate that this entity set should not be stored in the database.Declaration
Swift
public static let noTable: String -
Table type for column-based storage.
Declaration
Swift
public static let columnTable: String -
Table type for row-based storage.
Declaration
Swift
public static let rowTable: String -
Can this model element be removed by
DataService.refreshMetadata. Defaults tofalse. Set this totrueto indicate that the application is coded to be able able to function correctly without this model element.See also
isRemoved.Declaration
Swift
final public var canBeRemoved: Bool -
Has this model element been removed by a successful call to
DataService.refreshMetadata? IfisRemoved== true, that implies that the old metadata (before refreshMetadata was called) did include this model element, and that the new metadata (after refreshMetadata was called) does not include this model element.See also
canBeRemoved.Declaration
Swift
final public var isRemoved: Bool -
The
undefinedvalue for EntitySet.Declaration
Swift
public static let undefined: EntitySet -
The local name of this set within its owning
EntityContainer, e.g. “MyEntitySet”.Declaration
Swift
final public var localName: String -
The name of this set qualified by its owning
EntityContainername, e.g. “MyContainer.MyEntitySet”. The entity container prefix is omitted for the “default” entity container in the outermost schema.Declaration
Swift
final public var qualifiedName: String -
The percent-encoded
resourcePathfor use in server-generated context URLs.Declaration
Swift
final public var contextPath: String -
The percent-encoded
resourcePathfor use in client-generated request URLs.Declaration
Swift
final public var encodedPath: String -
The name of this set qualified by its owning
DataSchemaandEntityContainernames, e.g. “MySchema.MyContainer/MyEntitySet”.Declaration
Swift
final public var targetPath: String -
Is this set for client-only use in an offline scenario?
Declaration
Swift
final public var isClientOnly: Bool -
True if
draftSetnames another entity set havingisLocalDraftoftrue.Declaration
Swift
final public var hasLocalDraft: Bool -
Is this set for local draft use in an offline scenario?
Declaration
Swift
final public var isLocalDraft: Bool -
If
isLocalDraftistrue, then the name of the corresponding active (non-draft) entity set. Otherwise empty. OtherwiselocalName.Declaration
Swift
final public var activeSet: String -
If another entity set has
isLocalDraftoftrue, and theactiveSetof that draft entity set refers to this entity set, then the name of draft entity set. OtherwiselocalName.Declaration
Swift
final public var draftSet: String -
trueif this set was added since metadata was originally loaded.Declaration
Swift
final public var isExtension: Bool -
trueif a client for this entity set should use OpenAPI compatibility.Declaration
Swift
final public var openAPICompatibleClient: Bool -
Source line number for this schema element within its defining schema.
Declaration
Swift
final public var sourceLine: Int -
If
isSingletonistrue, can this singleton be null? Otherwisefalse.Declaration
Swift
final public var isOptional: Bool -
Does this entity set represent an OData singleton entity?
Declaration
Swift
final public var isSingleton: Bool -
Was this entity set synthesized to support entity containment?
Declaration
Swift
final public var isContainment: Bool -
Was this entity set synthesized to support service implementation?
Declaration
Swift
final public var isSynthesized: Bool -
Secondary indexes to be created in the database.
Declaration
Swift
final public var indexes: EntitySet.IndexList -
Database table for this entity set.
Declaration
Swift
final public var table: String? -
For internal use.
Declaration
Swift
final public var tablePrefix: String? -
Database table type for this entity set. If unset, the default table type depends on the target database.
See also
#constants) (COLUMN_TABLE, ROW_TABLE).Declaration
Swift
final public var tableType: String? -
Schema that contains the table.
Declaration
Swift
final public var schema: String? -
Is this a system entity set? A system entity set exists only in the local database (for internal use), not the backend system.
Declaration
Swift
final public var isSystem: Bool -
Does this entity set require a generated primary key.
Declaration
Swift
final public var generatedKey: Bool -
Name of key generator sequence (if
generatedKeyistrue).Declaration
Swift
final public var keyGenerator: String? -
Set to
trueto enable change tracking for this entity set. Defaults tofalse.Declaration
Swift
final public var trackChanges: Bool -
Set to
trueto enable download tracking for this entity set. Defaults tofalse.Declaration
Swift
final public var trackDownloads: Bool -
Set to
trueto enable hash tracking for this entity set. Defaults tofalse. Hash tracking is a non-default mechanism for change tracking.Declaration
Swift
final public var hashTracking: Bool -
Should the affected row count for local deletes be checked, to ensure that each expected deleted row was actually deleted? Defaults to
true.Declaration
Swift
final public var checkDeletes: Bool -
Should the affected row count for local updates be checked, to ensure that each expected updated row was actually updated? Defaults to
true.Declaration
Swift
final public var checkUpdates: Bool -
Should entities be reselected after create, to ensure that database-generated column values will be available afterwards? Defaults to
true.Declaration
Swift
final public var selectAfterCreate: Bool -
Should entities be reselected after update, to ensure that database-generated column values will be available afterwards? Defaults to
true.Declaration
Swift
final public var selectAfterUpdate: Bool -
Does this entity set have an error state column?
Declaration
Swift
final public var hasOfflineState: Bool -
Does this entity set have an offline key column?
Declaration
Swift
final public var hasOfflineKey: Bool -
Does this entity set have a backend etag column?
Declaration
Swift
final public var hasBackendETag: Bool -
Does this entity set have a row version column?
Declaration
Swift
final public var hasVersionColumn: Bool -
Is this entity set imported from an existing SQL database table?
Declaration
Swift
final public var isImportedFromSQL: Bool -
Default initializer.
Declaration
Swift
override public init() -
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
Declaration
Swift
open func annotation(withName term: String) -> AnnotationParameters
termThe term name.
Return Value
The annotation.
-
Obsolete. Use
annotations.Declaration
Swift
open var annotationList: AnnotationList { get } -
Obsolete. Use
annotations.Declaration
Swift
open var annotationMap: AnnotationMap { get } -
Map of annotations for this model element. For annotations without qualifiers, the entry key is the annotation term name. For annotations with qualifiers, the entry key is the annotation term name, then “#”, then the annotation qualifier.
Declaration
Swift
open var annotations: AnnotationMap { get } -
Lookup an existing navigation property binding by name.
Declaration
Swift
open func binding(withName name: String) -> EntitySetParameters
nameName of the property.
Return Value
The bound entity set.
-
List of default selection items for this entity set.
Declaration
Swift
@inline(__always) public final var defaultSelect: SelectItemList { get } -
The number of entities in each persistence batch during download. Defaults to 100.
Declaration
Swift
@inline(__always) public final var downloadBatchSize: Int { get set } -
For offline scenarios, should entities in this entity set be downloaded by default? Defaults to
true.Declaration
Swift
@inline(__always) public final var downloadEntitiesByDefault: Bool { get set } -
For offline scenarios, can separate download queries for this entity set have overlapping results? Defaults to
false.Declaration
Swift
@inline(__always) public final var downloadQueriesCanOverlap: Bool { get set } -
For offline scenarios, should streams in this entity set be downloaded by default? Defaults to
true.Declaration
Swift
@inline(__always) public final var downloadStreamsByDefault: Bool { get set } -
For offline scenarios, will the client ignore a delta links in responses to change tracking queries for this entity set? Defaults to
false.Declaration
Swift
@inline(__always) public final var downloadWithoutDeltaLinks: Bool { get set } -
Entity type for entities in this set.
Declaration
Swift
public final var entityType: EntityType { get set } -
An estimate of the time in seconds for delta download of this entity set. Setting this property may aid in determination of
OperationProgress.estimatedTimeRemaining.Declaration
Swift
@inline(__always) public final var estimatedDeltaDownloadTime: Double? { get set } -
An estimate of the time in seconds for initial download of this entity set. Setting this property may aid in determination of
OperationProgress.estimatedTimeRemaining.Declaration
Swift
@inline(__always) public final var estimatedInitialDownloadTime: Double? { get set } -
An estimate of the time in seconds for stream download of a media entity. Setting this property may aid in determination of
OperationProgress.estimatedTimeRemaining.Declaration
Swift
@inline(__always) public final var estimatedStreamDownloadTime: Double? { get set } -
Declaration
Swift
open func expand(_ items: PropertyPath...) -> ExpandablePathParameters
rest_itemsExpand items to be added to the expandable path.
Return Value
An expandable path starting with this resource path.
-
Force failure to save downloaded changed entities for this entity set (for testing only).
Declaration
Swift
@inline(__always) public final var failBeforeSavingAnyEntity: Bool { get set } -
Force failure to save downloaded delta links for this entity set (for testing only).
Declaration
Swift
@inline(__always) public final var failBeforeSavingDeltaLink: Bool { get set } -
Declaration
Swift
open func filter(test: QueryFilter) -> ExpandablePathParameters
testQuery filter to be added to the expandable path.
Return Value
An expandable path starting with this resource path.
-
Is this entity set downloadable?
Declaration
Swift
open var isDownloadable: Bool { get set } -
Was this entity set synthesized to support containment target?
Declaration
Swift
open var isSynthesizedTarget: Bool { get set } -
Is this entity set uploadable?
Declaration
Swift
open var isUploadable: Bool { get set } -
Metrics for runtime use of this entity set.
Declaration
Swift
@inline(__always) public final var metrics: EntitySetMetrics { get } -
Synonym for
qualifiedName.Declaration
Swift
open var name: String { get } -
Return a child path from an entity set. Cane be useful with queries using
DataQuery.join(...).Parameters
childpath.
Return Value
DataPath.from(this).path(child). -
Map of bindings from navigation properties to entity sets.
Declaration
Swift
@inline(__always) public final var pathBindings: EntitySetMap { get } -
The name of this set as it should be referenced in resource paths before any percent-encoding (e.g. localName for OData V4, qualifiedName for OData V2).
Declaration
Swift
open var resourcePath: String { get set } -
Declaration
Swift
open func select(_ items: PropertyPath...) -> ExpandablePathParameters
rest_itemsSelect items to be added to the expandable path.
Return Value
An expandable path starting with this resource path.
-
Declaration
Swift
override open func toString() -> StringReturn Value
A string representation of this object.
-
Declaration
Swift
open class func undefinedIfNull(entitySet: EntitySet?) -> EntitySetParameters
entitySetEntity set, or
nil.Return Value
undefinedifentitySetisnil, otherwise returnentitySet. -
The upload group for use in synchronization. Upload groups are used for selection of a subset of entity sets to upload.
See also
CloudSyncProvider.upload(groupsparameter).Declaration
Swift
@inline(__always) public final var uploadGroup: String? { get set } -
Metadata for an index on the containing entity set.
See moreDeclaration
Swift
open class Index : ObjectBase