public void AddDecimalNumber( Table table, string name, TSQLType sqlType, int?precision = null, int?scale = null, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formForperties = null) { CheckAttributeName(table: table, name: name); DecimalNumber decimalNumber = new DecimalNumber( name: name, sqlType: sqlType, precision: precision, scale: scale, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formForperties) { TableId = table.Id }; _attributeRepository.Add(entity: decimalNumber); }
public void AddString( Table table, string name, TSQLType sqlType, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, uint?length = null, string defaultValue = null, string description = null, string formProperties = null) { CheckAttributeName(table: table, name: name); String attribute = new String( name: name, sqlType: sqlType, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, length: length, defaultValue: defaultValue, description: description, formSettings: formProperties) { TableId = table.Id }; _attributeRepository.Add(entity: attribute); }
public void AddRealNumber( Table table, string name, TSQLType sqlType, int?bitCapacity, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formForperties = null) { CheckAttributeName(table: table, name: name); RealNumber realNumber = new RealNumber( name: name, sqlType: sqlType, bitCapacity: bitCapacity, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formForperties) { TableId = table.Id }; _attributeRepository.Add(entity: realNumber); }
protected internal IntegerNumber( string name, TSQLType sqlType, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formSettings = null) : base( name: name, sqlType: sqlType, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formSettings) { }
/// <summary> /// TSQL(TSQLType) 构造函数 /// </summary> /// <param name="_type">Sql命令类型</param> /// <param name="_tableName">Table名称(选填)</param> public TSQL(TSQLType _type, string _tableName = "") { this.Type = _type; this.Tables = new TableCollection(); if (_tableName != "") { this.Tables.Add(_tableName); } this.Fields = new FieldCollection(); this.Outputs = new OutputCollection(); this.Wheres = new WhereCollection(); this.Groups = new GroupCollection(); this.Havings = new WhereCollection(); this.Orders = new OrderCollection(); this.Procedures = ""; this.Parameters = new List <Parameter>(); this.Limit = 0; this.Offset = 0; }
protected internal RealNumber( string name, TSQLType sqlType, int?bitCapacity = null, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formSettings = null) : base( name: name, sqlType: sqlType, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formSettings) { ChangeBitCapacity(bitCapacity: bitCapacity); }
protected Attribute( string name, TSQLType sqlType, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formSettings = null) { Name = name ?? throw new ArgumentNullException(nameof(name)); ChangeType(type: sqlType); ChangeIsNullable(isNullable: isNullable); ChangeIsPrimaryKey(isPrimaryKey: isPrimaryKey); ChangeIsIndexed(isIndexed: isIndexed); ChangeDescriotion(description: description); ChangeFormSettings(formSettings: formSettings); }
protected internal String( string name, TSQLType sqlType, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, uint?length = null, string defaultValue = null, string description = null, string formSettings = null) : base( name: name, sqlType: sqlType, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formSettings) { ChangeMaxLength(length: length); DefaultValue = defaultValue; }
protected internal DecimalNumber( string name, TSQLType sqlType, int?precision = null, int?scale = null, bool isNullable = true, bool isPrimaryKey = false, bool isIndexed = false, string description = null, string formSettings = null) : base( name: name, sqlType: sqlType, isNullable: isNullable, isPrimaryKey: isPrimaryKey, isIndexed: isIndexed, description: description, formSettings: formSettings) { ChangePrecision(precision: precision); ChangeScale(scale: scale); }
public void ChangeType(TSQLType type) { SqlType = type; OnModified(); }
public bool IsValidType(Type attributeType, TSQLType sqlType) { return(Types[key : attributeType]?.Contains(item : sqlType) ?? false); }