You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.2 KiB

2 years ago
  1. using System.Linq.Expressions;
  2. namespace SqlSugar
  3. {
  4. public class ConditionalExpressionResolve:BaseResolve
  5. {
  6. public ConditionalExpressionResolve(ExpressionParameter parameter) : base(parameter)
  7. {
  8. var express = base.Expression as ConditionalExpression;
  9. var isLeft = parameter.IsLeft;
  10. switch (base.Context.ResolveType)
  11. {
  12. case ResolveExpressType.None:
  13. case ResolveExpressType.WhereSingle:
  14. case ResolveExpressType.WhereMultiple:
  15. case ResolveExpressType.SelectSingle:
  16. case ResolveExpressType.SelectMultiple:
  17. case ResolveExpressType.FieldSingle:
  18. case ResolveExpressType.FieldMultiple:
  19. case ResolveExpressType.Join:
  20. case ResolveExpressType.ArraySingle:
  21. case ResolveExpressType.ArrayMultiple:
  22. case ResolveExpressType.Update:
  23. default:
  24. Check.Exception(true, "Does not support it.xx==value ? true:false , Use SqlFunc.IIF (it.xx==value,true,false)");
  25. break;
  26. }
  27. }
  28. }
  29. }