示例#1
0
        public CompositeTable(ITable mainTable, ITable[] composites, CompositeFunction function, bool all)
        {
            this.mainTable  = mainTable;
            this.composites = composites;

            columnIndexes = new ColumnIndex[mainTable.TableInfo.ColumnCount];
            int size = composites.Length;

            rowIndexes = new IList <int> [size];

            if (function == CompositeFunction.Union)
            {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i)
                {
                    rowIndexes[i] = composites[i].SelectAllRows().ToList();
                }

                RemoveDuplicates(all);
            }
            else
            {
                throw new NotSupportedException(String.Format("The composite function '{0}' is not supported (yet).",
                                                              function.ToString().ToUpperInvariant()));
            }
        }
示例#2
0
        public CompositeTable(ITable mainTable, ITable[] composites, CompositeFunction function, bool all)
        {
            this.mainTable  = mainTable;
            this.composites = composites;

            columnIndexes = new ColumnIndex[mainTable.TableInfo.ColumnCount];
            int size = composites.Length;

            rowIndexes = new IList <int> [size];

            if (function == CompositeFunction.Union)
            {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i)
                {
                    rowIndexes[i] = composites[i].SelectAllRows().ToList();
                }

                RemoveDuplicates(all);
            }
            else
            {
                throw new InvalidOperationException("Unrecognised composite function");
            }
        }
示例#3
0
        public CompositeTable(ITable mainTable, ITable[] composites, CompositeFunction function, bool all)
        {
            this.mainTable = mainTable;
            this.composites = composites;

            columnIndexes = new ColumnIndex[mainTable.TableInfo.ColumnCount];
            int size = composites.Length;
            rowIndexes = new IList<int>[size];

            if (function == CompositeFunction.Union) {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i) {
                    rowIndexes[i] = composites[i].SelectAllRows().ToList();
                }

                RemoveDuplicates(all);
            } else {
                throw new InvalidOperationException("Unrecognised composite function");
            }
        }
示例#4
0
        public CompositeTable(ITable mainTable, ITable[] composites, CompositeFunction function, bool all)
        {
            this.mainTable = mainTable;
            this.composites = composites;

            columnIndexes = new ColumnIndex[mainTable.TableInfo.ColumnCount];
            int size = composites.Length;
            rowIndexes = new IList<int>[size];

            if (function == CompositeFunction.Union) {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i) {
                    rowIndexes[i] = composites[i].SelectAllRows().ToList();
                }

                RemoveDuplicates(all);
            } else {
                throw new NotSupportedException(String.Format("The composite function '{0}' is not supported (yet).",
                    function.ToString().ToUpperInvariant()));
            }
        }
示例#5
0
        /// <summary>
        /// Sets up the indexes in this composite table by performing for
        /// composite function on the tables.
        /// </summary>
        /// <param name="function"></param>
        /// <param name="all">If <b>true</b>, duplicated rows are removed.</param>
        public void SetupIndexesForCompositeFunction(CompositeFunction function, bool all)
        {
            int size = compositeTables.Length;

            tableIndexes = new IList <long> [size];

            if (function == CompositeFunction.Union)
            {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i)
                {
                    tableIndexes[i] = compositeTables[i].SelectAll().ToList();
                }

                if (!all)
                {
                    RemoveDuplicates(false);
                }
            }
            else
            {
                throw new ApplicationException("Unrecognised composite function");
            }
        }
示例#6
0
 public CompositeNode(IQueryPlanNode left, IQueryPlanNode right, CompositeFunction compositeOp, bool allOp)
     : base(left, right)
 {
     CompositeFunction = compositeOp;
     All = allOp;
 }
示例#7
0
 public CompositeTable(ITable[] composites, CompositeFunction function, bool all)
     : this(composites[0], composites, function, all)
 {
 }
 public void ChainComposite(TableSelectExpression expression, CompositeFunction composite, bool isAll)
 {
     NextComposite     = expression;
     CompositeFunction = composite;
     IsCompositeAll    = isAll;
 }
示例#9
0
 public CompositeNode(IQueryPlanNode left, IQueryPlanNode right, CompositeFunction compositeOp, bool allOp)
     : base(left, right)
 {
     this.compositeOp = compositeOp;
     this.allOp = allOp;
 }
示例#10
0
 public static ITable Composite(this ITable table, ITable other, CompositeFunction function, bool all)
 {
     return new CompositeTable(table, new[] { table, other }, function, all);
 }
示例#11
0
        /// <summary>
        /// Sets up the indexes in this composite table by performing for 
        /// composite function on the tables.
        /// </summary>
        /// <param name="function"></param>
        /// <param name="all">If <b>true</b>, duplicated rows are removed.</param>
        public void SetupIndexesForCompositeFunction(CompositeFunction function, bool all)
        {
            int size = compositeTables.Length;
            tableIndexes = new IList<long>[size];

            if (function == CompositeFunction.Union) {
                // Include all row sets in all tables
                for (int i = 0; i < size; ++i) {
                    tableIndexes[i] = compositeTables[i].SelectAll().ToList();
                }

                if (!all)
                    RemoveDuplicates(false);
            } else {
                throw new ApplicationException("Unrecognised composite function");
            }
        }
 public void ChainComposite(TableSelectExpression expression, CompositeFunction composite, bool isAll)
 {
     NextComposite = expression;
     CompositeFunction = composite;
     IsCompositeAll = isAll;
 }
示例#13
0
 public CompositeNode(IQueryPlanNode left, IQueryPlanNode right, CompositeFunction compositeOp, bool allOp)
     : base(left, right)
 {
     CompositeFunction = compositeOp;
     All = allOp;
 }
示例#14
0
 public CompositeNode(IQueryPlanNode left, IQueryPlanNode right, CompositeFunction compositeOp, bool allOp)
     : base(left, right)
 {
     this.compositeOp = compositeOp;
     this.allOp       = allOp;
 }
 public SqlQueryExpressionComposite(CompositeFunction function, bool all, SqlQueryExpression expression)
 {
     Function   = function;
     All        = all;
     Expression = expression;
 }
 public SqlQueryExpressionComposite(CompositeFunction function, SqlQueryExpression expression)
     : this(function, false, expression)
 {
 }
示例#17
0
 public CompositeTable(ITable[] composites, CompositeFunction function, bool all)
     : this(composites[0], composites, function, all)
 {
 }