public DB2iSeriesDataProvider(DB2iSeriesLevels minLevel) : base(DB2iSeriesFactory.ProviderName, null)
        {
            this.minLevel = minLevel;

            DB2iSeriesExpressions.LoadExpressions();

            SqlProviderFlags.AcceptsTakeAsParameter       = false;
            SqlProviderFlags.AcceptsTakeAsParameterIfSkip = true;
            SqlProviderFlags.IsDistinctOrderBySupported   = true;
            SqlProviderFlags.CanCombineParameters         = false;
            SqlProviderFlags.IsParameterOrderDependent    = true;

            SetCharField("CHAR", (r, i) => r.GetString(i).TrimEnd());

            _sqlOptimizer = new DB2iSeriesSqlOptimizer(SqlProviderFlags);
        }
        public DB2iSeriesDataProvider(string name, DB2iSeriesLevels minLevel, bool mapGuidAsString) : base(name, null)
        {
            this.minLevel        = minLevel;
            this.mapGuidAsString = mapGuidAsString;

            DB2iSeriesExpressions.LoadExpressions(name);

            SqlProviderFlags.AcceptsTakeAsParameter       = false;
            SqlProviderFlags.AcceptsTakeAsParameterIfSkip = true;
            SqlProviderFlags.IsDistinctOrderBySupported   = true;
            SqlProviderFlags.CanCombineParameters         = false;
            SqlProviderFlags.IsParameterOrderDependent    = true;

            if (mapGuidAsString)
            {
                SqlProviderFlags.CustomFlags.Add(DB2iSeriesTools.MapGuidAsString);
            }

            SetCharField("CHAR", (r, i) => r.GetString(i).TrimEnd(' '));
            SetCharField("NCHAR", (r, i) => r.GetString(i).TrimEnd(' '));

            _sqlOptimizer = new DB2iSeriesSqlOptimizer(SqlProviderFlags);
        }