示例#1
0
 public virtual void CaptureQueryResultConfig()
 {
     var config = _trans.Container().Config();
     _evaluationMode = config.EvaluationMode();
     _prefetchDepth = config.PrefetchDepth();
     _prefetchCount = config.PrefetchObjectCount();
 }
示例#2
0
文件: MsgQuery.cs 项目: masroore/db4o
 protected MsgD WriteQueryResult(AbstractQueryResult queryResult, QueryEvaluationMode
     evaluationMode, ObjectExchangeConfiguration config)
 {
     if (evaluationMode == QueryEvaluationMode.Immediate)
     {
         return WriteImmediateQueryResult(queryResult, config);
     }
     return WriteLazyQueryResult(queryResult, config);
 }
示例#3
0
 private static AbstractQueryResult ForMode(Transaction transaction, QueryEvaluationMode
     mode)
 {
     if (mode == QueryEvaluationMode.Lazy)
     {
         return new LazyQueryResult(transaction);
     }
     if (mode == QueryEvaluationMode.Snapshot)
     {
         return new SnapShotQueryResult(transaction);
     }
     return new IdListQueryResult(transaction);
 }
示例#4
0
		public override AbstractQueryResult NewQueryResult(Transaction trans, QueryEvaluationMode
			 mode)
		{
			throw new InvalidOperationException();
		}
示例#5
0
文件: MsgQuery.cs 项目: masroore/db4o
 protected virtual AbstractQueryResult NewQueryResult(QueryEvaluationMode mode)
 {
     return Container().NewQueryResult(Transaction(), mode);
 }
		public void EvaluationMode(QueryEvaluationMode mode)
		{
			_config.Put(QueryEvaluationModeKey, mode);
		}
示例#7
0
		private QQuery NewQuery(QueryEvaluationMode mode)
		{
			QQuery query = (QQuery)LocalContainer().Query();
			query.EvaluationMode(mode);
			return query;
		}
示例#8
0
			public _IClosure4_24(MGetAll _enclosing, QueryEvaluationMode mode)
			{
				this._enclosing = _enclosing;
				this.mode = mode;
			}
示例#9
0
		private AbstractQueryResult GetAll(QueryEvaluationMode mode)
		{
			return ((AbstractQueryResult)NewQuery(mode).TriggeringQueryEvents(new _IClosure4_24
				(this, mode)));
		}
示例#10
0
 public HybridQueryResult(Transaction transaction, QueryEvaluationMode mode) : base
     (transaction)
 {
     _delegate = ForMode(transaction, mode);
 }
示例#11
0
		public abstract AbstractQueryResult NewQueryResult(Transaction trans, QueryEvaluationMode
			 mode);
			public LabeledQueryMode(QueryEvaluationMode mode)
			{
				_mode = mode;
			}
示例#13
0
 public virtual void EvaluationMode(QueryEvaluationMode mode)
 {
     _evaluationMode = mode;
 }
示例#14
0
 public virtual void Unmarshall(Transaction a_trans)
 {
     _evaluationMode = QueryEvaluationMode.FromInt(_evaluationModeAsInt);
     _trans = a_trans;
     var i = IterateConstraints();
     while (i.MoveNext())
     {
         ((QCon) i.Current).Unmarshall(a_trans);
     }
 }
示例#15
0
		public virtual AbstractQueryResult GetAll(Transaction trans, QueryEvaluationMode 
			mode)
		{
			AbstractQueryResult queryResult = NewQueryResult(trans, mode);
			queryResult.LoadFromClassIndexes(ClassCollection().Iterator());
			return queryResult;
		}
示例#16
0
		public sealed override AbstractQueryResult NewQueryResult(Transaction trans, QueryEvaluationMode
			 mode)
		{
			if (trans == null)
			{
				throw new ArgumentNullException();
			}
			if (mode == QueryEvaluationMode.Immediate)
			{
				return new IdListQueryResult(trans);
			}
			return new HybridQueryResult(trans, mode);
		}