public Column(Constructor.dbTyp type, string name, bool isNullable, int[] lengths) { Name = name; IsNullable = isNullable; Type = type; Lengths = lengths; }
public Structure(StrucOperation operation, StrucType type, Constructor.dbTyp varType, string name, string customType) { Operation = operation; Type = type; VarType = varType; Name = name; CustomType = customType; }
public Structure(StrucOperation operation, StrucType type, Constructor.dbTyp varType, string name, params int[] lengths) { Operation = operation; Type = type; Name = name; VarType = varType; Lengths = lengths; }
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; }
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); }
private string DataTypeToString(Constructor.dbTyp type, int[] lengths, bool isNullable) { return(DataTypeToString(type, lengths, isNullable, false)); }
public Structure AddColumn(Constructor.dbTyp type, string name, bool isNullable, params int[] lengths) { Columns.Add(new Column(type, name, isNullable, lengths)); return(this); }
/// <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); }