public static Query CachingRemove(this Query query, params string[] cacheKeys) { query.AddComponent("cache", new CachingCondition { Action = CachingAction.Remove, CacheKeysToRemove = cacheKeys }); return(query); }
public static Query CachingGet(this Query query, string cacheKey) { query.AddComponent("cache", new CachingCondition { Action = CachingAction.Get, CacheKey = cacheKey }); return(query); }
public static Query SetRaw(this Query query, string sql, params object[] bindings) { if (bindings == null) { query.AddComponent("update", new RawCondition { Expression = sql, Bindings = bindings }); } else { query.AddComponent("update", new RawCondition { Expression = sql, Bindings = null }); } return(query); }
public static Query Set(this Query query, string column, object value) { if (Utilities.EqualsIgnoreCase(column, nameof(Entity.Id)) || Utilities.EqualsIgnoreCase(column, nameof(Entity.LastModifiedDate))) { return(query); } query.AddComponent("update", new BasicCondition { Column = column, Operator = "=", Value = value }); return(query); }