Here are the examples of the csharp api class System.Data.Common.CommandTrees.DbExpression.Not() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
16 Examples
0
1. Example
View licenseprotected override DbExpression NotExprAsCql(DomainNotExpr expression) { DbExpression cqt = expression.Child.Accept(this); return cqt.Not(); }
0
2. Example
View licenseprotected override DbExpression TypedTranslate(ExpressionConverter parent, System.Linq.Expressions.UnaryExpression linq) { DbExpression operand = parent.TranslateExpression(linq.Operand); if (TypeSemantics.IsBooleanType(operand.ResultType)) { return operand.Not(); } return parent.CreateCanonicalFunction(ExpressionConverter.BitwiseNot, linq, operand); }
0
3. Example
View licenseprotected override CqtExpression TranslateUnary(ExpressionConverter parent, CqtExpression operand, MethodCallExpression call) { // "Any" is equivalent to "exists". return operand.IsEmpty().Not(); }
0
4. Example
View licenseinternal DbExpression AsCqt(DbExpression row, IEnumerable<Constant> constants, MemberPath outputMember, bool skipIsNotNull) { DbExpression cqt = null; AsCql( // trueLiteral action () => cqt = DbExpressionBuilder.True, // varIsNotNull action () => cqt = outputMember.AsCqt(row).IsNull().Not(), // varNotEqualsTo action (constant) => { DbExpression notEqualsExpr = outputMember.AsCqt(row).NotEqual(constant.AsCqt(row, outputMember)); if (cqt != null) { cqt = cqt.And(notEqualsExpr); } else { cqt = notEqualsExpr; } }, constants, outputMember, skipIsNotNull); return cqt; }
0
5. Example
View licenseprotected override DbExpression TranslateIntoLogicExpression(ExpressionConverter parent, System.Linq.Expressions.BinaryExpression linq, DbExpression left, DbExpression right) { //No direct translation, we translate into ((left && !right) || (!left && right)) DbExpression firstExpression = left.And(right.Not()); DbExpression secondExpression = left.Not().And(right); DbExpression result = firstExpression.Or(secondExpression); return result; }
0
6. Example
View licensepublic override DbExpression Visit(ExistsOp op, Node n) { // // Exists requires a RelOp input set // DbExpression inputExpr = VisitNode(n.Child0); // // Information about the Vars published by the RelOp argument does not need to be maintained // since they may not now be used higher in the CQT. // ConsumeRelOp(inputExpr); // // Exists --> Not(IsEmpty(Input set)) via DbExpressionBuilder.Exists // return inputExpr.IsEmpty().Not(); }
0
7. Example
View licenseinternal DbExpression AsCqt(DbExpression row) { DbExpression cqt = m_slotValue.AsCqt(row, m_outputMember); if (m_enforceNotNull) { cqt = cqt.And(cqt.IsNull().Not()); } return cqt; }
0
8. Example
View licenseprivate DbExpression ImplementEqualityConstantAndUnknown( System.Data.Common.CommandTrees.DbConstantExpression constant, DbExpression unknown, EqualsPattern pattern) { switch (pattern) { case EqualsPattern.Store: case EqualsPattern.PositiveNullEqualityNonComposable: // for Joins return constant.Equal(unknown); // either both are non-null, or one is null and the predicate result is undefined case EqualsPattern.PositiveNullEqualityComposable: if (!_funcletizer.RootContext.ContextOptions.UseCSharpNullComparisonBehavior) { return constant.Equal(unknown); // same as EqualsPattern.PositiveNullEqualityNonComposable } return constant.Equal(unknown).And(unknown.IsNull().Not()); // add more logic to avoid undefined result for true clr semantics default: Debug.Fail("unknown pattern"); return null; } }
0
9. Example
View licensepublic override DbExpression Visit(ConditionalOp op, Node n) { // ///n ..... /n //View Source file for more details /n }
0
10. Example
View licenseinternal override DbExpression AsCqt(DbExpression row, bool skipIsNotNull) { DbE/n ..... /n //View Source file for more details /n }
0
11. Example
View licenseprivate DbExpression GeneratePredicate(StorageConditionPropertyMapping condition, DbExpression row) { Debug.Assert(condition.EdmProperty == null, "C-side conditions are not supported in function mappings."); DbExpression columnRef = GenerateColumnRef(row, condition.ColumnProperty); if (condition.IsNull.HasValue) { return condition.IsNull.Value ? (DbExpression)columnRef.IsNull() : (DbExpression)columnRef.IsNull().Not(); } else { return columnRef.Equal(columnRef.ResultType.Constant(condition.Value)); } }
0
12. Example
View licenseprivate DbExpression ImplementEqualityUnknownArguments(DbExpression left, DbExpression right, EqualsPattern pattern) { switch (pattern) { case EqualsPattern.Store: // left EQ right return left.Equal(right); case EqualsPattern.PositiveNullEqualityNonComposable: // for Joins return left.Equal(right).Or(left.IsNull().And(right.IsNull())); case EqualsPattern.PositiveNullEqualityComposable: { var bothNotNull = left.Equal(right); var bothNull = left.IsNull().And(right.IsNull()); if (!_funcletizer.RootContext.ContextOptions.UseCSharpNullComparisonBehavior) { return bothNotNull.Or(bothNull); // same as EqualsPattern.PositiveNullEqualityNonComposable } // add more logic to avoid undefined result for true clr semantics, ensuring composability // (left EQ right AND NOT (left IS NULL OR right IS NULL)) OR (left IS NULL AND right IS NULL) var anyOneIsNull = left.IsNull().Or(right.IsNull()); return (bothNotNull.And(anyOneIsNull.Not())).Or(bothNull); } default: Debug.Fail("unexpected pattern"); return null; } }
0
13. Example
View licenseinternal static DbExpression TranslateContains(ExpressionConverter parent, Expression sourceExpressi/n ..... /n //View Source file for more details /n }
0
14. Example
View licenseprivate DbExpression TransformIntersectOrExcept(DbExpression left, DbExpression right, DbExpressionK/n ..... /n //View Source file for more details /n }
0
15. Example
View licenseinternal GeneratedView GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace, StorageMa/n ..... /n //View Source file for more details /n }
0
16. Example
View licenseprivate static Dictionary<AST.BuiltInKind, BuiltInExprConverter> CreateBuiltInExprConverter() /n ..... /n //View Source file for more details /n }