当前位置: 首页>>代码示例>>C#>>正文


C# ITable.GetRawTableInfo方法代码示例

本文整理汇总了C#中ITable.GetRawTableInfo方法的典型用法代码示例。如果您正苦于以下问题:C# ITable.GetRawTableInfo方法的具体用法?C# ITable.GetRawTableInfo怎么用?C# ITable.GetRawTableInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITable的用法示例。


在下文中一共展示了ITable.GetRawTableInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

        public static OuterTable Create(ITable inputTable)
        {
            var baseTable = inputTable.GetRawTableInfo();
            var tables = baseTable.GetTables();
            var rows = baseTable.GetRows();

            return new OuterTable(tables, rows);
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:OuterTable.cs

示例2: Union

        public static ITable Union(this ITable thisTable, ITable otherTable)
        {
            // Optimizations - handle trivial case of row count in one of the tables
            //   being 0.
            // NOTE: This optimization assumes this table and the unioned table are
            //   of the same type.
            if ((thisTable.RowCount == 0 && otherTable.RowCount == 0) ||
                otherTable.RowCount == 0) {
                return thisTable;
            }

            if (thisTable.RowCount == 0)
                return otherTable;

            // First we merge this table with the input table.

            var raw1 = thisTable.GetRawTableInfo();
            var raw2 = otherTable.GetRawTableInfo();

            // This will throw an exception if the table types do not match up.

            var union = raw1.Union(raw2);

            // Now 'union' contains a list of uniquely merged rows (ie. the union).
            // Now make it into a new table and return the information.

            var tableList = union.GetTables().AsEnumerable();
            return new VirtualTable(tableList, union.GetRows());
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:29,代码来源:TableQueryExtensions.cs

示例3: MergeIn

        public void MergeIn(ITable outsideTable)
        {
            var rawTableInfo = outsideTable.GetRawTableInfo();

            // Get the base information,
            var baseTables = ReferenceTables;
            IList<int>[] baseRows = ReferenceRows;

            // The tables and rows being merged in.
            var tables = rawTableInfo.GetTables();
            var rows = rawTableInfo.GetRows();
            // The number of rows being merged in.
            outerRowCount = rows[0].Count;

            for (int i = 0; i < baseTables.Length; ++i) {
                var btable = baseTables[i];
                int index = -1;
                for (int n = 0; n < tables.Length && index == -1; ++n) {
                    if (btable == tables[n]) {
                        index = n;
                    }
                }

                // If the table wasn't found, then set 'NULL' to this base_table
                if (index == -1) {
                    outerRows[i] = null;
                } else {
                    List<int> list = new List<int>(outerRowCount);
                    outerRows[i] = list;
                    // Merge in the rows from the input table,
                    IList<int> toMerge = rows[index];
                    if (toMerge.Count != outerRowCount)
                        throw new InvalidOperationException("Wrong size for rows being merged in.");

                    list.AddRange(toMerge);
                }
            }
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:38,代码来源:OuterTable.cs


注:本文中的ITable.GetRawTableInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。