protected override void Process(FieldMetadata field) { if (!field.IsVirtual() && field.HasIndex()) { this._enclosing.ProcessBTree(context, field.GetIndex(context.SystemTrans())); } }
public override void Write(Transaction trans, ClassMetadata clazz, ClassAspect aspect , ByteArrayBuffer writer) { writer.WriteShortString(trans, aspect.GetName()); if (!(aspect is FieldMetadata)) { return; } FieldMetadata field = (FieldMetadata)aspect; field.Alive(); if (field.IsVirtual()) { return; } ITypeHandler4 handler = field.GetHandler(); if (handler is StandardReferenceTypeHandler) { // TODO: ensure there is a test case, to make this happen if (((StandardReferenceTypeHandler)handler).ClassMetadata().GetID() == 0) { trans.Container().NeedsUpdate(clazz); } } writer.WriteInt(field.FieldTypeID()); BitMap4 bitmap = new BitMap4(3); bitmap.Set(0, field.IsPrimitive()); bitmap.Set(1, Handlers4.HandlesArray(handler)); bitmap.Set(2, Handlers4.HandlesMultidimensionalArray(handler)); // keep the order writer.WriteByte(bitmap.GetByte(0)); }
public override void Defrag(ClassMetadata classMetadata, ClassAspect aspect, LatinStringIO sio, DefragmentContextImpl context) { base.Defrag(classMetadata, aspect, sio, context); if (!(aspect is FieldMetadata)) { return; } FieldMetadata field = (FieldMetadata)aspect; if (field.IsVirtual()) { return; } if (field.HasIndex()) { BTree index = field.GetIndex(context.SystemTrans()); int targetIndexID = context.CopyID(); if (targetIndexID != 0) { index.DefragBTree(context.Services()); } } else { context.WriteInt(0); } }
protected override void InternalSetProcessedByIndex(QCandidates candidates) { base.InternalSetProcessedByIndex(candidates); if (i_field == null) { return; } FieldMetadata fieldMetadata = i_field.GetFieldMetadata(); if (!fieldMetadata.IsVirtual()) { candidates.WasLoadedFromClassFieldIndex(true); } }
private bool HasBTreeIndex(FieldMetadata field) { return(!field.IsVirtual()); }
private bool HasBTreeIndex(FieldMetadata field) { return !field.IsVirtual(); }