internal Query(Database database, Couchbase.Lite.Query query) : this(database, query .GetView()) { limit = query.limit; skip = query.skip; startKey = query.startKey; endKey = query.endKey; descending = query.descending; prefetch = query.prefetch; keys = query.keys; groupLevel = query.groupLevel; mapOnly = query.mapOnly; startKeyDocId = query.startKeyDocId; endKeyDocId = query.endKeyDocId; indexUpdateMode = query.indexUpdateMode; allDocsMode = query.allDocsMode; }
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; }
public virtual void SetAllDocsMode(Query.AllDocsMode allDocsMode) { this.allDocsMode = allDocsMode; }
public virtual void SetIncludeDeleted(bool includeDeletedParam) { allDocsMode = (includeDeletedParam == true) ? Query.AllDocsMode.IncludeDeleted : Query.AllDocsMode.AllDocs; }