本文整理汇总了C#中FluentMigrator.Expressions.AlterSchemaExpression类的典型用法代码示例。如果您正苦于以下问题:C# AlterSchemaExpression类的具体用法?C# AlterSchemaExpression怎么用?C# AlterSchemaExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AlterSchemaExpression类属于FluentMigrator.Expressions命名空间,在下文中一共展示了AlterSchemaExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanAlterSchema
public void CanAlterSchema()
{
var expression = new AlterSchemaExpression
{
DestinationSchemaName = "DEST",
SourceSchemaName = "SOURCE",
TableName = "TABLE"
};
generator.Generate(expression);
}
示例2: CanAlterSchema
public void CanAlterSchema()
{
var expression = new AlterSchemaExpression
{
DestinationSchemaName = "DEST",
SourceSchemaName = "SOURCE",
TableName = "TABLE"
};
var sql = generator.Generate( expression );
sql.ShouldBe(
"ALTER SCHEMA [DEST] TRANSFER [SOURCE].[TABLE]" );
}
示例3: Generate
public override string Generate(AlterSchemaExpression expression)
{
return string.Format("ALTER TABLE {0}.{1} SET SCHEMA {2}", Quoter.QuoteSchemaName(expression.SourceSchemaName), Quoter.QuoteTableName(expression.TableName), Quoter.QuoteSchemaName(expression.DestinationSchemaName));
}
示例4: Generate
public override string Generate(AlterSchemaExpression expression)
{
throw new DatabaseOperationNotSupportedExecption();
}
示例5: Process
public void Process(AlterSchemaExpression expression)
{
Process(Generator.Generate(expression));
}
示例6: Generate
public override string Generate( AlterSchemaExpression expression )
{
throw new NotImplementedException();
}
示例7: Truncate
public void Truncate(AlterSchemaExpression expression) { }
示例8: CanAlterSchema
public void CanAlterSchema()
{
var expression = new AlterSchemaExpression
{
DestinationSchemaName = "DEST",
SourceSchemaName = "SOURCE",
TableName = "TABLE"
};
var sql = generator.Generate(expression);
sql.ShouldBe("ALTER TABLE \"SOURCE\".\"TABLE\" SET SCHEMA \"DEST\"");
}
示例9: Generate
public override string Generate(AlterSchemaExpression expression)
{
return String.Format(AlterSchema, Quoter.QuoteSchemaName(expression.DestinationSchemaName), Quoter.QuoteSchemaName(expression.SourceSchemaName), Quoter.QuoteTableName(expression.TableName));
}
示例10: ToStringIsDescriptive
public void ToStringIsDescriptive()
{
var expression = new AlterSchemaExpression { TableName = "Test", DestinationSchemaName = "Bacon" };
expression.ToString().ShouldBe("AlterSchema Bacon Table Test");
}
示例11: ErrorIsNotReturnedWhenDestinationSchemaNameIsNotNullEmptyString
public void ErrorIsNotReturnedWhenDestinationSchemaNameIsNotNullEmptyString()
{
var expression = new AlterSchemaExpression { DestinationSchemaName = "Bacon" };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldNotContain(ErrorMessages.DestinationSchemaCannotBeNull);
}
示例12: ErrorIsReturnedWhenDestinationSchemaNameIsNull
public void ErrorIsReturnedWhenDestinationSchemaNameIsNull()
{
var expression = new AlterSchemaExpression { DestinationSchemaName = null };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldContain(ErrorMessages.DestinationSchemaCannotBeNull);
}
示例13: ErrorIsReturnedWhenTableNameIsEmptyString
public void ErrorIsReturnedWhenTableNameIsEmptyString()
{
var expression = new AlterSchemaExpression { TableName = String.Empty };
var errors = ValidationHelper.CollectErrors(expression);
errors.ShouldContain(ErrorMessages.TableNameCannotBeNullOrEmpty);
}
示例14: Generate
public override string Generate( AlterSchemaExpression expression )
{
return String.Format("ALTER SCHEMA [{0}] TRANSFER {1}[{2}]", expression.DestinationSchemaName, FormatSchema(expression.SourceSchemaName), expression.TableName );
}
示例15: Generate
public override string Generate(AlterSchemaExpression expression)
{
return compatabilityMode.HandleCompatabilty("Schemas are not supported");
}