public IDynamicTableObject[] take(int count) { var query = new Kooboo.IndexedDB.Dynamic.Query(this.ktable.table); if (!string.IsNullOrEmpty(this.SearchCondition)) { var filter = query.ParserFilter(this.SearchCondition); query.items = filter; } else { //throw new Exception("You do not any search condition"); } if (!string.IsNullOrEmpty(this.OrderByField)) { if (this.Ascending) { query.OrderByAscending(this.OrderByField); } else { query.OrderByDescending(this.OrderByField); } } var result = query.Skip(this.skipcount).Take(count).ToArray(); return(DynamicTableObject.CreateList(result, this.ktable.table, this.ktable.context)); }
public IDynamicTableObject[] all() { var all = this.table.All(); return(DynamicTableObject.CreateList(all.ToArray(), this.table, this.context)); }
public IDynamicTableObject[] findAll(string query) { var list = this.table.Query.FindAll(query); return(DynamicTableObject.CreateList(list.ToArray(), this.table, this.context)); }
public IDynamicTableObject[] findAll(string field, object value) { var list = this.table.Query.Where(field, Kooboo.IndexedDB.Query.Comparer.EqualTo, value).SelectAll(); return(DynamicTableObject.CreateList(list.ToArray(), this.table, this.context)); }