Esempio n. 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"));
 }
Esempio n. 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"));
 }