public void ErrorIsReturnedWhenSequenceNameIsEmptyString() { var expression = new DeleteSequenceExpression { SequenceName = String.Empty }; var errors = ValidationHelper.CollectErrors(expression); errors.ShouldContain(ErrorMessages.SequenceNameCannotBeNullOrEmpty); }
public void ErrorIsNotReturnedWhenSequenceNameIsSet() { var expression = new DeleteSequenceExpression { SequenceName = "sequence1" }; var errors = ValidationHelper.CollectErrors(expression); Assert.That(errors.Count, Is.EqualTo(0)); }
public void CanDeleteSequenceWithoutSchemaName() { var expression = new DeleteSequenceExpression { SequenceName = "Sequence" }; var sql = generator.Generate(expression); sql.ShouldBe("DROP SEQUENCE Sequence"); sql = quotedIdentiferGenerator.Generate(expression); sql.ShouldBe("DROP SEQUENCE \"Sequence\""); }
public override string Generate(DeleteSequenceExpression expression) { truncator.Truncate(expression); return String.Format("DROP SEQUENCE {0}", Quoter.QuoteSequenceName(expression.SequenceName)); }
public override string Generate(DeleteSequenceExpression expression) { var result = new StringBuilder(string.Format("DROP SEQUENCE ")); result.AppendFormat("{0}.{1}", Quoter.QuoteSchemaName(expression.SchemaName), Quoter.QuoteSequenceName(expression.SequenceName)); return result.ToString(); }
public override string Generate(DeleteSequenceExpression expression) { return compatabilityMode.HandleCompatabilty("Sequences are not supported in SqlServer2000"); }
public void Truncate(DeleteSequenceExpression expression) { expression.SequenceName = Truncate(expression.SequenceName); }
public abstract string Generate(DeleteSequenceExpression expression);
public override string Generate(DeleteSequenceExpression expression) { return compatabilityMode.HandleCompatabilty("Sequences is not supporteed for MySql"); }
public void CanDeleteSequence() { var expression = new DeleteSequenceExpression { SchemaName = "TestSchema", SequenceName = "Sequence" }; var sql = generator.Generate(expression); sql.ShouldBe("DROP SEQUENCE [TestSchema].[Sequence]"); }
public virtual void Process(DeleteSequenceExpression expression) { Process(Generator.Generate(expression)); }
public IInSchemaSyntax Sequence(string sequenceName) { var expression = new DeleteSequenceExpression { SequenceName = sequenceName}; _context.Expressions.Add(expression); return new DeleteSequenceExpressionBuilder(expression); }
public override string Generate(DeleteSequenceExpression expression) { throw new NotImplementedException(); }
public override string Generate(DeleteSequenceExpression expression) { return string.Format("{0};", base.Generate(expression)); }