mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
Merge pull request #2172 from tpuica/master
Fixed NEXTVAL Operator for MS SQLServer (starting with 2012)
This commit is contained in:
commit
a8452ec2cb
@ -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
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user