Exemplo n.º 1
0
        public override DataTable GetSkylineTable(String querySQL, String preferenceOperators)
        {
            //Calculate cardinality
            long thresholdCardinality = 300;

            TemplateStrategy strategy;

            if (Cardinality <= thresholdCardinality)
            {
                strategy = new SPSkylineDQ();
            }
            else
            {
                if (HasIncomparablePreferences)
                {
                    strategy = new SPSkylineBNLSort();
                }
                else
                {
                    strategy = new SPSkylineBNLSortLevel();
                }
            }

            strategy.WindowHandling = WindowHandling;
            DataTable dt = strategy.GetSkylineTable(querySQL, preferenceOperators, RecordAmountLimit, true, ConnectionString, Provider, AdditionParameters, SortType);

            TimeMilliseconds    = strategy.TimeInMs;
            NumberOfComparisons = strategy.NumberOfOperations;
            NumberOfMoves       = strategy.NumberOfMoves;
            return(dt);
        }
Exemplo n.º 2
0
        public static void GetSkyline(SqlString strQuery, SqlString strOperators, SqlInt32 numberOfRecords, SqlInt32 sortType)
        {
            SPSkylineBNLSortLevel skyline = new SPSkylineBNLSortLevel();

            skyline.GetSkylineTable(strQuery.ToString(), strOperators.ToString(), numberOfRecords.Value, false, Helper.CnnStringSqlclr, Helper.ProviderClr, null, sortType.Value);
        }