DittoDocumentPath

Provides an interface to specify a path to a key in a document that you can then call a function on to get the value at the specified key as a specific type. You obtain a DittoDocumentPath by subscripting a DittoDocument and you can then further subscript a DittoDocumentPath to further specify the key of the document that you want to get the value of.

Initialization

  • Used to specify a path to a key in the document that you can subscript further to access a nested key in the document.

Value accessors

  • Returns the value at the previously specified key in the document as an Any?. It will be nil if no value exists.

  • Returns the value at the previously specified key in the document as a String if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a String. If the key was invalid the return value will be an empty string.

  • Returns the value at the previously specified key in the document as a Bool if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a String. If the key was invalid the return value will be an empty string.

  • int

    Returns the value at the previously specified key in the document as an Int if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as an Int. If the key was invalid the return value will be 0.

  • Returns the value at the previously specified key in the document as a UInt if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a UInt. If the key was invalid the return value will be 0.

  • Returns the value at the previously specified key in the document as a Float if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a Float. If the key was invalid the return value will be 0.

  • Returns the value at the previously specified key in the document as a Double if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a Double. If the key was invalid the return value will be 0.

  • Returns the value at the previously specified key in the document as an Array<Any?> if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as an Array<Any?>. If the key was invalid the return value will be an empty array.

  • Returns the value at the previously specified key in the document as a Dictionary<String, Any?> if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a Dictionary<String, Any?>. If the key was invalid the return value will be an empty dictionary.

  • Returns the value at the previously specified key in the document as a DittoAttachmentToken if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a DittoCounter if possible, otherwise the return value will be nil.

  • Returns the value at the previously specified key in the document as a DittoRegister if possible, otherwise the return value will be nil.