// each public Result <string> each(object self, string prop, UnnamedSql text) { var result = new StringBuilder(); foreach (var newSelf in (IEnumerable)GetPropValue(self, prop)) { var ok = text(newSelf); if (ok.IsFailure) { return(ok); } result.Append(ok.Value); } return(Result.Ok(result.ToString())); }
public Result <string> isLessThan(object self, string prop, object v, UnnamedSql text) => Return(Compare(GetPropValue(self, prop), v) < 0, text(self));
public Result <string> isNotEqual(object self, string prop, object v, UnnamedSql text) => Return(!IsEqual(GetPropValue(self, prop), v), text(self));
public Result <string> isNotNull(object self, string prop, UnnamedSql text) => Return(GetPropValue(self, prop) != null, text(self));
public Result <string> isNotEmpty(object self, string prop, UnnamedSql text) => Return(!IsEmpty(GetPropValue(self, prop)), text(self));
public Result <string> hasNoProp(object self, string prop, UnnamedSql text) => Return(!HasProp(self, prop), text(self));
public Result <string> iif(object self, string prop, UnnamedSql t1, string t2) => EvalPropToBool(self, prop) ? t1(self) : Result.Ok(t2);
public Result <string> iif(object self, string prop, string t1, UnnamedSql t2) => EvalPropToBool(self, prop) ? Result.Ok(t1) : t2(self);
public Result <string> isNotLike(object self, string prop, string regex, UnnamedSql text) => Return(!Regex.IsMatch((string)GetPropValue(self, prop), regex), text(self));
public Result <string> isGreaterEqual(object self, string prop, object v, UnnamedSql text) => Return(Compare(GetPropValue(self, prop), v) >= 0, text(self));