本文整理汇总了C#中Db4objects.Db4o.Internal.FieldMetadata类的典型用法代码示例。如果您正苦于以下问题:C# FieldMetadata类的具体用法?C# FieldMetadata怎么用?C# FieldMetadata使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FieldMetadata类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了FieldMetadata类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitOnUp
public virtual void InitOnUp(Transaction systemTrans, FieldMetadata fieldMetadata
)
{
ObjectContainerBase anyStream = systemTrans.Container();
if (!anyStream.MaintainsIndices())
{
return;
}
if (!fieldMetadata.SupportsIndex())
{
Indexed(false);
}
TernaryBool indexedFlag = _config.GetAsTernaryBool(IndexedKey);
if (indexedFlag.DefiniteNo())
{
fieldMetadata.DropIndex((LocalTransaction)systemTrans);
return;
}
if (UseExistingIndex(systemTrans, fieldMetadata))
{
return;
}
if (!indexedFlag.DefiniteYes())
{
return;
}
fieldMetadata.CreateIndex();
}
示例2: Process
protected override void Process(FieldMetadata field)
{
if (!field.IsVirtual() && field.HasIndex())
{
this._enclosing.ProcessBTree(context, field.GetIndex(context.SystemTrans()));
}
}
示例3: QField
public QField(Transaction a_trans, string name, FieldMetadata fieldMetadata, int
classMetadataID, int a_index)
{
// C/S only
i_trans = a_trans;
i_name = name;
_fieldMetadata = fieldMetadata;
i_classMetadataID = classMetadataID;
_fieldHandle = a_index;
if (_fieldMetadata != null)
{
if (!_fieldMetadata.Alive())
{
_fieldMetadata = null;
}
}
}
示例4: Process
protected override void Process(FieldMetadata field)
{
Assert.IsNotNull(expectedNames.Remove(field.GetName()));
}
示例5: FieldIndexException
public FieldIndexException(string msg, Exception cause, FieldMetadata field) : this
(msg, cause, field.ContainingClass().GetName(), field.GetName())
{
}
示例6: FieldValueKey
public FieldValueKey(int id, FieldMetadata field)
{
_id = id;
_field = field;
}
示例7: StoredFieldImpl
public StoredFieldImpl(Transaction transaction, FieldMetadata
fieldMetadata)
{
_transaction = transaction;
_fieldMetadata = fieldMetadata;
}
示例8: Attach
internal virtual bool Attach(QQuery query, string a_field)
{
Db4objects.Db4o.Internal.Query.Processor.QCon qcon = this;
ClassMetadata yc = GetYapClass();
bool[] foundField = new bool[] { false };
ForEachChildField(a_field, new _IVisitor4_101(foundField, query));
if (foundField[0])
{
return true;
}
QField qf = null;
if (yc == null || yc.HoldsAnyClass())
{
int[] count = new int[] { 0 };
FieldMetadata[] yfs = new FieldMetadata[] { null };
i_trans.Container().ClassCollection().AttachQueryNode(a_field, new _IVisitor4_119
(yfs, count));
if (count[0] == 0)
{
return false;
}
if (count[0] == 1)
{
qf = yfs[0].QField(i_trans);
}
else
{
qf = new QField(i_trans, a_field, null, 0, 0);
}
}
else
{
if (yc.IsTranslated())
{
i_trans.Container()._handlers.DiagnosticProcessor().DescendIntoTranslator(yc, a_field
);
}
FieldMetadata yf = yc.FieldMetadataForName(a_field);
if (yf != null)
{
qf = yf.QField(i_trans);
}
if (qf == null)
{
qf = new QField(i_trans, a_field, null, 0, 0);
}
}
QConPath qcp = new QConPath(i_trans, qcon, qf);
query.AddConstraint(qcp);
qcon.AddConstraint(qcp);
return true;
}
示例9: HasBTreeIndex
private bool HasBTreeIndex(FieldMetadata field)
{
return !field.IsVirtual();
}
示例10: AddIndexEntry
public virtual void AddIndexEntry(FieldMetadata fieldMetadata, object obj)
{
if (!_currentBuffer.HasParent())
{
object indexEntry = (obj == _currentMarshalledObject) ? _currentIndexEntry : obj;
if (_isNew || !UpdateDepth().CanSkip(_reference))
{
fieldMetadata.AddIndexEntry(Transaction(), ObjectID(), indexEntry);
}
return;
}
_currentBuffer.RequestIndexEntry(fieldMetadata);
}
示例11: Process
protected override void Process(FieldMetadata field)
{
if (field.CanAddToQuery(fieldName))
{
foundField.value = field;
}
}
示例12: Unmarshall
internal virtual void Unmarshall(Transaction a_trans)
{
if (i_classMetadataID != 0)
{
ClassMetadata yc = a_trans.Container().ClassMetadataForID(i_classMetadataID);
_fieldMetadata = (FieldMetadata)yc._aspects[_fieldHandle];
}
}
示例13: CollectReflectFields
private bool CollectReflectFields(Collection4 collectedAspects)
{
bool dirty = false;
IReflectField[] reflectFieldArray = ReflectFields();
for (int reflectFieldIndex = 0; reflectFieldIndex < reflectFieldArray.Length; ++reflectFieldIndex)
{
IReflectField reflectField = reflectFieldArray[reflectFieldIndex];
if (!StoreField(reflectField))
{
continue;
}
Db4objects.Db4o.Internal.ClassMetadata classMetadata = Handlers4.ErasedFieldType(
Container(), reflectField.GetFieldType());
if (classMetadata == null)
{
continue;
}
FieldMetadata field = new FieldMetadata(this, reflectField, classMetadata);
if (Contains(collectedAspects, field))
{
continue;
}
dirty = true;
collectedAspects.Add(field);
}
return dirty;
}
示例14: ReadFieldValue
private object ReadFieldValue(int id, FieldMetadata field)
{
ByteArrayBuffer buffer = BufferFor(id);
HandlerVersion handlerVersion = field.ContainingClass().SeekToField(_transaction,
buffer, field);
if (handlerVersion == HandlerVersion.Invalid)
{
return null;
}
QueryingReadContext context = new QueryingReadContext(_transaction, handlerVersion
._number, buffer, id);
return field.Read(context);
}
示例15: GetFieldValue
private object GetFieldValue(int id, FieldMetadata field)
{
SodaQueryComparator.FieldValueKey key = new SodaQueryComparator.FieldValueKey(id,
field);
object cachedValue = _fieldValueCache[key];
if (null != cachedValue)
{
return cachedValue;
}
object fieldValue = ReadFieldValue(id, field);
_fieldValueCache[key] = fieldValue;
return fieldValue;
}