コード例 #1
0
ファイル: AbstractQueryResult.cs プロジェクト: pondyond/db4o
        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
ファイル: AbstractQueryResult.cs プロジェクト: erdincay/db4o
		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;
		}
コード例 #5
0
			public _IVisitor4_130(IdListQueryResult _enclosing, ByRef duplicates)
			{
				this._enclosing = _enclosing;
				this.duplicates = duplicates;
			}
コード例 #6
0
			public _IVisitor4_107(IdListQueryResult _enclosing)
			{
				this._enclosing = _enclosing;
			}
コード例 #7
0
			public _ISortable4_88(IdListQueryResult _enclosing, IIntComparator cmp)
			{
				this._enclosing = _enclosing;
				this.cmp = cmp;
			}
コード例 #8
0
 public _IVisitor4_130(IdListQueryResult _enclosing, ByRef duplicates)
 {
     this._enclosing = _enclosing;
     this.duplicates = duplicates;
 }
コード例 #9
0
 public _IVisitor4_107(IdListQueryResult _enclosing)
 {
     this._enclosing = _enclosing;
 }
コード例 #10
0
 public _ISortable4_88(IdListQueryResult _enclosing, IIntComparator cmp)
 {
     this._enclosing = _enclosing;
     this.cmp        = cmp;
 }
コード例 #11
0
ファイル: QQueryBase.cs プロジェクト: masroore/db4o
 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
ファイル: QQueryBase.cs プロジェクト: masroore/db4o
 public _IVisitor4_406(IdListQueryResult result)
 {
     this.result = result;
 }
コード例 #13
0
ファイル: QQueryBase.cs プロジェクト: masroore/db4o
 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
ファイル: QQueryBase.cs プロジェクト: superyfwy/db4o
			public AscendingQueryExecutor(Transaction trans, IdListQueryResult result, Collection4
				 executionPath)
			{
				_trans = trans;
				_container = _trans.Container();
				_result = result;
				_executionPath = executionPath;
			}
コード例 #15
0
ファイル: QQueryBase.cs プロジェクト: superyfwy/db4o
		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
ファイル: AbstractQueryResult.cs プロジェクト: masroore/db4o
 public virtual AbstractQueryResult ToIdList
     ()
 {
     var res = new IdListQueryResult(Transaction(), KnownSize());
     var i = IterateIDs();
     while (i.MoveNext())
     {
         res.Add(i.CurrentInt());
     }
     return res;
 }