本文整理汇总了C#中FluentMigrator.Expressions.RenameTableExpression类的典型用法代码示例。如果您正苦于以下问题:C# RenameTableExpression类的具体用法?C# RenameTableExpression怎么用?C# RenameTableExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenameTableExpression类属于FluentMigrator.Expressions命名空间,在下文中一共展示了RenameTableExpression类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CanRenameTable
public void CanRenameTable()
{
var expression = new RenameTableExpression();
expression.SchemaName = "dbo";
expression.OldName = "Table1";
expression.NewName = "Table2";
var sql = generator.Generate( expression );
sql.ShouldBe( "sp_rename '[dbo].[Table1]', 'Table2'" );
}
开发者ID:gliljas,项目名称:fluentmigrator,代码行数:10,代码来源:SqlServer2008GeneratorTests.cs
示例2: Table
public IRenameTableToOrInSchemaSyntax Table(string oldName)
{
var expression = new RenameTableExpression { OldName = oldName };
_context.Expressions.Add(expression);
return new RenameTableExpressionBuilder(expression);
}
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:6,代码来源:RenameExpressionRoot.cs
示例3: Generate
public override string Generate(RenameTableExpression expression)
{
truncator.Truncate(expression);
return compatabilityMode.HandleCompatabilty("Rename table is not supported");
}
开发者ID:akema-fr,项目名称:fluentmigrator,代码行数:5,代码来源:FirebirdGenerator.cs
示例4: Generate
public override string Generate(RenameTableExpression expression)
{
return String.Format(RenameTable, Quoter.QuoteTableName(expression.OldName), Quoter.QuoteTableName(expression.NewName));
}
开发者ID:robertmircea,项目名称:fluentmigrator,代码行数:4,代码来源:GenericGenerator.cs
示例5: Generate
public override string Generate(RenameTableExpression expression)
{
return string.Format("ALTER TABLE {0}.{1} RENAME TO {2}", Quoter.QuoteSchemaName(expression.SchemaName), Quoter.QuoteTableName(expression.OldName), Quoter.QuoteTableName(expression.NewName));
}
开发者ID:VSoftTechnologies,项目名称:fluentmigrator,代码行数:4,代码来源:PostgresGenerator.cs
示例6: Process
public virtual void Process(RenameTableExpression expression)
{
Process(Generator.Generate(expression));
}
开发者ID:Ang3lFir3,项目名称:fluentmigrator,代码行数:4,代码来源:ProcessorBase.cs
示例7: Truncate
public void Truncate(RenameTableExpression expression)
{
expression.OldName = Truncate(expression.OldName);
expression.NewName = Truncate(expression.NewName);
}
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:5,代码来源:FirebirdTruncator.cs
示例8: Generate
public abstract string Generate(RenameTableExpression expression);
开发者ID:ibebbs,项目名称:fluentmigrator,代码行数:1,代码来源:GeneratorBase.cs
示例9: ErrorIsReturnedWhenNewNameIsEmptyString
public void ErrorIsReturnedWhenNewNameIsEmptyString()
{
var expression = new RenameTableExpression { NewName = String.Empty };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldContain(ErrorMessages.NewTableNameCannotBeNullOrEmpty);
}
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:6,代码来源:RenameTableExpressionTests.cs
示例10: ErrorIsNotReturnedWhenOldNameIsNotNullEmptyString
public void ErrorIsNotReturnedWhenOldNameIsNotNullEmptyString()
{
var expression = new RenameTableExpression { OldName = "Bacon" };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldNotContain(ErrorMessages.OldTableNameCannotBeNullOrEmpty);
}
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:6,代码来源:RenameTableExpressionTests.cs
示例11: ToStringIsDescriptive
public void ToStringIsDescriptive()
{
var expression = new RenameTableExpression { OldName = "Bacon", NewName = "ChunkyBacon" };
expression.ToString().ShouldBe("RenameTable Bacon ChunkyBacon");
}
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:5,代码来源:RenameTableExpressionTests.cs
示例12: Generate
public override string Generate(RenameTableExpression expression)
{
return String.Format("sp_rename '{0}[{1}]', '{2}'", FormatSchema( expression.SchemaName ), expression.OldName, FormatSqlEscape(expression.NewName));
}
开发者ID:jetheredge,项目名称:fluentmigrator,代码行数:4,代码来源:SqlServer2008Generator.cs
示例13: Generate
public override string Generate(RenameTableExpression expression)
{
return String.Format("sp_rename {0}, {1}", Quoter.QuoteValue(expression.OldName), Quoter.QuoteValue(expression.NewName));
}
开发者ID:BarsBarsovich,项目名称:fluentmigrator,代码行数:4,代码来源:SqlServerCeGenerator.cs
示例14: Generate
public override string Generate(RenameTableExpression expression)
{
return FormatExpression("sp_rename [{0}], [{1}]", expression.OldName, expression.NewName);
}
开发者ID:stevehodgkiss,项目名称:fluentmigrator,代码行数:4,代码来源:SqlServerGenerator.cs
示例15: Generate
public override string Generate(RenameTableExpression expression)
{
return String.Format("RENAME TABLE `{0}` TO `{1}`", expression.OldName, expression.NewName);
}
开发者ID:jtreuting,项目名称:fluentmigrator,代码行数:4,代码来源:MySqlGenerator.cs
示例16: CanRenameTable
public void CanRenameTable()
{
var expression = new RenameTableExpression();
expression.OldName = "Table1";
expression.NewName = "Table2";
var sql = generator.Generate(expression);
sql.ShouldBe("sp_rename [Table1], [Table2]");
}
开发者ID:Ang3lFir3,项目名称:fluentmigrator,代码行数:9,代码来源:SqlServer2000GeneratorTests.cs
示例17: CanRenameTable
public void CanRenameTable()
{
RenameTableExpression expression = new RenameTableExpression { OldName = oldTable, NewName = newTable };
string sql = generator.Generate(expression);
sql.ShouldBe(string.Format("ALTER TABLE [{0}] RENAME TO [{1}]", oldTable, newTable));
}
开发者ID:Ang3lFir3,项目名称:fluentmigrator,代码行数:6,代码来源:SqliteGeneratorTests.cs
示例18: ErrorIsReturnedWhenOldNameIsNull
public void ErrorIsReturnedWhenOldNameIsNull()
{
var expression = new RenameTableExpression { OldName = null };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldContain(ErrorMessages.OldTableNameCannotBeNullOrEmpty);
}
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:6,代码来源:RenameTableExpressionTests.cs
示例19: CanRenameTable
public void CanRenameTable()
{
var expression = new RenameTableExpression();
expression.OldName = "Table1";
expression.NewName = "Table2";
string sql = generator.Generate(expression);
sql.ShouldBe("ALTER TABLE \"public\".\"Table1\" RENAME TO \"Table2\"");
}
开发者ID:timscott,项目名称:fluentmigrator,代码行数:9,代码来源:PostgresGeneratorTests.cs
示例20: ReverseReturnsRenameTableExpression
public void ReverseReturnsRenameTableExpression()
{
var expression = new RenameTableExpression { OldName = "Bacon", NewName = "ChunkyBacon" };
var reverse = expression.Reverse();
reverse.ShouldBeOfType<RenameTableExpression>();
}
开发者ID:ngbrown,项目名称:fluentmigrator,代码行数:6,代码来源:RenameTableExpressionTests.cs
注:本文中的FluentMigrator.Expressions.RenameTableExpression类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论