private QuerySpec(string soupName, string path, SmartQueryType queryType, string matchKey, string beginKey, string endKey, string likeKey, SqlOrder order, int pageSize) { SoupName = soupName; Path = path; QueryType = queryType; MatchKey = matchKey; BeginKey = beginKey; EndKey = endKey; LikeKey = likeKey; Order = order; PageSize = pageSize; SmartSql = ComputeSmartSql(); CountSmartSql = ComputeCountSql(); }
public static QuerySpec BuildAllQuerySpec(string soupName, string path, SqlOrder order, int pageSize) { return BuildRangeQuerySpec(soupName, path, null, null, order, pageSize); }
public static QuerySpec BuildLikeQuerySpec(string soupName, string path, string likeKey, SqlOrder order, int pageSize) { return new QuerySpec(soupName, path, SmartQueryType.Like, null, null, null, likeKey, order, pageSize); }
public static QuerySpec BuildLikeQuerySpec(string soupName, string path, string likeKey, SqlOrder order, int pageSize) { return(new QuerySpec(soupName, path, SmartQueryType.Like, null, null, null, likeKey, order, pageSize)); }
public static QuerySpec BuildRangeQuerySpec(string soupName, string path, string beginKey, string endKey, SqlOrder order, int pageSize) { return new QuerySpec(soupName, path, SmartQueryType.Range, null, beginKey, endKey, null, order, pageSize); }
public static QuerySpec BuildRangeQuerySpec(string soupName, string path, string beginKey, string endKey, SqlOrder order, int pageSize) { return(new QuerySpec(soupName, path, SmartQueryType.Range, null, beginKey, endKey, null, order, pageSize)); }
protected override async Task OnLoop() { if (!enabled) { return; } var ns = sql.SelectToList(ServiceTable, (SqlColumn)ServiceColumnTimestamp > last, SqlOrder.By(ServiceColumnTimestamp, Order.Descending)); if (ns.Count > 0) { last = ns[0][ServiceColumnTimestamp].GetDateTime(); var tags = new List <string>(); foreach (SqlRow row in ns) { var tag = row[ServiceColumnTag].GetString(); if (tag != null && !tags.Contains(tag)) { tags.Add(tag); } } foreach (var tag in tags) { Triggered?.Invoke(this, new SqlServiceTriggerEventArgs(tag)); } } }
public static QuerySpec BuildLikeQuerySpec(string soupName, string path, string likeKey, SqlOrder order, int pageSize) { var sqlOrder = JsonConvert.SerializeObject(order); var nativeQuerySpec = SDK.SmartStore.Store.QuerySpec.BuildLikeQuerySpec(soupName, path, likeKey, JsonConvert.DeserializeObject<SDK.SmartStore.Store.QuerySpec.SqlOrder>(sqlOrder), pageSize); var querySpec = new QuerySpec {SdkQuerySpec = nativeQuerySpec}; return querySpec; }
public OrderController(SqlOffer offerRepository, SqlOrder orderRepository, SqlReceive receiveRepository) { this._offerRepository = offerRepository; this._orderRepository = orderRepository; this._receiveRepository = receiveRepository; }
public static QuerySpec BuildLikeQuerySpec(string soupName, string path, string likeKey, SqlOrder order, int pageSize) { var sqlOrder = JsonConvert.SerializeObject(order); var nativeQuerySpec = SDK.SmartStore.Store.QuerySpec.BuildLikeQuerySpec(soupName, path, likeKey, JsonConvert.DeserializeObject <SDK.SmartStore.Store.QuerySpec.SqlOrder>(sqlOrder), pageSize); var querySpec = new QuerySpec { SdkQuerySpec = nativeQuerySpec }; return(querySpec); }