コード例 #1
0
 /// <summary>
 /// Deletes the <see cref="Couchbase.Lite.Document"/>.
 /// </summary>
 /// <remarks>
 /// Deletes the <see cref="Couchbase.Lite.Document"/> by adding a deletion <see cref="Couchbase.Lite.Revision"/>.
 /// </remarks>
 /// <exception cref="Couchbase.Lite.CouchbaseLiteException">
 /// Thrown if an issue occurs while deleting the <see cref="Couchbase.Lite.Document"/>.
 /// </exception>
 public void Delete()
 {
     if (CurrentRevision != null)
     {
         CurrentRevision.DeleteDocument();
     }
 }
コード例 #2
0
ファイル: Document.cs プロジェクト: xiaoxiongnpu/SharpDB
        public void Update(ulong documentTimeStamp, long blobFileLocation, int blobSize, bool saveRevision)
        {
            CurrentRevision.Expire(documentTimeStamp);

            if (saveRevision)
            {
                m_revisions.Add(CurrentRevision.TimeStamp, CurrentRevision);
            }

            CurrentRevision = new DocumentRevision(DocumentId, documentTimeStamp, blobFileLocation, blobSize);
        }
コード例 #3
0
 /// <summary>Deletes this document by adding a deletion revision.</summary>
 /// <remarks>
 /// Deletes this document by adding a deletion revision.
 /// This will be replicated to other databases.
 /// </remarks>
 /// <returns>boolean to indicate whether deleted or not</returns>
 /// <exception cref="CouchbaseLiteException">CouchbaseLiteException</exception>
 /// <exception cref="Couchbase.Lite.CouchbaseLiteException"></exception>
 public void Delete()
 {
     CurrentRevision.DeleteDocument();
 }