コード例 #1
0
        /// <summary>
        /// 获取索引信息
        /// </summary>
        /// <returns></returns>
        public List <MongoIndexModel> GetIndexes()
        {
            var list = MongoCache.GetTreeNodes().Where(node => node.PID == ID).ToList();

            var indexes = new List <MongoIndexModel>();

            foreach (var item in list)
            {
                indexes.Add(MongoCache.GetMongoObject(item.ID) as MongoIndexModel);
            }
            return(indexes);
        }
コード例 #2
0
        public List <MongoFieldModel> GetFields()
        {
            var fieldNodes = MongoCache.GetTreeNodes().Where(n => n.PID == ID).ToList();

            var list = new List <MongoFieldModel>();

            foreach (var node in fieldNodes)
            {
                list.Add(MongoCache.GetMongoObject(node.ID) as MongoFieldModel);
            }
            return(list);
        }
コード例 #3
0
        /// <summary>
        /// 获取字段节点信息
        /// </summary>
        /// <returns></returns>
        public List <MongoTreeNode> GetFieldNodes()
        {
            var fieldFiller = MongoCache.GetTreeNodes().Where(n => n.PID == Table.ID && n.Type == MongoTreeNodeType.TableFiller).First();

            return(MongoCache.GetTreeNodes().Where(n => n.PID == fieldFiller.ID).ToList());
        }