Inheritance: IStorageOperation
        private void apply()
        {
            var transform = _session.Tenant.TransformFor(StoreOptions.PatchDoc);
            var storage   = _session.StorageFor(typeof(T));

            ISqlFragment where;
            if (_filter == null)
            {
                var statement = new StatementOperation(storage, null);
                statement.ApplyFiltering(_session, _filterExpression);

                where = statement.Where;
            }
            else
            {
                where = storage.FilterDocuments(null, _filter);
            }

            var operation = new PatchOperation(transform, storage, where, Patch, _session.Serializer)
            {
                PossiblyPolymorhpic = PossiblyPolymorphic
            };

            _session.QueueOperation(operation);
        }
Exemple #2
0
        private void apply()
        {
            var transform = _schema.TransformFor(StoreOptions.PatchDoc);
            var document  = _schema.MappingFor(typeof(T)).ToQueryableDocument();
            var operation = new PatchOperation(transform, document, _fragment, Patch);

            _unitOfWork.Patch(operation);
        }
Exemple #3
0
        private void apply()
        {
            var transform = _tenant.TransformFor(StoreOptions.PatchDoc);
            var document  = _tenant.MappingFor(typeof(T)).ToQueryableDocument();

            var where = document.FilterDocuments(null, _fragment);

            var operation = new PatchOperation(transform, document, where, Patch, _serializer);

            _unitOfWork.Patch(operation);
        }
        private void apply()
        {
            var transform = _session.Tenant.TransformFor(StoreOptions.PatchDoc);
            var storage   = _session.StorageFor(typeof(T));

            var where = storage.FilterDocuments(null, _fragment);

            var operation = new PatchOperation(transform, storage.QueryableDocument, where, Patch, _session.Serializer);

            _session.QueueOperation(operation);
        }
Exemple #5
0
        private void apply()
        {
            var transform = _schema.TransformFor(StoreOptions.PatchDoc);
            var document  = _schema.MappingFor(typeof(T)).ToQueryableDocument();
            var operation = new PatchOperation(transform, document, _fragment, Patch);

            _unitOfWork.Patch(operation);

            if (document.DuplicatedFields.Any())
            {
                _unitOfWork.Add(operation.UpdateDuplicateFieldOperation());
            }
        }
Exemple #6
0
 public UpdateDuplicateFields(PatchOperation parent)
 {
     _parent = parent;
 }