public OdooQuery <T> Select(params string[] fields)
        {
            foreach (var f in fields)
            {
                ReturnFields.Add(f);
            }

            return(this);
        }
예제 #2
0
        public SearchDescriptor <T> GetSearchDescriptor()
        {
            var s = new SearchDescriptor <T>()
                    .Index(Indices)
                    .Skip(Skip ?? 0)
                    .Take(Take ?? 10)
                    .Aggregations(a => BucketFields.GetBucketAggreagationDescriptor <T>())
                    .Query(q => FilterFields.GetQueryDesctiptor <T>())
                    .Source(t => ReturnFields.GetSourceFilterDescriptor <T>())
                    .Sort(s => SortFields.GetSortDescriptor <T>());

            return(s);
        }
예제 #3
0
 public string[] GetRequestFields()
 {
     return(ReturnFields.Any() ? ReturnFields.ToArray() : null);
 }