Class Document
A class representing a document which cannot be altered
Inheritance
System.Object
Document
Implements
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.IEnumerable
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Couchbase.Lite.dll
Syntax
public class Document : IDictionaryObject, IDictionaryFragment, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IDisposable
Fields
|
Improve this Doc
View Source
_dict
The backing dictionary for this document
Declaration
protected IDictionaryObject _dict
Field Value
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Id
Gets this document's unique ID
Declaration
public string Id { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Item[String]
Declaration
public IFragment this[string key] { get; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
|
Improve this Doc
View Source
Keys
Declaration
public ICollection<string> Keys { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
|
Improve this Doc
View Source
RevisionID
The RevisionID in Document class is a constant, while the RevisionID in MutableDocument class is not.
Newly created document will have a null RevisionID. The RevisionID in MutableDocument will be updated on save.
The RevisionID format is opaque, which means it's format has no meaning and shouldn’t be parsed to get information.
Declaration
public string RevisionID { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Sequence
Gets the sequence of this document (a unique incrementing number
identifying its status in a database)
Declaration
public ulong Sequence { get; }
Property Value
Type |
Description |
System.UInt64 |
|
Methods
|
Improve this Doc
View Source
Contains(String)
Declaration
public bool Contains(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetArray(String)
Declaration
public ArrayObject GetArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
|
Improve this Doc
View Source
GetBlob(String)
Declaration
public Blob GetBlob(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
|
Improve this Doc
View Source
GetBoolean(String)
Declaration
public bool GetBoolean(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetDate(String)
Declaration
public DateTimeOffset GetDate(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.DateTimeOffset |
|
|
Improve this Doc
View Source
GetDictionary(String)
Declaration
public DictionaryObject GetDictionary(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
|
Improve this Doc
View Source
GetDouble(String)
Declaration
public double GetDouble(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
|
|
Improve this Doc
View Source
GetFloat(String)
Declaration
public float GetFloat(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
GetInt(String)
Declaration
public int GetInt(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
GetLong(String)
Declaration
public long GetLong(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
GetString(String)
Declaration
public string GetString(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetValue(String)
Declaration
public object GetValue(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
ToDictionary()
Declaration
public Dictionary<string, object> ToDictionary()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
|
Improve this Doc
View Source
ToMutable()
Creates a mutable version of a document (i.e. one that
can be edited)
Declaration
public virtual MutableDocument ToMutable()
Returns
Exceptions
Type |
Condition |
System.InvalidOperationException |
InvalidOperationException thrown when trying edit Documents from a replication filter.
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IDisposable