Esempio n. 1
0
		public WriteUpdateProcessor(LocalTransaction transaction, int id, ClassMetadata clazz
			, ArrayType typeInfo)
		{
			_transaction = transaction;
			_id = id;
			_clazz = clazz;
			_typeInfo = typeInfo;
		}
Esempio n. 2
0
 internal override void DeleteMembers(DeleteContextImpl context, ArrayType arrayType
     , bool isUpdate)
 {
     if (arrayType == ArrayType.PlainArray)
     {
         new ArrayHandler(TypeHandler(), true).DeletePrimitiveEmbedded((StatefulBuffer) context
             .Buffer(), this);
     }
     else
     {
         if (arrayType == ArrayType.MultidimensionalArray)
         {
             new MultidimensionalArrayHandler(TypeHandler(), true).DeletePrimitiveEmbedded((StatefulBuffer
                 ) context.Buffer(), this);
         }
     }
 }
Esempio n. 3
0
		public sealed override void WriteUpdate(Transaction trans, Pointer4 pointer, ClassMetadata
			 classMetadata, ArrayType arrayType, ByteArrayBuffer buffer)
		{
			MsgD msg = Msg.WriteUpdate.GetWriter(trans, pointer, classMetadata, arrayType.Value
				(), buffer);
			WriteBatchedMessage(msg);
		}
		public override void WriteUpdateAdjustIndexes(int id, ClassMetadata classMetadata
			, ArrayType arrayType)
		{
		}
Esempio n. 5
0
		public abstract void WriteUpdate(Transaction trans, Pointer4 pointer, ClassMetadata
			 classMetadata, ArrayType arrayType, ByteArrayBuffer buffer);
		public virtual void PurgeFieldIndexEntriesOnUpdate(Db4objects.Db4o.Internal.Transaction
			 transaction, ArrayType arrayType)
		{
			if (!UpdateDepth().CanSkip(_reference))
			{
				transaction.WriteUpdateAdjustIndexes(_reference.GetID(), _reference.ClassMetadata
					(), arrayType);
			}
		}
Esempio n. 7
0
 internal virtual void DeleteMembers(DeleteContextImpl context, ArrayType arrayType
     , bool isUpdate)
 {
     var buffer = (StatefulBuffer) context.Buffer();
     var preserveCascade = context.CascadeDeleteDepth();
     try
     {
         if (CascadeOnDelete())
         {
             if (ClassReflector().IsCollection())
             {
                 buffer.SetCascadeDeletes(CollectionDeleteDepth(context));
             }
             else
             {
                 buffer.SetCascadeDeletes(1);
             }
         }
         Handlers4.FieldAwareTypeHandler(CorrectHandlerVersion(context)).DeleteMembers(context
             , isUpdate);
     }
     catch (Exception e)
     {
         // This a catch for changed class hierarchies.
         // It's very ugly to catch all here but it does
         // help to heal migration from earlier db4o
         // versions.
         var dp = Container()._handlers.DiagnosticProcessor();
         if (dp.Enabled())
         {
             dp.DeletionFailed();
         }
     }
     buffer.SetCascadeDeletes(preserveCascade);
 }
Esempio n. 8
0
 public override void WriteUpdateAdjustIndexes(int id, ClassMetadata clazz, ArrayType
     typeInfo)
 {
     new WriteUpdateProcessor(this, id, clazz, typeInfo).Run();
 }
Esempio n. 9
0
		public sealed override void WriteUpdate(Transaction trans, Pointer4 pointer, ClassMetadata
			 classMetadata, ArrayType arrayType, ByteArrayBuffer buffer)
		{
			int address = pointer.Address();
			if (address == 0)
			{
				address = AllocateSlotForUserObjectUpdate(trans, pointer.Id(), pointer.Length()).
					Address();
			}
			WriteEncrypt(buffer, address, 0);
		}
Esempio n. 10
0
 public abstract void WriteUpdateAdjustIndexes(int id, ClassMetadata clazz, ArrayType
     typeInfo);
Esempio n. 11
0
 public abstract void WriteUpdateAdjustIndexes(int id, ClassMetadata clazz, ArrayType
                                               typeInfo);