Ejemplo n.º 1
0
 public Column(Constructor.dbTyp type, string name, bool isNullable, int[] lengths)
 {
     Name       = name;
     IsNullable = isNullable;
     Type       = type;
     Lengths    = lengths;
 }
Ejemplo n.º 2
0
 public Structure(StrucOperation operation, StrucType type, Constructor.dbTyp varType, string name, string customType)
 {
     Operation  = operation;
     Type       = type;
     VarType    = varType;
     Name       = name;
     CustomType = customType;
 }
Ejemplo n.º 3
0
 public Structure(StrucOperation operation, StrucType type, Constructor.dbTyp varType, string name, params int[] lengths)
 {
     Operation = operation;
     Type      = type;
     Name      = name;
     VarType   = varType;
     Lengths   = lengths;
 }
Ejemplo n.º 4
0
 public Structure(StrucOperation operation, StrucType type, Constructor.dbTyp varType, Expression value, string name, int[] lengths)
 {
     Operation = operation;
     Type      = type;
     Name      = name;
     Value     = value;
     VarType   = varType;
     Lengths   = lengths;
 }
Ejemplo n.º 5
0
        private string DataTypeToString(Constructor.dbTyp type, int[] lengths, bool isNullable, bool isColumn)
        {
            string[] lens = lengths.Select(l => l.ToString()).ToArray();
            string   res  = " "
                            + type.ToString().ToUpper()
                            + (lens.Length > 0 ? "(" + string.Join(", ", lens) + ")" : "");

            if (isColumn)
            {
                res += (isNullable ? "" : " NOT") + " NULL";
            }
            return(res);
        }
Ejemplo n.º 6
0
 private string DataTypeToString(Constructor.dbTyp type, int[] lengths, bool isNullable)
 {
     return(DataTypeToString(type, lengths, isNullable, false));
 }
Ejemplo n.º 7
0
 public Structure AddColumn(Constructor.dbTyp type, string name, bool isNullable, params int[] lengths)
 {
     Columns.Add(new Column(type, name, isNullable, lengths));
     return(this);
 }
Ejemplo n.º 8
0
        /// <summary>Agrega una instruccion de declaracion de variable</summary>
        public void Declare(Constructor.dbTyp type, string name, params int[] lengths)
        {
            Structure stu = new Structure(Structure.StrucOperation.declare, Structure.StrucType.var, type, name, lengths);

            lstQuery.Add(stu);
        }