Example #1
0
        internal virtual Db4objects.Db4o.Internal.Query.Processor.QCon ProduceTopLevelJoin
            ()
        {
            if (!HasJoins())
            {
                return(this);
            }
            IEnumerator i = IterateJoins();

            if (i_joins.Size() == 1)
            {
                i.MoveNext();
                return(((Db4objects.Db4o.Internal.Query.Processor.QCon)i.Current).ProduceTopLevelJoin
                           ());
            }
            Collection4 col = new Collection4();

            while (i.MoveNext())
            {
                col.Ensure(((Db4objects.Db4o.Internal.Query.Processor.QCon)i.Current).ProduceTopLevelJoin
                               ());
            }
            i = col.GetEnumerator();
            i.MoveNext();
            Db4objects.Db4o.Internal.Query.Processor.QCon qcon = (Db4objects.Db4o.Internal.Query.Processor.QCon
                                                                  )i.Current;
            if (col.Size() == 1)
            {
                return(qcon);
            }
            while (i.MoveNext())
            {
                qcon = (Db4objects.Db4o.Internal.Query.Processor.QCon)qcon.And((IConstraint)i.Current
                                                                               );
            }
            return(qcon);
        }