internal void HasId(GremlinVariable lastVariable, Predicate predicate) { WScalarExpression firstExpr = lastVariable.GetVariableProperty(lastVariable.GetPrimaryKey()).ToScalarExpression(); WScalarExpression secondExpr = SqlUtil.GetValueExpr(predicate.Value); AddPredicate(SqlUtil.GetBooleanComparisonExpr(firstExpr, secondExpr, BooleanComparisonType.Equals)); }
internal void HasId(GremlinVariable lastVariable, List <object> values) { List <WBooleanExpression> booleanExprList = new List <WBooleanExpression>(); foreach (var value in values) { WScalarExpression firstExpr = lastVariable.GetVariableProperty(lastVariable.GetPrimaryKey()).ToScalarExpression(); WScalarExpression secondExpr = SqlUtil.GetValueExpr(value); booleanExprList.Add(SqlUtil.GetBooleanComparisonExpr(firstExpr, secondExpr, BooleanComparisonType.Equals)); } WBooleanExpression concatSql = SqlUtil.ConcatBooleanExprWithOr(booleanExprList); AddPredicate(SqlUtil.GetBooleanParenthesisExpr(concatSql)); }