public object Run() { AbstractQueryResult qr = this._enclosing.NewQueryResult(query.EvaluationMode()); qr.LoadFromQuery(query); return(qr); }
private IQueryResult ClassOnlyQuery() { AbstractQueryResult queryResult = NewQueryResult(); queryResult.LoadFromClassIndex(ClassMetadata()); return(queryResult); }
private IQueryResult ExecuteQuery(IQuery query) { AbstractQueryResult queryResult = NewQueryResult(); queryResult.LoadFromQuery((QQuery)query); return(queryResult); }
public override IQueryResult ExecuteQuery(QQuery query) { AbstractQueryResult queryResult = NewQueryResult(query.Transaction()); queryResult.LoadFromQuery(query); return(queryResult); }
private MsgD WriteImmediateQueryResult(AbstractQueryResult queryResult, ObjectExchangeConfiguration config) { IIntIterator4 idIterator = queryResult.IterateIDs(); MsgD message = BuildQueryResultMessage(0, idIterator, queryResult.Size(), config); return(message); }
public virtual Msg ReplyFromServer() { lock (ContainerLock()) { AbstractQueryResult queryResult = QueryResult(ReadInt()); return(Msg.ObjectsetSize.GetWriterForInt(Transaction(), queryResult.Size())); } }
public virtual void TestGetAll() { AbstractQueryResult queryResult = NewQueryResult(); queryResult.LoadFromClassIndexes(Container().ClassCollection().Iterator()); int[] ids = IntArrays4.Concat(itemIds, new int[] { idForGetAll }); AssertIDs(queryResult, ids, true); }
public virtual AbstractQueryResult GetAll(Transaction trans, QueryEvaluationMode mode) { AbstractQueryResult queryResult = NewQueryResult(trans, mode); queryResult.LoadFromClassIndexes(ClassCollection().Iterator()); return(queryResult); }
protected MsgD WriteQueryResult(AbstractQueryResult queryResult, QueryEvaluationMode evaluationMode, ObjectExchangeConfiguration config) { if (evaluationMode == QueryEvaluationMode.Immediate) { return(WriteImmediateQueryResult(queryResult, config)); } return(WriteLazyQueryResult(queryResult, config)); }
public void Run() { ByteArrayBuffer reader = this._enclosing.ExpectedBufferResponse(Msg.QueryResult); int queryResultID = reader.ReadInt(); AbstractQueryResult queryResult = this._enclosing.QueryResultFor(trans, queryResultID ); queryResult.LoadFromIdReader(this._enclosing.IdIteratorFor(trans, reader)); result.value = queryResult; }
public virtual Msg ReplyFromServer() { AbstractQueryResult queryResult = QueryResult(ReadInt()); lock (ContainerLock()) { int id = queryResult.IndexOf(ReadInt()); return(Msg.ObjectsetIndexof.GetWriterForInt(Transaction(), id)); } }
/// <summary> /// The default /// <see cref="ClientQueryResultIterator">ClientQueryResultIterator</see> /// for this platform. /// </summary> /// <returns></returns> public static IEnumerator CreateClientQueryResultIterator(AbstractQueryResult result ) { IQueryResultIteratorFactory factory = result.Config().QueryResultIteratorFactory( ); if (null != factory) { return(factory.NewInstance(result)); } return(new ClientQueryResultIterator(result)); }
public override IQueryResult ClassOnlyQuery(QQueryBase query, ClassMetadata clazz ) { if (!clazz.HasClassIndex()) { return(new IdListQueryResult(query.Transaction())); } AbstractQueryResult queryResult = NewQueryResult(query.Transaction()); queryResult.LoadFromClassIndex(clazz); return(queryResult); }
private MsgD WriteLazyQueryResult(AbstractQueryResult queryResult, ObjectExchangeConfiguration config) { int queryResultId = GenerateID(); int maxCount = Config().PrefetchObjectCount(); IIntIterator4 idIterator = queryResult.IterateIDs(); MsgD message = BuildQueryResultMessage(queryResultId, idIterator, maxCount, config ); IServerMessageDispatcher serverThread = ServerMessageDispatcher(); serverThread.MapQueryResultToID(new LazyClientObjectSetStub(queryResult, idIterator ), queryResultId); return(message); }
public LazyClientObjectSetStub(AbstractQueryResult queryResult, IIntIterator4 idIterator ) { _queryResult = queryResult; _idIterator = idIterator; }
internal ClientQueryResultIterator(AbstractQueryResult client) { _client = client; _ids = client.IterateIDs(); }