예제 #1
0
 @Test
 public void testTestUpdateOnTableWithAliasAndFQColumnNameInWhereClause() throws Exception {
   UpdateAnalyzedStatement statement =
       analyze("update users  t set name = 'foo' where t.name != 'foo'");
   Function eqFunction =
       (Function)
           ((Function) statement.nestedStatements().get(0).whereClause().query())
               .arguments()
               .get(0);
   assertThat(eqFunction.arguments().get(0), isReference("name"));
 }
예제 #2
0
 @Test
 public void testUsingFQColumnNameShouldBePossibleInWhereClause() throws Exception {
   UpdateAnalyzedStatement statement =
       analyze("update users set name = 'foo' where users.name != 'foo'");
   Function eqFunction =
       (Function)
           ((Function) statement.nestedStatements().get(0).whereClause().query())
               .arguments()
               .get(0);
   assertThat(eqFunction.arguments().get(0), isReference("name"));
 }