コード例 #1
0
 private MySqlTypeNumber ReadNumberType(MySqlTypeNumber res)
 {
     if (IsSymbol("("))
     {
         ReadExprInBracket();
     }
     ReadUnsignedZerofill(res);
     return(res);
 }
コード例 #2
0
        private void ReadUnsignedZerofill(MySqlTypeNumber type)
        {
            bool any = true;

            while (any)
            {
                any = false;
                if (SkipTokenIf("unsigned"))
                {
                    type.Unsigned = true;
                    any           = true;
                }
                if (SkipTokenIf("zerofill"))
                {
                    type.Zerofill = true;
                    any           = true;
                }
            }
        }
コード例 #3
0
 private MySqlTypeNumber ReadRealNumberType(MySqlTypeNumber res)
 {
     NextToken();
     if (SkipTokenIf("("))
     {
         string prec  = SkipToken();
         string scale = "0";
         if (SkipTokenIf(","))
         {
             scale = SkipToken();
         }
         SkipSymbol(")");
         var num = res as MySqlTypeNumericBase;
         if (num != null)
         {
             num.Length   = Int32.Parse(prec);
             num.Decimals = Int32.Parse(scale);
         }
     }
     ReadUnsignedZerofill(res);
     return(res);
 }