コード例 #1
0
 internal Query(Database database, View view)
 {
     // Always update index if needed before querying (default)
     // Don't update the index; results may be out of date
     // Update index _after_ querying (results may still be out of date)
     // (the default), the query simply returns all non-deleted documents.
     // in this mode it also returns deleted documents.
     // the .conflictingRevisions property of each row will return the conflicting revisions, if any, of that document.
     // _only_ documents in conflict will be returned. (This mode is especially useful for use with a CBLLiveQuery, so you can be notified of conflicts as they happen, i.e. when they're pulled in by a replication.)
     // null for _all_docs query
     this.database   = database;
     this.view       = view;
     limit           = int.MaxValue;
     mapOnly         = (view != null && view.GetReduce() == null);
     indexUpdateMode = Query.IndexUpdateMode.Before;
     allDocsMode     = Query.AllDocsMode.AllDocs;
 }
コード例 #2
0
ファイル: Query.cs プロジェクト: Redth/couchbase-lite-net
		internal Query(Database database, View view)
		{
			// Always update index if needed before querying (default)
			// Don't update the index; results may be out of date
			// Update index _after_ querying (results may still be out of date)
			// (the default), the query simply returns all non-deleted documents.
			// in this mode it also returns deleted documents.
			// the .conflictingRevisions property of each row will return the conflicting revisions, if any, of that document.
			// _only_ documents in conflict will be returned. (This mode is especially useful for use with a CBLLiveQuery, so you can be notified of conflicts as they happen, i.e. when they're pulled in by a replication.)
			// null for _all_docs query
			this.database = database;
			this.view = view;
			limit = int.MaxValue;
			mapOnly = (view != null && view.GetReduce() == null);
			indexUpdateMode = Query.IndexUpdateMode.Before;
			allDocsMode = Query.AllDocsMode.AllDocs;
		}