示例#1
0
        public virtual AbstractQueryResult ToIdList
            ()
        {
            var res = new IdListQueryResult(Transaction(), KnownSize());
            var i   = IterateIDs();

            while (i.MoveNext())
            {
                res.Add(i.CurrentInt());
            }
            return(res);
        }
示例#2
0
        public virtual Db4objects.Db4o.Internal.Query.Result.AbstractQueryResult ToIdList
            ()
        {
            IdListQueryResult res = new IdListQueryResult(Transaction(), KnownSize());
            IIntIterator4     i   = IterateIDs();

            while (i.MoveNext())
            {
                res.Add(i.CurrentInt());
            }
            return(res);
        }
示例#3
0
文件: QLinRoot.cs 项目: erdincay/db4o
		public override IObjectSet Select()
		{
			if (_limit == -1)
			{
				return _query.Execute();
			}
			IQueryResult queryResult = _query.GetQueryResult();
			IdListQueryResult limitedResult = new IdListQueryResult(_query.Transaction(), _limit
				);
			int counter = 0;
			IIntIterator4 i = queryResult.IterateIDs();
			while (i.MoveNext())
			{
				if (counter++ >= _limit)
				{
					break;
				}
				limitedResult.Add(i.CurrentInt());
			}
			return new ObjectSetFacade(limitedResult);
		}
示例#4
0
		public virtual Db4objects.Db4o.Internal.Query.Result.AbstractQueryResult ToIdList
			()
		{
			IdListQueryResult res = new IdListQueryResult(Transaction(), KnownSize());
			IIntIterator4 i = IterateIDs();
			while (i.MoveNext())
			{
				res.Add(i.CurrentInt());
			}
			return res;
		}
			public _IVisitor4_130(IdListQueryResult _enclosing, ByRef duplicates)
			{
				this._enclosing = _enclosing;
				this.duplicates = duplicates;
			}
			public _IVisitor4_107(IdListQueryResult _enclosing)
			{
				this._enclosing = _enclosing;
			}
			public _ISortable4_88(IdListQueryResult _enclosing, IIntComparator cmp)
			{
				this._enclosing = _enclosing;
				this.cmp = cmp;
			}
 public _IVisitor4_130(IdListQueryResult _enclosing, ByRef duplicates)
 {
     this._enclosing = _enclosing;
     this.duplicates = duplicates;
 }
 public _IVisitor4_107(IdListQueryResult _enclosing)
 {
     this._enclosing = _enclosing;
 }
 public _ISortable4_88(IdListQueryResult _enclosing, IIntComparator cmp)
 {
     this._enclosing = _enclosing;
     this.cmp        = cmp;
 }
示例#11
0
 public virtual void ExecuteLocal(IdListQueryResult result)
 {
     CheckConstraintsEvaluationMode();
     var r = CreateCandidateCollection();
     var checkDuplicates = r.checkDuplicates;
     var topLevel = r.topLevel;
     var candidateCollection = r.candidateCollection;
     if (candidateCollection != null)
     {
         var executionPath = topLevel ? null : FieldPathFromTop();
         IEnumerator i = new Iterator4Impl(candidateCollection);
         while (i.MoveNext())
         {
             ((QCandidates) i.Current).Execute();
         }
         if (candidateCollection._next != null)
         {
             checkDuplicates = true;
         }
         if (checkDuplicates)
         {
             result.CheckDuplicates();
         }
         var stream = Stream();
         i = new Iterator4Impl(candidateCollection);
         while (i.MoveNext())
         {
             var candidates = (QCandidates) i.Current;
             if (topLevel)
             {
                 candidates.Traverse(result);
             }
             else
             {
                 candidates.Traverse(new _IVisitor4_374(this, executionPath, stream, result));
             }
         }
     }
     Sort(result);
 }
示例#12
0
 public _IVisitor4_406(IdListQueryResult result)
 {
     this.result = result;
 }
示例#13
0
 public _IVisitor4_374(QQueryBase _enclosing, Collection4 executionPath, ObjectContainerBase
     stream, IdListQueryResult result)
 {
     this._enclosing = _enclosing;
     this.executionPath = executionPath;
     this.stream = stream;
     this.result = result;
 }
示例#14
0
			public AscendingQueryExecutor(Transaction trans, IdListQueryResult result, Collection4
				 executionPath)
			{
				_trans = trans;
				_container = _trans.Container();
				_result = result;
				_executionPath = executionPath;
			}
示例#15
0
		public virtual void ExecuteLocal(IdListQueryResult result)
		{
			CheckConstraintsEvaluationMode();
			QQueryBase.CreateCandidateCollectionResult r = CreateCandidateCollection();
			bool checkDuplicates = r.checkDuplicates;
			bool topLevel = r.topLevel;
			List4 candidateCollection = r.candidateCollection;
			if (candidateCollection != null)
			{
				Collection4 executionPath = topLevel ? null : FieldPathFromTop();
				IEnumerator i = new Iterator4Impl(candidateCollection);
				while (i.MoveNext())
				{
					((QCandidates)i.Current).Execute();
				}
				if (((List4)candidateCollection._next) != null)
				{
					checkDuplicates = true;
				}
				if (checkDuplicates)
				{
					result.CheckDuplicates();
				}
				i = new Iterator4Impl(candidateCollection);
				while (i.MoveNext())
				{
					QCandidates candidates = (QCandidates)i.Current;
					if (topLevel)
					{
						candidates.TraverseIds(result);
					}
					else
					{
						candidates.TraverseIds(new QQueryBase.AscendingQueryExecutor(_trans, result, executionPath
							));
					}
				}
			}
			Sort(result);
		}
示例#16
0
 public virtual AbstractQueryResult ToIdList
     ()
 {
     var res = new IdListQueryResult(Transaction(), KnownSize());
     var i = IterateIDs();
     while (i.MoveNext())
     {
         res.Add(i.CurrentInt());
     }
     return res;
 }