Пример #1
0
        public ValuesQueryResultAction(NeoDatis.Odb.Core.Query.IValuesQuery query, NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine
                                       storageEngine, NeoDatis.Odb.Core.Layers.Layer2.Instance.IInstanceBuilder instanceBuilder
                                       ) : base()
        {
            this.engine          = storageEngine;
            this.query           = query;
            this.queryHasOrderBy = query.HasOrderBy();
            this.instanceBuilder = instanceBuilder;
            this.returnArraySize = query.GetObjectActions().Count;
            System.Collections.IEnumerator iterator = query.GetObjectActions().GetEnumerator(
                );
            NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction qfa = null;
            queryFieldActions = new NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction[returnArraySize
                                ];
            int i = 0;

            while (iterator.MoveNext())
            {
                qfa = (NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction)iterator.Current;
                queryFieldActions[i] = qfa.Copy();
                queryFieldActions[i].SetReturnInstance(query.ReturnInstance());
                queryFieldActions[i].SetInstanceBuilder(instanceBuilder);
                i++;
            }
        }
Пример #2
0
 public GroupByValuesQueryResultAction(NeoDatis.Odb.Core.Query.IValuesQuery query,
                                       NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine storageEngine, NeoDatis.Odb.Core.Layers.Layer2.Instance.IInstanceBuilder
                                       instanceBuilder) : base()
 {
     this.query            = query;
     this.queryHasOrderBy  = query.HasOrderBy();
     this.instanceBuilder  = instanceBuilder;
     this.returnArraySize  = query.GetObjectActions().Count;
     this.groupByFieldList = query.GetGroupByFieldList();
     this.groupByResult    = new NeoDatis.Tool.Wrappers.Map.OdbHashMap <NeoDatis.Tool.Wrappers.OdbComparable
                                                                        , NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction>();
 }
Пример #3
0
 public virtual void Start()
 {
     if (query != null && query.HasOrderBy())
     {
         result = new NeoDatis.Odb.Impl.Core.Query.List.Values.InMemoryBTreeCollectionForValues
                      ((int)nbObjects, query.GetOrderByType());
     }
     else
     {
         result = new NeoDatis.Odb.Impl.Core.Query.List.Values.SimpleListForValues((int)nbObjects
                                                                                   );
     }
     NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction qfa = null;
     for (int i = 0; i < returnArraySize; i++)
     {
         qfa = queryFieldActions[i];
         qfa.Start();
     }
 }
Пример #4
0
 // Nothing to do
 public virtual void End()
 {
     if (query != null && query.HasOrderBy())
     {
         result = new NeoDatis.Odb.Impl.Core.Query.List.Values.InMemoryBTreeCollectionForValues
                      ((int)nbObjects, query.GetOrderByType());
     }
     else
     {
         result = new NeoDatis.Odb.Impl.Core.Query.List.Values.SimpleListForValues((int)nbObjects
                                                                                   );
     }
     System.Collections.IEnumerator iterator = groupByResult.Keys.GetEnumerator();
     NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction vqra = null;
     NeoDatis.Tool.Wrappers.OdbComparable key = null;
     while (iterator.MoveNext())
     {
         key  = (NeoDatis.Tool.Wrappers.OdbComparable)iterator.Current;
         vqra = (NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction)groupByResult
                [key];
         vqra.End();
         Merge(key, vqra.GetValues());
     }
 }