コード例 #1
0
        internal SqlMergeOperationClause(
            MergeOperationType type,
            SqlSearchCondition?where,
            SqlSearchCondition?whereDelete,
            IEnumerable <SqlSetExpression> items)
        {
            OperationType = type;
            Where         = where;
            WhereDelete   = whereDelete;

            foreach (var item in items)
            {
                Items.Add(item);
            }
        }
コード例 #2
0
ファイル: MergeDefinition.cs プロジェクト: beercsaba/linq2db
            private Operation(
                MergeOperationType type,
                Expression <Func <TSource, bool> > notMatchedPredicate,
                Expression <Func <TTarget, TSource, bool> > matchedPredicate1,
                Expression <Func <TTarget, TSource, bool> > matchedPredicate2,
                Expression <Func <TTarget, bool> > bySourcePredicate,
                Expression <Func <TSource, TTarget> > create,
                Expression <Func <TTarget, TSource, TTarget> > update,
                Expression <Func <TTarget, TTarget> > updateBySource)
            {
                Type = type;

                NotMatchedPredicate = notMatchedPredicate;
                MatchedPredicate    = matchedPredicate1;
                MatchedPredicate2   = matchedPredicate2;
                BySourcePredicate   = bySourcePredicate;

                CreateExpression         = create;
                UpdateExpression         = update;
                UpdateBySourceExpression = updateBySource;
            }
コード例 #3
0
ファイル: MergeDefinition.cs プロジェクト: toneb/linq2db
            private Operation(
                MergeOperationType type,
                Expression <Func <TSource, bool> > notMatchedPredicate,
                Expression <Func <TTarget, TSource, bool> > matchedPredicate1,
                Expression <Func <TTarget, TSource, bool> > matchedPredicate2,
                Expression <Func <TTarget, bool> > bySourcePredicate,
                Expression <Func <TSource, TTarget> > create,
                Expression <Func <TTarget, TSource, TTarget> > update,
                Expression <Func <TTarget, TTarget> > updateBySource)
            {
                _type = type;

                _notMatchedPredicate = notMatchedPredicate;
                _matchedPredicate    = matchedPredicate1;
                _matchedPredicate2   = matchedPredicate2;
                _bySourcePredicate   = bySourcePredicate;

                _create         = create;
                _update         = update;
                _updateBySource = updateBySource;
            }
コード例 #4
0
 public SqlMergeOperationClause(MergeOperationType type)
 {
     OperationType = type;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContainerContext"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="indexContainer">The index container.</param>
 /// <param name="operationType">Type of the operation.</param>
 public ContainerContext(SnapshotContext context, IReadonlyIndexContainer indexContainer, MergeOperationType operationType = MergeOperationType.ChangedOnly)
 {
     this.SnapshotContext = context;
     this.IndexContainer  = indexContainer;
     this.OperationType   = operationType;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MergeOperationContext"/> class.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="snapshotContext">The snapshot context.</param>
 /// <param name="operationType">Type of the operation.</param>
 public MergeOperationContext(MemoryIndex index, SnapshotContext snapshotContext, MergeOperationType operationType = MergeOperationType.ChangedOnly)
 {
     this.Index           = index;
     this.SnapshotContext = snapshotContext;
     this.OperationType   = operationType;
 }