Example #1
0
 protected virtual void BlankSelectableSchemes(int type)
 {
     columnScheme = new SelectableScheme[TableInfo.ColumnCount];
     for (int i = 0; i < columnScheme.Length; ++i)
     {
         if (type == 0)
         {
             columnScheme[i] = new InsertSearch(this, i);
         }
         else if (type == 1)
         {
             columnScheme[i] = new BlindSearch(this, i);
         }
     }
 }
Example #2
0
        /// <inheritdoc/>
        internal override SelectableScheme GetSelectableSchemeFor(int column, int originalColumn, Table table)
        {
            if (ColumnScheme[column] == null)
            {
                // EFFICIENCY: We implement this with a blind search...
                SelectableScheme scheme = new BlindSearch(this, column);
                ColumnScheme[column] = scheme.GetSubsetScheme(this, column);
            }

            if (table == this)
            {
                return(ColumnScheme[column]);
            }

            return(ColumnScheme[column].GetSubsetScheme(table, originalColumn));
        }
Example #3
0
        /// <inheritdoc/>
        internal override SelectableScheme GetSelectableSchemeFor(int column, int originalColumn, Table table)
        {
            SelectableScheme scheme = columnScheme[column];

            if (scheme == null)
            {
                scheme = new BlindSearch(this, column);
                columnScheme[column] = scheme;
            }

            // If we are getting a scheme for this table, simple return the information
            // from the column_trees Vector.
            if (table == this)
            {
                return(scheme);
            }

            // Otherwise, get the scheme to calculate a subset of the given scheme.
            return(scheme.GetSubsetScheme(table, originalColumn));
        }