Beispiel #1
0
        /// <summary>
        /// 建立一个Where嵌套查询
        /// </summary>
        public IDataTableSelector Where(Action <IDataTableSelector> nested, SelectorLinker linker = SelectorLinker.And)
        {
            DataTableSelector selector = NewSelector();

            nested(selector);
            return(NestedWhereSelector(selector, linker));
        }
Beispiel #2
0
 /// <summary>
 /// 增加一个嵌套查询
 /// </summary>
 /// <param name="selector">查询器</param>
 /// <param name="linker">链接符</param>
 /// <returns>查询器</returns>
 protected IDataTableSelector NestedWhereSelector(DataTableSelector selector, SelectorLinker linker)
 {
     wheres.Add(new DataTableSelectorData
     {
         SelectType = "Nested",
         Selector   = selector,
         Linker     = linker
     });
     return(this);
 }
Beispiel #3
0
		/// <summary>
		/// 执行一个查询获取结果集
		/// </summary>
		public IDataTableResult[] Get(){

			if(selector == null){
				
				return dataTableResult.ToArray();

			}

			var result = Parser();

			selector = null;
			
			return result;

		}
Beispiel #4
0
        /// <summary>
        /// 执行一个查询获取查询结果集
        /// </summary>
        public IDataTableResult[] Get()
        {
            if (dataTableResult == null)
            {
                return(null);
            }

            if (selector == null)
            {
                return(dataTableResult.ToArray());
            }

            var result = Parser();

            selector = null;
            return(result);
        }
Beispiel #5
0
		/// <summary>
		/// 建立一个Where嵌套查询
		/// </summary>
		public IDataTableSelector Where(Action<IDataTableSelector> nested, SelectorLinker linker = SelectorLinker.And){

			this.selector = new DataTableSelector(this);
			return this.selector.Where(nested , linker);

		}
Beispiel #6
0
		/// <summary>
		/// 建立一个Where查询
		/// </summary>
		public IDataTableSelector Where(string field, string operators, string val, SelectorLinker linker = SelectorLinker.And){

			this.selector = new DataTableSelector(this);
			return this.selector.Where(field , operators , val , linker);

		}