예제 #1
0
        private void ForEachConstraint(IProcedure4 proc)
        {
            IEnumerator i = IterateConstraints();

            while (i.MoveNext())
            {
                QCon constraint = (QCon)i.Current;
                if (!constraint.ProcessedByIndex())
                {
                    proc.Apply(constraint);
                }
            }
        }
예제 #2
0
        internal virtual void EvaluateSimpleChildren()
        {
            // TODO: sort the constraints for YapFields first,
            // so we stay with the same YapField
            if (_children == null)
            {
                return;
            }
            IEnumerator i = IterateChildren();

            while (i.MoveNext())
            {
                Db4objects.Db4o.Internal.Query.Processor.QCon qcon = (Db4objects.Db4o.Internal.Query.Processor.QCon
                                                                      )i.Current;
                if (!qcon.ProcessedByIndex())
                {
                    i_candidates.SetCurrentConstraint(qcon);
                    qcon.SetCandidates(i_candidates);
                    qcon.EvaluateSimpleExec(i_candidates);
                }
            }
            i_candidates.SetCurrentConstraint(null);
        }
예제 #3
0
        private bool ResolvedByIndex()
        {
            if (!CanResolveByFieldIndex())
            {
                return(false);
            }
            bool        result = false;
            IEnumerator it     = IterateChildren();

            while (it.MoveNext())
            {
                Db4objects.Db4o.Internal.Query.Processor.QCon childConstraint = (Db4objects.Db4o.Internal.Query.Processor.QCon
                                                                                 )it.Current;
                if (!childConstraint.ProcessedByIndex())
                {
                    return(false);
                }
                else
                {
                    result = true;
                }
            }
            return(result);
        }