@objc(RealmSwiftObjectId)
public final class ObjectId : RLMObjectId, Decodable, @unchecked Sendable
extension ObjectId: Encodable
extension ObjectId: Comparable
extension ObjectId: _RealmCollectionValueInsideOptional
A 12-byte (probably) unique object identifier.
ObjectIds are similar to a GUID or a UUID, and can be used to uniquely identify objects without a centralized ID generator. An ObjectID consists of:
ObjectIds are intended to be fast to generate. Sorting by an ObjectId field will typically result in the objects being sorted in creation order.
Creates a new zero-initialized ObjectId.
DeclarationSwift
public override required init()
Creates a new randomly-initialized ObjectId.
DeclarationSwift
public override static func generate() -> ObjectId
Creates a new ObjectId from the given 24-byte hexadecimal string.
Throws if the string is not 24 characters or contains any characters other than 0-9a-fA-F.
DeclarationSwift
public override required init(string: String) throws
Parameters string
The string to parse.
Creates a new ObjectId using the given date, machine identifier, process identifier.
DeclarationSwift
public required init(timestamp: Date, machineId: Int, processId: Int)
Parameters timestamp
A timestamp as NSDate.
machineId
The machine identifier.
processId
The process identifier.
Creates a new ObjectId from the given 24-byte hexadecimal static string.
Aborts if the string is not 24 characters or contains any characters other than 0-9a-fA-F. Use the initializer which takes a String to handle invalid strings at runtime.
DeclarationSwift
public required init(_ str: StaticString)
Creates a new ObjectId by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
DeclarationSwift
public required init(from decoder: Decoder) throws
Parameters decoder
The decoder to read data from.
Encodes this ObjectId into the given encoder.
This function throws an error if the given encoder is unable to encode a string.
DeclarationSwift
public func encode(to encoder: Encoder) throws
Parameters encoder
The encoder to write data to.
Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.
DeclarationSwift
public static func < (lhs: ObjectId, rhs: ObjectId) -> Bool
Parameters lhs
An ObjectId value to compare.
rhs
Another ObjectId value to compare.
Returns a Boolean value indicating whether the ObjectId of the first argument is less than or equal to that of the second argument.
DeclarationSwift
public static func <= (lhs: ObjectId, rhs: ObjectId) -> Bool
Parameters lhs
An ObjectId value to compare.
rhs
Another ObjectId value to compare.
Returns a Boolean value indicating whether the ObjectId of the first argument is greater than or equal to that of the second argument.
DeclarationSwift
public static func >= (lhs: ObjectId, rhs: ObjectId) -> Bool
Parameters lhs
An ObjectId value to compare.
rhs
Another ObjectId value to compare.
Returns a Boolean value indicating whether the ObjectId of the first argument is greater than that of the second argument.
DeclarationSwift
public static func > (lhs: ObjectId, rhs: ObjectId) -> Bool
Parameters lhs
An ObjectId value to compare.
rhs
Another ObjectId value to compare.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4