private void FreeBTree(IDeleteContext context, int id) { var bTree = NewBTree(context, id); bTree.Free(SystemTransaction(context)); bTree = null; }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { int payLoadOffset = context.ReadInt(); if (context.IsLegacyHandlerVersion()) { context.DefragmentRecommended(); return; } if (payLoadOffset <= 0) { return; } int linkOffset = context.Offset(); context.Seek(payLoadOffset); int classMetadataID = context.ReadInt(); ITypeHandler4 typeHandler = Container().ClassMetadataForID(classMetadataID).TypeHandler (); if (typeHandler != null) { if (!IsPlainObject(typeHandler)) { context.Delete(typeHandler); } } context.Seek(linkOffset); }
/// <summary> /// Executes a request to delete rows in a table, with constraints. /// </summary> /// <parameters> /// <param name="context">Description of the request.</param> /// </parameters> /// <returns> /// The request result. /// </returns> public IDeleteResult Run(IDeleteContext context) { Debug.Assert(Connector != null); Debug.Assert(Connector.IsOpen); return(Execute(context)); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { InvalidBigSet(context); var id = context.ReadInt(); FreeBTree(context, id); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { int payLoadOffset = context.ReadInt(); if (context.IsLegacyHandlerVersion()) { context.DefragmentRecommended(); return; } if (payLoadOffset <= 0) { return; } int linkOffset = context.Offset(); context.Seek(payLoadOffset); int classMetadataID = context.ReadInt(); ITypeHandler4 typeHandler = Container().ClassMetadataForID(classMetadataID).TypeHandler (); if (typeHandler != null) { if (!IsPlainObject(typeHandler)) { context.Delete(typeHandler); } } context.Seek(linkOffset); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public override void Delete(IDeleteContext context) { if (context.IsLegacyHandlerVersion()) { context.ReadInt(); context.DefragmentRecommended(); } }
public override IActiveOperation <IDeleteResultInternal> Delete(IDeleteContext context) { IMySqlDeleteOperation Operation = new MySqlDeleteOperation(context); return(PrepareNonQueryOperation <IDeleteContext, IMySqlDeleteOperation, IDeleteOperation, IDeleteResult, IDeleteResultInternal>( Operation, (IDeleteOperation operation, IAsyncResult asyncResult) => new DeleteResult(operation, asyncResult), (MySqlCommand command, IDeleteResultInternal result) => Operation.FinalizeOperation(command, result))); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!CascadeDelete(context)) { return; } ForEachElement((AbstractBufferContext) context, new _IRunnable_127(this, context)); }
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member public Task <IDeleteResult> RunAsync(IDeleteContext context) #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member { Debug.Assert(Connector != null); Debug.Assert(Connector.IsOpen); return(Task.Run(() => Execute(context))); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!CascadeDelete(context)) { return; } ForEachElement((AbstractBufferContext)context, new _IRunnable_127(this, context)); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public override void Delete(IDeleteContext context) { if (context.IsLegacyHandlerVersion()) { context.ReadInt(); context.DefragmentRecommended(); } }
private void InvalidBigSet(IDeleteContext context) { var bigSet = (IBigSetPersistence) context.Transaction().ObjectForIdFromCache (context.ObjectId()); if (bigSet != null) { bigSet.Invalidate(); } }
private void InvalidBigSet(IDeleteContext context) { var bigSet = (IBigSetPersistence)context.Transaction().ObjectForIdFromCache (context.ObjectId()); if (bigSet != null) { bigSet.Invalidate(); } }
public virtual void Delete(IDeleteContext context) { if (!context.CascadeDelete()) return; ITypeHandler4 handler = ReadElementTypeHandler(context, context); int elementCount = context.ReadInt(); for (int i = elementCount; i > 0; i--) { handler.Delete(context); } }
/// <summary> /// Executes a request to delete rows in a table, with constraints. /// This is the synchronous implementation. /// </summary> /// <parameters> /// <param name="context">Description of the request.</param> /// </parameters> /// <returns> /// The request result. /// </returns> protected virtual IDeleteResult Execute(IDeleteContext context) { if (!IsOperationThreadStarted) { return(new DeleteResult(false, ResultError.ErrorFatalNoOperationThread)); } IActiveOperation <IDeleteResultInternal> ActiveOperation = Connector.Delete(context); IDeleteResultInternal Result = ActiveOperation.Result; FinalizeOrQueue(ActiveOperation); return(Result); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!context.CascadeDelete()) { return; } KeyValueHandlerPair handlers = ReadKeyValueTypeHandlers(context, context); int elementCount = context.ReadInt(); for (int i = elementCount; i > 0; i--) { handlers._keyHandler.Delete(context); handlers._valueHandler.Delete(context); } }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!context.CascadeDelete()) { return; } var handler = ReadElementTypeHandler(context, context); var elementCount = context.ReadInt(); for (var i = elementCount; i > 0; i--) { handler.Delete(context); } }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!context.CascadeDelete()) { return; } KeyValueHandlerPair handlers = ReadKeyValueTypeHandlers(context, context); int elementCount = context.ReadInt(); for (int i = elementCount; i > 0; i--) { handlers._keyHandler.Delete(context); handlers._valueHandler.Delete(context); } }
public virtual void Delete(IDeleteContext context) { ReadArrayHandler(context).Delete(context); }
public abstract IActiveOperation <IDeleteResultInternal> Delete(IDeleteContext context);
public MySqlDeleteOperation(IDeleteContext context) : base(context) { }
private bool CascadeDelete(IDeleteContext context) { // FIXME: ValueType could reference objects, shouldn't they be deleted too? return context.CascadeDelete() && Handlers4.IsCascading(_handler); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { context.DeleteObject(); }
public virtual void Delete(IDeleteContext context) { ReadArrayHandler(context).Delete(context); }
public void Delete(IDeleteContext context) { var offset = context.Offset() + Const4.IdLength + Const4.LongLength; context.Seek(offset); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { CorrectHandlerVersion(context).Delete(context); }
void ITypeHandler4.Delete(IDeleteContext context) { context.Seek(context.Offset() + LinkLength()); }
public void Delete(IDeleteContext context) { int offset = context.Offset() + Const4.IdLength + Const4.LongLength; context.Seek(offset); }
private bool CascadeDelete(IDeleteContext context) { // FIXME: ValueType could reference objects, shouldn't they be deleted too? return(context.CascadeDelete() && Handlers4.IsCascading(_handler)); }
public _IRunnable_127(ArrayHandler _enclosing, IDeleteContext context) { this._enclosing = _enclosing; this.context = context; }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public void Delete(IDeleteContext context) { }
public void Delete(IDeleteContext context) { context.Seek(context.Offset() + GuidSize); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { if (!context.CascadeDelete()) { return; } var handler = ReadElementTypeHandler(context, context); var elementCount = context.ReadInt(); for (var i = elementCount; i > 0; i--) { handler.Delete(context); } }
public void Delete(IDeleteContext context) { context.Seek(context.Offset() + GuidSize); }
public void Delete(IDeleteContext context) { context.Delete(TypeHandler()); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public void Delete(IDeleteContext context) { }
public virtual void Delete(IDeleteContext context) { context.Seek(context.Offset() + LinkLength()); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { }
public _IRunnable_127(ArrayHandler _enclosing, IDeleteContext context) { this._enclosing = _enclosing; this.context = context; }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { StringHandler(context).Delete(context); }
public void Delete(IDeleteContext context) { context.Delete(TypeHandler()); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { StringHandler(context).Delete(context); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { InvalidBigSet(context); var id = context.ReadInt(); FreeBTree(context, id); }
public override void Delete(IDeleteContext context) { context.DefragmentRecommended(); }
private void FreeBTree(IDeleteContext context, int id) { var bTree = NewBTree(context, id); bTree.Free(SystemTransaction(context)); bTree = null; }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { throw new NotImplementedException(); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { throw new NotImplementedException(); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual void Delete(IDeleteContext context) { context.DeleteObject(); }
public virtual void Delete(IDeleteContext context) { }
void ITypeHandler4.Delete(IDeleteContext context) { context.Seek(context.Offset() + LinkLength()); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public override void Delete(IDeleteContext context) { context.ReadSlot(); context.DefragmentRecommended(); }
public virtual void Delete(IDeleteContext context) { context.Seek(context.Offset() + LinkLength()); }
// #example: Delete the content public void Delete(IDeleteContext deleteContext) { SkipData(deleteContext); }
// #example: Delete the content public void Delete(IDeleteContext deleteContext) { SkipData(deleteContext); }