Merge pull request #2172 from tpuica/master

Fixed NEXTVAL Operator for MS SQLServer (starting with 2012)
This commit is contained in:
Timo Westkämper 2018-01-12 20:29:44 +02:00 committed by GitHub
commit a8452ec2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public class SQLServer2012Templates extends SQLServerTemplates {
protected SQLServer2012Templates(Set<String> keywords, char escape, boolean quote) {
super(keywords, escape, quote);
add(SQLOps.NEXTVAL, "next value for {0s}");
}
@Override

View File

@ -106,7 +106,7 @@ public class SQLServer2012TemplatesTest extends AbstractSQLTemplatesTest {
@Test
public void nextVal() {
Operation<String> nextval = ExpressionUtils.operation(String.class, SQLOps.NEXTVAL, ConstantImpl.create("myseq"));
assertEquals("myseq.nextval", new SQLSerializer(new Configuration(new SQLServerTemplates())).handle(nextval).toString());
assertSerialized(nextval, "next value for myseq");
}
}