Beispiel #1
0
        /// <summary>
        /// Returns an object that contains fully resolved, one level only information
        /// about the <see cref="DataTable"/> and the row indices of the data in this table.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="rowSet"></param>
        /// <remarks>
        /// This information can be used to construct a new <see cref="VirtualTable"/>. We
        /// need to supply an empty <see cref="RawTableInformation"/> object.
        /// </remarks>
        /// <returns></returns>
        private RawTableInformation ResolveToRawTable(RawTableInformation info, IList <long> rowSet)
        {
            if (this is IRootTable)
            {
                info.Add((IRootTable)this, CalculateRowReferenceList());
            }
            else
            {
                for (int i = 0; i < referenceList.Length; ++i)
                {
                    List <long> newRowSet = new List <long>(rowSet);

                    // Resolve the rows into the parents indices.
                    ResolveAllRowsForTableAt(newRowSet, i);

                    Table table = referenceList[i];
                    if (table is IRootTable)
                    {
                        info.Add((IRootTable)table, newRowSet);
                    }
                    else
                    {
                        ((JoinedTable)table).ResolveToRawTable(info, newRowSet);
                    }
                }
            }

            return(info);
        }
Beispiel #2
0
        /// <inheritdoc/>
        internal override RawTableInformation ResolveToRawTable(RawTableInformation info)
        {
            List <long>        rowSet = new List <long>();
            IEnumerator <long> e      = GetRowEnumerator();

            while (e.MoveNext())
            {
                rowSet.Add(e.Current);
            }
            info.Add(this, rowSet);
            return(info);
        }
Beispiel #3
0
        /// <inheritdoc/>
        internal override RawTableInformation ResolveToRawTable(RawTableInformation info)
        {
            Console.Error.WriteLine("Efficiency Warning in DataTable.ResolveToRawTable.");
            List <long>        rowSet = new List <long>();
            IEnumerator <long> e      = GetRowEnumerator();

            while (e.MoveNext())
            {
                rowSet.Add(e.Current);
            }
            info.Add(this, rowSet);
            return(info);
        }
        private RawTableInformation ResolveToRawTable(RawTableInformation info, IList<long> rowSet)
        {
            if (this is IRootTable) {
                info.Add((IRootTable)this, CalculateRowReferenceList());
            } else {
                for (int i = 0; i < referenceList.Length; ++i) {

                    List<long> newRowSet = new List<long>(rowSet);

                    // Resolve the rows into the parents indices.
                    ResolveAllRowsForTableAt(newRowSet, i);

                    Table table = referenceList[i];
                    if (table is IRootTable) {
                        info.Add((IRootTable)table, newRowSet);
                    } else {
                        ((JoinedTable)table).ResolveToRawTable(info, newRowSet);
                    }
                }
            }

            return info;
        }
Beispiel #5
0
 /// <inheritdoc/>
 internal override RawTableInformation ResolveToRawTable(RawTableInformation info)
 {
     Console.Error.WriteLine("Efficiency Warning in DataTable.ResolveToRawTable.");
     List<long> rowSet = new List<long>();
     IEnumerator<long> e = GetRowEnumerator();
     while (e.MoveNext()) {
         rowSet.Add(e.Current);
     }
     info.Add(this, rowSet);
     return info;
 }
 /// <inheritdoc/>
 internal override RawTableInformation ResolveToRawTable(RawTableInformation info)
 {
     List<long> rowSet = new List<long>();
     IEnumerator<long> e = GetRowEnumerator();
     while (e.MoveNext()) {
         rowSet.Add(e.Current);
     }
     info.Add(this, rowSet);
     return info;
 }