@Test
 public void NextVal() {
   Operation<String> nextval =
       OperationImpl.create(String.class, SQLOps.NEXTVAL, ConstantImpl.create("myseq"));
   assertEquals(
       "myseq.nextval",
       new SQLSerializer(new Configuration(new SQLServerTemplates())).handle(nextval).toString());
 }
예제 #2
0
 /**
  * Create an <code>this instanceOf type</code> expression
  *
  * @param <B>
  * @param type
  * @return
  */
 public <B extends T> BooleanExpression instanceOf(Class<B> type) {
   return BooleanOperation.create(Ops.INSTANCE_OF, pathMixin, ConstantImpl.create(type));
 }
예제 #3
0
 public final Coalesce<T> add(T constant) {
   return add(ConstantImpl.create(constant));
 }
예제 #4
0
 @Test
 public void StringOperation() {
   assertEquals(
       "substring(str,2)",
       Expressions.stringOperation(Ops.SUBSTR_1ARG, str, ConstantImpl.create(2)).toString());
 }