GuidValue
open class GuidValue : DataValue, @unchecked Sendable
Encapsulates an OData GUID value.
-
Compare two wrapped values for ordering.
Declaration
Swift
open class func compare(x: GuidValue, y: GuidValue) -> IntParameters
xFirst object for comparison.
ySecond object for comparison.
Return Value
-1 if
x.value < y.value, 0 ifx.value == y.value, or 1 ifx.value > y.value. -
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. -
The type BasicType.GUID_VALUE.
Declaration
Swift
override open var dataType: DataType { get } -
Compare two wrapped values for equality.
Declaration
Swift
open class func equal(x: GuidValue?, y: GuidValue?) -> BoolParameters
xFirst object for comparison.
ySecond object for comparison.
Return Value
trueifx.value == y.valueor if both arguments arenil, otherwisefalse. -
Parse a string (32/36-character GUID format) to a GuidValue. Use
parseif thevalueis not guaranteed to be in the correct format.Declaration
Swift
open class func literal(_ text: String) -> GuidValueParameters
textValue to be parsed.
Return Value
The wrapped value.
-
Wrap a
GUIDvalue as a GuidValue.Declaration
Swift
open class func of(_ value: GUID) -> GuidValueParameters
valueValue to be wrapped.
Return Value
The wrapped value.
-
Wrap a
GUIDvalue as a GuidValue.Declaration
Swift
open class func ofOptional(_ value: GUID?) -> GuidValue?Parameters
valueValue to be wrapped.
Return Value
The wrapped value.
-
Parse a string (32/36-character GUID format) to a GuidValue.
Declaration
Swift
open class func parse(_ text: String) -> GuidValue?Parameters
textValue to be parsed.
Return Value
The wrapped value, or `null’ if the text cannot be parsed.
-
Declaration
Swift
open class func random() -> GuidValueReturn Value
A new random (Version 4) GuidValue.
-
Convert the wrapped value to binary format (16 bytes).
Declaration
Swift
open func toBinary() -> DataReturn Value
16-byte GUID format of
value. -
Convert this data value to a string. If the
dataTypeis defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).Declaration
Swift
override open func toString() -> StringReturn Value
Lexical representation of this data value.
-
Convert the wrapped value to the 32-character GUID format, e.g. “21ec20203aea1069a2dd08002b30309d”.
Declaration
Swift
open func toString32() -> StringReturn Value
32-character GUID format of
value. -
Convert the wrapped value to the 36-character GUID format, e.g. “21ec2020-3aea-1069-a2dd-08002b30309d”.
Declaration
Swift
open func toString36() -> StringReturn Value
36-character GUID format of
value. -
The wrapped value.
Declaration
Swift
public final var value: GUID { get }