DittoDocumentID

fun DittoDocumentID(value: Any)

Creates a new DittoDocumentID.

A document ID can be created from any of the following:

  • string

  • integer

  • boolean

  • null

  • byte array

  • array (containing any of the items in this list)

  • map (where the keys must be strings and the values can be made up of any of the items in this list)

Note that you cannot use floats or other custom types to create a document ID.

Document IDs are also limited in size, based on their serialized representation, to 256 bytes. You will receive an error if you try to create a document ID that exceeds the size limit.

Return

a DittoDocumentID that uniquely identifies a DittoDocument.

Parameters

value

the value that represents the document identifier.