Document

actual open class Document : DelegatedClass<CBLDocument> , DictionaryInterface, Iterable<String> (source)

Inheritors

Readonly version of the Document.

Inheritors

actual open class Document : DelegatedClass<<Error class: unknown class>> , Iterable<String> , DictionaryInterface(source)

Inheritors

Properties

Link copied to clipboard
actual val collection: Collection?
expect val collection: Collection?

The collection to which the document belongs.

actual val collection: Collection?
actual val collection: Collection?
Link copied to clipboard
actual open override val count: Int
expect open override val count: Int

The number of the entries in the document.

actual open override val count: Int

The number of the entries in the dictionary.

actual open override val count: Int
Link copied to clipboard
actual val id: String
expect val id: String

The document's ID.

actual val id: String
actual val id: String
Link copied to clipboard
actual open override val keys: List<String>
expect open override val keys: List<String>

A List containing all keys, or an empty List if the document has no properties.

actual open override val keys: List<String>

A List containing all keys, or an empty List if the dictionary has no properties.

actual open override val keys: List<String>
Link copied to clipboard
actual val revisionID: String?
expect val revisionID: String?

The document's revision id. The revision id in the Document class is a constant while the revision id in the MutableDocument class is not. A newly created Document will have a null revision id. The revision id in a MutableDocument will be updated on save. The revision id format is opaque, which means its format has no meaning and shouldn't be parsed to get information.

actual val revisionID: String?
actual val revisionID: String?
Link copied to clipboard
actual val sequence: Long
expect val sequence: Long

The sequence number of the document in the database. The sequence number indicates how recently the document has been changed. Every time a document is updated, the database assigns it the next sequential sequence number. Thus, when a document's sequence number changes it means that the document been updated (on-disk). If one document's sequence is different from another's, the document with the larger sequence number was changed more recently. Sequence numbers are not available for documents obtained from a replication filter. This method will always return 0 for such documents.

actual val sequence: Long
actual val sequence: Long

Functions

Link copied to clipboard
actual open operator override fun contains(key: String): Boolean
expect open operator override fun contains(key: String): Boolean

Tests whether a property exists or not. This can be less expensive than getValue(String), because it does not have to allocate an Object for the property value.

actual open operator override fun contains(key: String): Boolean

Tests whether a property exists or not. This can be less expensive than getValue(String), because it does not have to allocate an Object for the property value.

actual open operator override fun contains(key: String): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Subscript access to a Fragment object of the projecting result value for the given key.

Link copied to clipboard
actual open override fun getArray(key: String): Array?
expect open override fun getArray(key: String): Array?

Get a property's value as an Array. Returns null if the property doesn't exist, or its value is not an Array.

actual open override fun getArray(key: String): Array?

Get a property's value as an Array. Returns null if the property doesn't exist, or its value is not an array.

actual open override fun getArray(key: String): Array?
Link copied to clipboard
actual open override fun getBlob(key: String): Blob?
expect open override fun getBlob(key: String): Blob?

Gets a property's value as a Blob. Returns null if the value doesn't exist, or its value is not a Blob.

actual open override fun getBlob(key: String): Blob?

Gets a property's value as a Blob. Returns null if the value doesn't exist, or its value is not a Blob.

actual open override fun getBlob(key: String): Blob?
Link copied to clipboard
actual open override fun getBoolean(key: String): Boolean
expect open override fun getBoolean(key: String): Boolean

Gets a property's value as a boolean. Returns true if the value exists, and is either true or a nonzero number.

actual open override fun getBoolean(key: String): Boolean

Gets a property's value as a boolean. Returns true if the value exists, and is either true or a nonzero number.

actual open override fun getBoolean(key: String): Boolean
Link copied to clipboard
actual open override fun getDate(key: String): Instant?
expect open override fun getDate(key: String): Instant?

Gets a property's value as an Instant date. JSON does not directly support dates, so the actual property value must be a string, which is then parsed according to the ISO-8601 date format (the default used in JSON.) Returns null if the value doesn't exist, is not a string, or is not parsable as a date. NOTE: This is not a generic date parser! It only recognizes the ISO-8601 format, with or without milliseconds.

actual open override fun getDate(key: String): Instant?

Gets a property's value as an Instant date. JSON does not directly support dates, so the actual property value must be a string, which is then parsed according to the ISO-8601 date format (the default used in JSON.) Returns null if the value doesn't exist, is not a string, or is not parsable as a date. NOTE: This is not a generic date parser! It only recognizes the ISO-8601 format, with or without milliseconds.

