Exemplo n.º 1
0
 public PreProcessEntityInfo(string id, Type entityType, CouchDBViewRowKey key, JToken row)
 {
     this.id         = id;
     this.entityType = entityType;
     this.key        = key;
     this.row        = row;
 }
Exemplo n.º 2
0
 public EntityInfo(object entity, IdRev idrev, JToken doc, CouchDBViewRowKey key)
 {
     this.entity = entity;
     this.idrev  = idrev;
     this.doc    = doc;
     this.key    = key;
 }
Exemplo n.º 3
0
        private PreProcessInfo PreProcess(JToken[] rows)
        {
            var preProcessRows = new List <PreProcessEntityInfo>();

            foreach (JToken row in rows)
            {
                JToken doc = row[CouchDBFieldsConst.ResultRowDoc];
                if (doc == null)
                {
                    throw new Exception("doc field was not found");
                }

                string            id         = doc.Value <string>(CouchDBFieldsConst.DocId);
                Type              entityType = GetDocEntityType(doc);
                CouchDBViewRowKey key        = ExtractRowKey(row);

                preProcessRows.Add(new PreProcessEntityInfo(id, entityType, key, row));
            }

            return(new PreProcessInfo(preProcessRows.ToArray()));
        }
Exemplo n.º 4
0
 internal void AddExist(object entity, IdRev idrev, JToken doc, CouchDBViewRowKey key)
 {
     existEntities.Add(new EntityInfo(entity, idrev, doc, key));
 }