示例#1
0
        public void SetOption(HqlToken token)
        {
            if (_options == null)
            {
                _options = new HqlCalcOptions();
            }

            if (token.WordType == HqlWordType.INT)
            {
                _options.DecimalPrintPlaces = token.ParsedAsInt;
            }
            else if (token.WordType == HqlWordType.LITERAL_STRING)
            {
                _options.DecimalPrintFormat = (string)token.Data;
            }
            else
            {
                throw new Exception("Unknown option to Function");
            }
        }
示例#2
0
 public HqlCalc(HqlCalcOptions options)
 {
     _options = options;
 }
示例#3
0
 public HqlCount(HqlCalcOptions options) : base(options)
 {
     count = 0;
 }
示例#4
0
 public HqlStdev(HqlCalcOptions options) : base(options)
 {
     Q = null;
     M = null;
     //count = 0; // unnecessary
 }
示例#5
0
 public HqlAvg(HqlCalcOptions options) : base(options)
 {
     sum = null;
 }
示例#6
0
 public HqlCalcDec(HqlCalcOptions options) : base(options)
 {
 }
示例#7
0
 public HqlCalcInt(HqlCalcOptions options) : base(options)
 {
 }
示例#8
0
 public HqlMin(HqlCalcOptions options) : base(options)
 {
     min = null;
 }
示例#9
0
 public HqlMax(HqlCalcOptions options) : base(options)
 {
     max = null;
 }