Exemplo n.º 1
0
 public abstract string GetVariableDeclaration(QueryType type, bool suppressSize);
Exemplo n.º 2
0
 public override string GetVariableDeclaration(QueryType type, bool suppressSize)
 {
     var sqlType = (DbQueryType)type;
     StringBuilder sb = new StringBuilder();
     sb.Append(sqlType.SqlDbType.ToString().ToUpper());
     if (sqlType.Length > 0 && !suppressSize)
     {
         if (sqlType.Length == Int32.MaxValue)
         {
             sb.Append("(max)");
         }
         else
         {
             sb.AppendFormat("({0})", sqlType.Length);
         }
     }
     else if (sqlType.Precision != 0)
     {
         if (sqlType.Scale != 0)
         {
             sb.AppendFormat("({0},{1})", sqlType.Precision, sqlType.Scale);
         }
         else
         {
             sb.AppendFormat("({0})", sqlType.Precision);
         }
     }
     return sb.ToString();
 }
Exemplo n.º 3
0
 public QueryParameter(string name, Type type, QueryType queryType)
 {
     this.name = name;
     this.type = type;
     this.queryType = queryType;
 }