public int Compare(MemoryQueryResultRow x, MemoryQueryResultRow y) { if (!selectCommandContext.GetOrderByContext().GetItems().IsEmpty()) { return(Compare(x, y, selectCommandContext.GetOrderByContext().GetItems())); } return(Compare(x, y, selectCommandContext.GetGroupByContext().GetItems())); }
public OrderByStreamMergedDataReader(List <IStreamDataReader> streamDataReaders, SelectCommandContext selectCommandContext, SchemaMetaData schemaMetaData) { this.OrderByItems = selectCommandContext.GetOrderByContext().GetItems(); this.OrderByValuesQueue = new PriorityQueue <OrderByValue>(streamDataReaders.Count); OrderResultSetsToQueue(streamDataReaders, selectCommandContext, schemaMetaData); IsFirstNext = true; }
private bool IsNeedProcessOrderBy(SelectCommandContext selectCommandContext) { return(!selectCommandContext.GetOrderByContext().GetItems().IsEmpty()); }