Beispiel #1
0
 public override object ShallowClone()
 {
     Db4objects.Db4o.Internal.Query.Processor.QPending pending = InternalClonePayload(
         );
     base.ShallowCloneInternal(pending);
     return(pending);
 }
Beispiel #2
0
        internal virtual void EvaluatePending(QCandidate a_root, QPending a_pending, int
                                              a_secondResult)
        {
            bool res = i_evaluator.Not(i_and ? ((a_pending._result + a_secondResult) > 0) : (
                                           a_pending._result + a_secondResult) > QPending.False);

            if (HasJoins())
            {
                IEnumerator i = IterateJoins();
                while (i.MoveNext())
                {
                    Db4objects.Db4o.Internal.Query.Processor.QConJoin qcj = (Db4objects.Db4o.Internal.Query.Processor.QConJoin
                                                                             )i.Current;
                    a_root.Evaluate(new QPending(qcj, this, res));
                }
            }
            else
            {
                if (!res)
                {
                    Constraint1().DoNotInclude(a_root);
                    Constraint2().DoNotInclude(a_root);
                }
            }
        }
Beispiel #3
0
 internal virtual void EvaluatePending(QCandidate a_root, QPending a_pending, int
     a_secondResult)
 {
     var res = i_evaluator.Not(i_and
         ? ((a_pending._result + a_secondResult) > 0)
         : (
             a_pending._result + a_secondResult) > QPending.False);
     if (HasJoins())
     {
         var i = IterateJoins();
         while (i.MoveNext())
         {
             var qcj = (QConJoin
                 ) i.Current;
             a_root.Evaluate(new QPending(qcj, this, res));
         }
     }
     else
     {
         if (!res)
         {
             Constraint1().DoNotInclude(a_root);
             Constraint2().DoNotInclude(a_root);
         }
     }
 }
Beispiel #4
0
                public void Visit(object a_object)
                {
                    QPending newPending = ((QPending)a_object).InternalClonePayload();

                    // We need to change the constraint here, so our pending collector
                    // uses the right comparator.
                    newPending.ChangeConstraint();
                    QPending oldPending = (QPending)Tree.Find(((Tree)this._enclosing._pending.value),
                                                              newPending);

                    if (oldPending != null)
                    {
                        // We only keep one pending result for all array elements and memorize,
                        // whether we had a true or a false result or both.
                        if (oldPending._result != newPending._result)
                        {
                            oldPending._result = QPending.Both;
                        }
                    }
                    else
                    {
                        this._enclosing._pending.value = Tree.Add(((Tree)this._enclosing._pending.value),
                                                                  newPending);
                    }
                }
Beispiel #5
0
 internal virtual QPending InternalClonePayload
     ()
 {
     var pending = new QPending
         (_join, _constraint, false);
     pending._result = _result;
     return pending;
 }
		internal virtual Db4objects.Db4o.Internal.Query.Processor.QPending InternalClonePayload
			()
		{
			Db4objects.Db4o.Internal.Query.Processor.QPending pending = new Db4objects.Db4o.Internal.Query.Processor.QPending
				(_join, _constraint, false);
			pending._result = _result;
			return pending;
		}
Beispiel #7
0
 internal virtual Db4objects.Db4o.Internal.Query.Processor.QPending InternalClonePayload
     ()
 {
     Db4objects.Db4o.Internal.Query.Processor.QPending pending = new Db4objects.Db4o.Internal.Query.Processor.QPending
                                                                     (_join, _constraint, false);
     pending._result = _result;
     return(pending);
 }
Beispiel #8
0
        internal virtual QPending InternalClonePayload
            ()
        {
            var pending = new QPending
                              (_join, _constraint, false);

            pending._result = _result;
            return(pending);
        }
Beispiel #9
0
 internal virtual bool Evaluate(QPending a_pending)
 {
     QPending oldPending = (QPending)Tree.Find(_pendingJoins, a_pending);
     if (oldPending == null)
     {
         a_pending.ChangeConstraint();
         _pendingJoins = Tree.Add(_pendingJoins, a_pending.InternalClonePayload());
         return true;
     }
     _pendingJoins = _pendingJoins.RemoveNode(oldPending);
     oldPending._join.EvaluatePending(this, oldPending, a_pending._result);
     return false;
 }
Beispiel #10
0
		public virtual bool Evaluate(QPending pending)
		{
			QPending oldPending = (QPending)Tree.Find(_pendingJoins, pending);
			if (oldPending == null)
			{
				pending.ChangeConstraint();
				_pendingJoins = Tree.Add(_pendingJoins, pending.InternalClonePayload());
				return true;
			}
			_pendingJoins = _pendingJoins.RemoveNode(oldPending);
			oldPending._join.EvaluatePending(this, oldPending, pending._result);
			return false;
		}
Beispiel #11
0
 public void Visit(object a_object)
 {
     QPending newPending = ((QPending)a_object).InternalClonePayload();
     newPending.ChangeConstraint();
     QPending oldPending = (QPending)Tree.Find(((Tree)pending.value), newPending);
     if (oldPending != null)
     {
         if (oldPending._result != newPending._result)
         {
             oldPending._result = QPending.Both;
         }
     }
     else
     {
         pending.value = Tree.Add(((Tree)pending.value), newPending);
     }
 }
Beispiel #12
0
		internal virtual void EvaluatePending(IInternalCandidate root, QPending pending, 
			int secondResult)
		{
			bool res = i_evaluator.Not(i_and ? ((pending._result + secondResult) > 0) : (pending
				._result + secondResult) > QPending.False);
			if (HasJoins())
			{
				IEnumerator i = IterateJoins();
				while (i.MoveNext())
				{
					Db4objects.Db4o.Internal.Query.Processor.QConJoin qcj = (Db4objects.Db4o.Internal.Query.Processor.QConJoin
						)i.Current;
					root.Evaluate(new QPending(qcj, this, res));
				}
			}
			else
			{
				if (!res)
				{
					Constraint1().DoNotInclude(root);
					Constraint2().DoNotInclude(root);
				}
			}
		}
Beispiel #13
0
 internal virtual bool Evaluate(QPending a_pending)
 {
     var oldPending = (QPending) Find(_pendingJoins, a_pending);
     if (oldPending == null)
     {
         a_pending.ChangeConstraint();
         _pendingJoins = Add(_pendingJoins, a_pending.InternalClonePayload());
         return true;
     }
     _pendingJoins = _pendingJoins.RemoveNode(oldPending);
     oldPending._join.EvaluatePending(this, oldPending, a_pending._result);
     return false;
 }