DataPath
open class DataPath : PropertyPath, BindingPath, @unchecked Sendable
Used together with DataQuery to represent a select, expand or sort item which is a single-part or multi-part path expression.
For example, a path whose OData URL representation is “Address/City” might be used to access the “City” property in a complex-typed “Address” property.
Also used to represent paths in OData CSDL.
-
Sets the item index to address an element of an entity collection.
Declaration
Swift
open func atIndex(_ itemIndex: Int) -> DataPathParameters
itemIndexZero-based index of the element in the collection.
Return Value
This data path.
-
Declaration
Swift
open func changeRoot(newRoot: DataPath) -> DataPathParameters
newRootReplacement for
rootProperty.Return Value
A copy of this data path with the
rootPropertychanged. -
Declaration
Swift
override open func copyMutable() -> DataValueReturn Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
selfvalue if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query. -
Data type with a
DataType.codeofDataType.PATH,DataType.PATH_EXPRESSION,DataType.ANNOTATION_PATH,DataType.NAVIGATION_PATH,DataType.STRUCTURAL_PATH, orDataType.DYNAMIC_PATH.Declaration
Swift
override open var dataType: DataType { get } -
The defined property for a single-part path or the terminating defined property for a multi-part path.
See also
of,path.Declaration
Swift
@inline(__always) public final var definedProperty: Property? { get } -
Declaration
Swift
open func dotString() -> StringReturn Value
the OData CSDL path expression syntax for this path (‘.’-separated segments).
-
Construct a new multi-part path, with this path as the
parentPath.Declaration
Swift
open func dynamicPath(_ child: String) -> DataPathParameters
childValue for
dynamicPropertyin the new path.Return Value
A new multi-part path.
-
The dynamic property for a single-part path or the terminating dynamic property for a multi-part path.
See also
ofDynamic,dynamicPath.Declaration
Swift
@inline(__always) public final var dynamicProperty: String? { get } -
The entity key in an entity collection.
Declaration
Swift
open var entityKey: EntityKey? { get } -
The entity set for an entity collection.
Declaration
Swift
open var entitySet: EntitySet? { get } -
Declaration
Swift
open func hasSegments() -> BoolReturn Value
trueif this path has segments. -
trueif this path has typeDataType.NAVIGATION_PATH.Declaration
Swift
open var isNavigation: Bool { get } -
Declaration
Swift
open func isNavigationProperty(_ property: Property? = nil) -> BoolParameters
propertySpecified target property, or `null’ to check if this path is a simple navigation property path.
Return Value
trueif this path is simply for the specified target navigationproperty. -
Declaration
Swift
open func isProperty(_ property: Property? = nil) -> BoolParameters
propertySpecified target property, or `null’ to check if this path is a simple property path.
Return Value
trueif this path is simply for the specified targetproperty. -
trueif this path has typeDataType.STRUCTURAL_PATH.Declaration
Swift
open var isStructural: Bool { get } -
Declaration
Swift
open func isStructuralProperty(_ property: Property? = nil) -> BoolParameters
propertySpecified target property, or `null’ to check if this path is a simple structural property path.
Return Value
trueif this path is simply for the specified target structuralproperty. -
The index of an element in a collection.
Declaration
Swift
open var itemIndex: Int? { get } -
Declaration
Swift
open class func lambda(_ name: String, _ type: StructureType? = nil) -> DataPathParameters
nameLambda variable name.
typeLambda variable type.
Return Value
A new lambda-variable path (for use with ‘any’ and ‘all’ lambda operators).
-
The lambda variable type for a lambda variable path.
See also
lambda.Declaration
Swift
@inline(__always) public final var lambdaType: StructureType? { get } -
The lambda variable name for a lambda variable path.
See also
lambda.Declaration
Swift
@inline(__always) public final var lambdaVariable: String? { get } -
Declaration
Swift
open class func of(_ property: Property) -> DataPathParameters
propertyValue for
definedPropertyin the new path.Return Value
A new property path.
-
Construct a new single-part path.
Declaration
Swift
open class func ofDynamic(_ start: String) -> DataPathParameters
startValue for
dynamicPropertyin the new path.Return Value
A new single-part path.
-
The parent path for a multi-part path;
nilfor a single-part path.See also
path.Declaration
Swift
open var parentPath: DataPath? { get } -
Declaration
Swift
open func path(_ child: Property) -> DataPathParameters
childValue for
definedPropertyin the new path.Return Value
A new multi-part path, with this path as the
parentPath. -
The ‘/’-separated segments in this path, as a list.
Declaration
Swift
open var pathSegments: StringList { get } -
Data type code of
DataType.PATH,DataType.PATH_EXPRESSION,DataType.ANNOTATION_PATH,DataType.NAVIGATION_PATH,DataType.STRUCTURAL_PATH, orDataType.DYNAMIC_PATH.Declaration
Swift
open var pathType: Int { get } -
Declaration
Swift
open func resolveType() -> DataTypeReturn Value
The resolved data type of this path, or
DataType.unknownif it cannot be determined statically. -
The
DataPathat the root of this path. The root path has noparentPath.Declaration
Swift
open var rootPath: DataPath { get } -
The
definedPropertyfrom the topmostparentPathin this path, ornilif unknown.Declaration
Swift
open var rootProperty: Property? { get } -
The number of segments in this path.
Declaration
Swift
open var segmentCount: Int { get } -
See also
withSegments.Declaration
Swift
open class func toDynamic(segments: StringList) -> DataPathParameters
segmentsPath segments. Must not be empty.
Return Value
A new data path with the specified
type, using chainedparentPathanddynamicPropertyrather thanpathSegments. -
Declaration
Swift
override open func toPath() -> DataPathReturn Value
this property or path, expressed as a
DataPath. -
Declaration
Swift
override open func toString() -> StringReturn Value
the OData CSDL path expression syntax for this path (‘/’-separated segments).
-
Declaration
Swift
override open func unwrap() -> DataValueReturn Value
The path, property, constant value or query function/operator call which is wrapped by this object.
-
Sets the entity key to address an element of an entity collection.
Declaration
Swift
open func withKey(_ entityKey: EntityKey) -> DataPathParameters
entityKeyEntity key of the element in the entity collection.
Return Value
This data path.
-
Declaration
Swift
open func withParent(_ parent: DataPath) -> DataPathParameters
parentParent for the copied path.
Return Value
A copy of this data path with the specified
parentas theparentPathof the priorrootPath. -
Declaration
Swift
open class func withSegments(type: Int, segments: StringList) -> DataPathParameters
typeValue for
pathType.segmentsValue for
pathSegments.Return Value
A new data path with the specified
typeandsegments.