WebcomKey
public struct WebcomKey : Codable, Hashable, Comparable, ExpressibleByStringLiteral, CustomStringConvertible
A value representing the key of a database node.
The order of the keys is defined as follows:
- Keys that are parsable as integers are ordered before all other keys.
- Integer keys (with no leading 0) are ordered following the natural order on integers.
- Integer keys representing the same number are ordered from the one with the least leading 0 to the one with the most leading 0.
- All other keys are ordered in lexicographic order.
Example:
0 < 1 < 01 < 001 < 7 < 09 < 72 < 521 < 1000 < aa < b < bb
-
The string representing this instance.
Declaration
Swift
public let value: String
-
Creates a new instance.
Declaration
Swift
public init(_ value: String)
Parameters
value
The string representing the key.
-
Creates a new instance.
When the
value
isnil
, this initializer fails to create an instance and it returnsnil
.Declaration
Swift
public init?(_ value: String?)
Parameters
value
The string representing the key.
-
Declaration
Swift
public init(stringLiteral value: StringLiteralType)
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public static func < (left: WebcomKey, right: WebcomKey) -> Bool
-
The date stored in this key, when it is timestamp-based.
A node created with the
DatasyncNode.createChild()
or theDatasyncNode.push(_:queue:then:)
method has a timestamp-based key, with a timestamp corresponding to its creation date.This property is
nil
when this key is not timestamp-based.Since
2.2.0Declaration
Swift
public var date: Date? { get }
-
Declaration
Swift
public var description: String { get }