DittoDocumentId

fun DittoDocumentId(value: Any)

Creates a new DittoDocumentId.

A document identifier 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 identifier.

Document identifiers 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 identifier that exceeds the size limit.

Return

a DittoDocumentId that uniquely identifies a DittoDocument.

Parameters

value

the value that represents the document identifier.