actual open override fun getDate(key: String): Instant?
Link copied to clipboard
actual open override fun getDictionary(key: String): Dictionary?
expect open override fun getDictionary(key: String): Dictionary?

Get a property's value as a Dictionary. Returns null if the property doesn't exist, or its value is not a Dictionary.

actual open override fun getDictionary(key: String): Dictionary?

Get a property's value as a Dictionary. Returns null if the property doesn't exist, or its value is not a dictionary.

actual open override fun getDictionary(key: String): Dictionary?
Link copied to clipboard
actual open override fun getDouble(key: String): Double
expect open override fun getDouble(key: String): Double

Gets a property's value as a double. Integers will be converted to double. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the property doesn't exist or does not have a numeric value.

actual open override fun getDouble(key: String): Double

Gets a property's value as a double. Integers will be converted to double. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the property doesn't exist or does not have a numeric value.

actual open override fun getDouble(key: String): Double
Link copied to clipboard
actual open override fun getFloat(key: String): Float
expect open override fun getFloat(key: String): Float

Gets a property's value as a float. Integers will be converted to float. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the value doesn't exist or does not have a numeric value.

actual open override fun getFloat(key: String): Float

Gets a property's value as a float. Integers will be converted to float. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the value doesn't exist or does not have a numeric value.

actual open override fun getFloat(key: String): Float
Link copied to clipboard
actual open override fun getInt(key: String): Int
expect open override fun getInt(key: String): Int

Gets a property's value as an int. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual open override fun getInt(key: String): Int

Gets a property's value as an int. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual open override fun getInt(key: String): Int
Link copied to clipboard
actual open override fun getLong(key: String): Long
expect open override fun getLong(key: String): Long

Gets a property's value as a long. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual open override fun getLong(key: String): Long

Gets a property's value as a long. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual open override fun getLong(key: String): Long
Link copied to clipboard
actual open override fun getNumber(key: String): Number?
expect open override fun getNumber(key: String): Number?

Gets a property's value as a Number. Returns null if the value doesn't exist, or its value is not a Number.

actual open override fun getNumber(key: String): Number?

Gets a property's value as a Number. Returns null if the value doesn't exist, or its value is not a Number.

actual open override fun getNumber(key: String): Number?
Link copied to clipboard
actual open override fun getString(key: String): String?
expect open override fun getString(key: String): String?

Gets a property's value as a String. Returns null if the value doesn't exist, or its value is not a String.

actual open override fun getString(key: String): String?

Gets a property's value as a String. Returns null if the value doesn't exist, or its value is not a String.

actual open override fun getString(key: String): String?
Link copied to clipboard
actual open override fun getValue(key: String): Any?
expect open override fun getValue(key: String): Any?

Gets a property's value as an object. The object types are Blob, Array, Dictionary, Number, or String based on the underlying data type; or null if the property value is null or the property doesn't exist.

actual open override fun getValue(key: String): Any?

Gets a property's value as an object. The object types are Blob, Array, Dictionary, Number, or String based on the underlying data type; or null if the property value is null or the property doesn't exist.

actual open override fun getValue(key: String): Any?
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
actual open operator override fun iterator(): Iterator<String>
expect open operator override fun iterator(): Iterator<String>

Gets an iterator over the keys of the document's properties

actual open operator override fun iterator(): Iterator<String>
actual open operator override fun iterator(): Iterator<String>
Link copied to clipboard
actual open override fun toJSON(): String
expect open override fun toJSON(): String

Encode a Dictionary as a JSON string

actual open override fun toJSON(): String

Encode a Dictionary as a JSON string

actual open override fun toJSON(): String
Link copied to clipboard
actual open override fun toMap(): Map<String, Any?>
expect open override fun toMap(): Map<String, Any?>

Gets content of the current object as a Map. The values contained in the returned Map object are all JSON based values.

actual open override fun toMap(): Map<String, Any?>

Gets content of the current object as a Map. The values contained in the returned Map object are all JSON based values.

actual open override fun toMap(): Map<String, Any?>
Link copied to clipboard
actual open fun toMutable(): MutableDocument
expect open fun toMutable(): MutableDocument

Return a mutable copy of the document

actual open fun toMutable(): MutableDocument
actual open fun toMutable(): MutableDocument
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String