예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="resampleParam"></param>
        /// <returns></returns>
        protected override string BuildResample(CqResampleParam resampleParam)
        {
            if (!String.IsNullOrEmpty(resampleParam.For) || !String.IsNullOrEmpty(resampleParam.Every))
            {
                throw new NotSupportedException("Resampling is not supported by this version of InfluxDB");
            }

            return(String.Empty);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="resampleParam"></param>
        /// <returns></returns>
        protected virtual string BuildResample(CqResampleParam resampleParam)
        {
            if (String.IsNullOrEmpty(resampleParam.For) && String.IsNullOrEmpty(resampleParam.Every))
            {
                return(String.Empty);
            }

            var everyParam = !String.IsNullOrEmpty(resampleParam.Every) ? "EVERY " + resampleParam.Every : String.Empty;
            var forParam   = !String.IsNullOrEmpty(resampleParam.For) ? "FOR " + resampleParam.For : String.Empty;

            return(String.Format("RESAMPLE {0} {1} ", everyParam, forParam));
        }