MutableDocument

expect constructor()(source)

Creates a new Document object with a new random UUID. The created document will be saved into a database when you call the Database's save(Document) method with the document object given.


expect constructor(id: String?)(source)

Creates a new Document with the given ID. If the id is null, the document will be created with a new random UUID. The created document will be saved into a database when you call the Database's save(Document) method with the document object given.

Parameters

id

the document ID or null.


expect constructor(data: Map<String, Any?>)(source)

Creates a new Document with a new random UUID and the map as the content. Allowed value types are List, Instant, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Arrays, Maps and Dictionaries may contain only the above types. The created document will be saved into a database when you call Database.save(Document) with this document object.

Parameters

data

the Map object


expect constructor(id: String?, data: Map<String, Any?>)(source)

Creates a new Document with a given ID and content from the passed Map. If the id is null, the document will be created with a new random UUID. Allowed value types are List, Instant, Map, Number, null, String, Array, Blob, and Dictionary. The List and Map must contain only the above types. The created document will be saved into a database when you call the Database's save(Document) method with the document object given.

Parameters

id

the document ID.

data

the Map object


expect constructor(id: String?, json: String)(source)

Creates a new Document with the given ID and content from the passed JSON string. If the id is null, the document will be created with a new random UUID. The created document will be saved into a database when you call the Database's save(Document) method with the document object given.

Parameters

id

the document ID or null.

json

the document content as a JSON string.

actual constructor()(source)
actual constructor(id: String?)(source)
actual constructor(data: Map<String, Any?>)(source)
actual constructor(id: String?, data: Map<String, Any?>)(source)
actual constructor(id: String?, json: String)(source)
actual constructor()(source)
actual constructor(id: String?)(source)
actual constructor(data: Map<String, Any?>)(source)
actual constructor(id: String?, data: Map<String, Any?>)(source)
actual constructor(id: String?, json: String)(source)