DataMethod
open class DataMethod : ObjectBase, @unchecked Sendable
Encapsulates the metadata of an OData function or action.
-
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 local name of this method within its owning
DataSchemaorEntityContainer, e.g. “MyAction”.Declaration
Swift
final public var localName: String -
A mangled name for this method, suitable for avoiding conflicts when generating code. This property is not automatically set during CSDL parsing; it is reserved for use by code generation tools.
Declaration
Swift
final public var mangledName: String -
The name of this method qualified by its owning
DataSchemaorEntityContainername, e.g. “MySchema.MyAction” (ifisImportedisfalse]) or “MyContainer.MyAction” (ifisImportedistrue]). The entity container prefix is omitted for the “default” entity container in the outermost schema.Declaration
Swift
final public var qualifiedName: String -
The name of this method as it should be referenced in resource paths.
Declaration
Swift
final public var resourcePath: String -
The name of this method qualified by its owning
DataSchemaandEntityContainernames, e.g. “MySchema.MyAction” (ifisImportedisfalse]) or “MySchema.MyContainer/MyAction” (ifisImportedistrue]).Declaration
Swift
final public var targetPath: String -
Qualified name of the associated unbound method. For OData V4+ ActionImport, this is the name of the corresponding Action. For OData V4+ FunctionImport, this is the name of the corresponding Function. Otherwise
nil.Declaration
Swift
final public var unboundMethod: String? -
trueif this method was added since metadata was originally loaded.Declaration
Swift
final public var isExtension: Bool -
Entity set bound to this method, or
nilif the method is not bound to an entity set.Declaration
Swift
final public var entitySet: EntitySet? -
HTTP Method (e.g. “GET”, “POST”) for this data method.
Declaration
Swift
final public var httpMethod: String? -
Source line number for this schema element within its defining schema.
Declaration
Swift
final public var sourceLine: Int -
Is this an ActionImport/FunctionImport (as opposed to an Action/Function)?
Declaration
Swift
final public var isImported: Bool -
trueif this method is a function, which is not permitted to change entity state.Declaration
Swift
final public var isFunction: Bool -
trueif this method is an action, which is permitted to change entity state.Declaration
Swift
final public var isAction: Bool -
Is this method bound to a value when it is applied?
Declaration
Swift
final public var isBound: Bool -
Is this method composable with another method?
Declaration
Swift
final public var isComposable: Bool -
trueif this item allows Unicode content. IfisUnicodeisfalse, then this item only allows ASCII content.Declaration
Swift
final public var isUnicode: Bool -
Minimum length for
stringandbinaryvalues.See also
TypeFacets.ANY_LENGTH.Declaration
Swift
final public var minLength: Int -
Maximum length for
stringandbinaryvalues.See also
TypeFacets.ANY_LENGTH.Declaration
Swift
final public var maxLength: Int -
Precision for
decimalandintegervalues.See also
TypeFacets.ANY_PRECISION.Declaration
Swift
final public var precision: Int -
Scale for
decimalvalues.See also
TypeFacets.FLOATING_SCALE,TypeFacets.VARIABLE_SCALE.Declaration
Swift
final public var scale: Int -
EPSG Spatial Reference System Identifier (SRID) for the associated value.
See also
TypeFacets.VARIABLE_SRID.Declaration
Swift
final public var srid: Int -
trueif this item is nullable.Declaration
Swift
final public var isOptional: 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 } -
Synonym for
resourcePath.Declaration
Swift
open var importedName: String { get } -
Is this method overloaded?
See also
overloadMap.Declaration
Swift
open var isOverloaded: Bool { get } -
Metrics for runtime use of this data method.
Declaration
Swift
@inline(__always) public final var metrics: DataMethodMetrics { get } -
Synonym for
qualifiedName.Declaration
Swift
open var name: String { get } -
Declaration
Swift
open func overload(name: String) -> DataMethodParameters
nameName to match with the
overloadMapkey.Return Value
The method from
overloadMapwhere the map key matchesname. -
Map of overloads of this function. If this map contains only one entry, the method is not overloaded.
Declaration
Swift
@inline(__always) public final var overloadMap: DataMethodMap { get } -
Formal parameters for this method.
See also
DataMethodCall.parameters.Declaration
Swift
public final var parameters: ParameterList { get set } -
Map of return type 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
@inline(__always) public final var returnAnnotations: AnnotationMap { get } -
Return type for this method.
Declaration
Swift
public final var returnType: DataType { get set } -
Parameter type signature for this method.
Declaration
Swift
open var signatureForParameters: String { get } -
Parameter type signature for this method.
Declaration
Swift
open var signatureForReturnType: String { get } -
Declaration
Swift
override open func toString() -> StringReturn Value
A string representation of this object.
-
Parameter/return type signature for this method.
Declaration
Swift
open var typeSignature: String { get }