Exemple #1
0
        public MapFunction <EmitType, ObjType, DocType> IncludeDocs <DocType>()
        {
            var new_vf = new MapFunction <EmitType, ObjType, DocType>(this.Options(include_docs: true));

            new_vf.dd = this.dd;
            return(new_vf);
        }
Exemple #2
0
        public DB(CouchRepo couchRepo, string name)
        {
            this.couchRepo = couchRepo;
            this.name      = name;
            this.couchUrl  = this.couchRepo.couchUrl.DB(name);

            this.allDocs = new Design.AllDocs(this);
        }
Exemple #3
0
        public static MapFunction <EmitType, ObjType> Range <EmitType, ObjType>(this MapFunction <EmitType, ObjType> vf, EmitType startkey, bool?descending = null)
        {
            var new_vf = vf
                         .QueryString("startkey", startkey.ToString());

            if (descending.HasValue)
            {
                new_vf = new_vf.QueryString("descending", TrueFalse(descending.HasValue));
            }
            return(new_vf);
        }
Exemple #4
0
        public static MapFunction <EmitType, ObjType> Paginate <EmitType, ObjType>(this MapFunction <EmitType, ObjType> vf,
                                                                                   EmitType startkey, string startkey_docid, int?limit = null)
        {
            var new_vf = vf
                         .QueryString("startkey", startkey.ToString())
                         .QueryString("startkey_docid", startkey_docid);

            if (limit.HasValue)
            {
                new_vf = new_vf.QueryString("limit", limit.Value.ToString());
            }
            return(new_vf);
        }