本文整理汇总了C#中Db4objects.Db4o.Internal.Query.Processor.QCon类的典型用法代码示例。如果您正苦于以下问题:C# QCon类的具体用法?C# QCon怎么用?C# QCon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QCon类属于Db4objects.Db4o.Internal.Query.Processor命名空间,在下文中一共展示了QCon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: QPending
internal QPending(QConJoin a_join, QCon a_constraint, bool a_firstResult)
{
// Constants, so QConJoin.evaluatePending is made easy:
_join = a_join;
_constraint = a_constraint;
_result = a_firstResult ? True : False;
}
示例2: QConClass
internal QConClass(Transaction trans, QCon parent, QField field, IReflectClass claxx
) : base(trans, parent, field, null)
{
// C/S
if (claxx != null)
{
ObjectContainerBase container = trans.Container();
_classMetadata = container.ClassMetadataForReflectClass(claxx);
if (_classMetadata == null)
{
// could be an aliased class, try to resolve.
string className = claxx.GetName();
string aliasRunTimeName = container.Config().ResolveAliasStoredName(className);
if (!className.Equals(aliasRunTimeName))
{
_classMetadata = container.ClassMetadataForName(aliasRunTimeName);
}
}
if (claxx.Equals(container._handlers.IclassObject))
{
_classMetadata = (ClassMetadata)_classMetadata.TypeHandler();
}
}
_claxx = claxx;
}
示例3: QConPath
internal QConPath(Transaction a_trans, QCon a_parent, QField a_field) : base(a_trans
, a_parent, a_field, null)
{
if (a_field != null)
{
_classMetadata = a_field.GetFieldType();
}
}
示例4: QConJoin
internal QConJoin(Transaction a_trans, QCon a_c1, QCon a_c2, bool a_and) : base(a_trans
)
{
// FIELDS MUST BE PUBLIC TO BE REFLECTED ON UNDER JDK <= 1.1
// C/S
i_constraint1 = a_c1;
i_constraint2 = a_c2;
i_and = a_and;
}
示例5: NewParentPath
public static IIndexedNode NewParentPath(IIndexedNode next, QCon constraint)
{
if (!CanFollowParent(constraint))
{
return null;
}
return new IndexedPath((QConObject) constraint
.Parent(), next);
}
示例6: NewParentPath
public static IIndexedNode NewParentPath(IIndexedNode next, QCon constraint)
{
if (!CanFollowParent(constraint))
{
return null;
}
return new Db4objects.Db4o.Internal.Fieldindex.IndexedPath((QConObject)constraint
.Parent(), next);
}
示例7: GetYapField
private static FieldMetadata GetYapField(QCon con)
{
QField field = con.GetField();
if (null == field)
{
return null;
}
return field.GetFieldMetadata();
}
示例8: JoinedLeaf
public JoinedLeaf(QCon constraint, IIndexedNodeWithRange leaf1, IBTreeRange range
)
{
if (null == constraint || null == leaf1 || null == range)
{
throw new ArgumentNullException();
}
_constraint = constraint;
_leaf1 = leaf1;
_range = range;
}
示例9: ExchangeConstraint
internal override void ExchangeConstraint(QCon a_exchange, QCon a_with)
{
base.ExchangeConstraint(a_exchange, a_with);
if (a_exchange == Constraint1())
{
i_constraint1 = a_with;
}
if (a_exchange == Constraint2())
{
i_constraint2 = a_with;
}
}
示例10: QConClass
internal QConClass(Transaction a_trans, QCon a_parent, QField a_field, IReflectClass
claxx) : base(a_trans, a_parent, a_field, null)
{
// C/S
if (claxx != null)
{
_classMetadata = a_trans.Container().ProduceClassMetadata(claxx);
if (claxx.Equals(a_trans.Container()._handlers.IclassObject))
{
_classMetadata = (ClassMetadata)_classMetadata.TypeHandler();
}
}
_claxx = claxx;
}
示例11: HasJoins
private bool HasJoins(QCon con)
{
if (con.HasJoins())
{
return true;
}
IEnumerator childIter = con.IterateChildren();
while (childIter.MoveNext())
{
if (HasJoins((QCon)childIter.Current))
{
return true;
}
}
return false;
}
示例12: QConObject
public QConObject(Transaction a_trans, QCon a_parent, QField a_field, object a_object
) : base(a_trans)
{
// the constraining object
// cache for the db4o object ID
// the YapClass
// needed for marshalling the request
// C/S only
i_parent = a_parent;
if (a_object is ICompare)
{
a_object = ((ICompare)a_object).Compare();
}
i_object = a_object;
i_field = a_field;
}
示例13: CanFollowParent
private static bool CanFollowParent(QCon con)
{
QCon parent = con.Parent();
FieldMetadata parentField = GetYapField(parent);
if (null == parentField)
{
return false;
}
FieldMetadata conField = GetYapField(con);
if (null == conField)
{
return false;
}
return parentField.HasIndex() && parentField.FieldType().IsAssignableFrom(conField
.ContainingClass());
}
示例14: Morph
// Our QConPath objects are just placeholders to fields,
// so the parents are reachable.
// If we find a "real" constraint, we throw the QPath
// out and replace it with the other constraint.
private void Morph(BooleanByRef removeExisting, QCon newConstraint, IReflectClass
claxx)
{
bool mayMorph = true;
if (claxx != null)
{
ClassMetadata yc = i_trans.Container().ProduceClassMetadata(claxx);
if (yc != null)
{
IEnumerator i = IterateChildren();
while (i.MoveNext())
{
QField qf = ((QCon)i.Current).GetField();
if (!yc.HasField(i_trans.Container(), qf.Name()))
{
mayMorph = false;
break;
}
}
}
}
// }
if (mayMorph)
{
IEnumerator j = IterateChildren();
while (j.MoveNext())
{
newConstraint.AddConstraint((QCon)j.Current);
}
if (HasJoins())
{
IEnumerator k = IterateJoins();
while (k.MoveNext())
{
QConJoin qcj = (QConJoin)k.Current;
qcj.ExchangeConstraint(this, newConstraint);
newConstraint.AddJoin(qcj);
}
}
i_parent.ExchangeConstraint(this, newConstraint);
removeExisting.value = true;
}
else
{
i_parent.AddConstraint(newConstraint);
}
}
示例15: NodeForConstraint
private IIndexedNodeWithRange NodeForConstraint(QCon con)
{
IIndexedNodeWithRange node = (IIndexedNodeWithRange)_nodeCache.Get(con);
if (null != node || _nodeCache.ContainsKey(con))
{
return node;
}
node = NewNodeForConstraint(con);
_nodeCache.Put(con, node);
return node;
}