/// <summary> /// /// </summary> /// <param name="column"></param> private void BuildUpdateSet(ColumnInfo column) { ScriptBuilder.Append(column.GetPgSqlName()); ScriptBuilder.Append(" = "); ScriptBuilder.Append($"@{column.Name}"); ScriptBuilder.AppendIf(Columns.IsNotLast(column), Strings.Comma); ScriptBuilder.Append(Strings.WhiteSpace); }
/// <summary> /// /// </summary> /// <param name="column"></param> private void BuildColumn(ColumnInfo column) { ScriptBuilder.AppendLine(); ScriptBuilder.Append($"{column.GetPgSqlName()} "); ScriptBuilder.Append(column.Type.GetColumnType()); BuildNullableInfo(column); BuildPrimaryKeyAndIdentity(column); ScriptBuilder.AppendIf(Columns.IsNotLast(column), Strings.Comma); }
/// <summary> /// /// </summary> private void BuildColumn(ColumnInfo column) { ScriptBuilder.Append(column.GetPgSqlName()); ScriptBuilder.AppendIf(Columns.IsNotLast(column), ", "); }
/// <summary> /// /// </summary> /// <param name="columnInfo"></param> private void SetColumnComment(ColumnInfo columnInfo) { ScriptBuilder.AppendLine($"comment on column {Table.GetPgSqlName()}.{columnInfo.GetPgSqlName()} is '{columnInfo.Description}';"); }