use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.
the class AstUpdateBuildTest method testWhere.
@Test
public void testWhere() {
AstUpdate update = Ast.update("users").set(Collections.singletonMap("name", "Test")).where(Collections.singletonMap("name", "test"));
assertEquals("UPDATE users SET name ='Test' WHERE name =?", update.format());
}
use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.
the class AstUpdateBuildTest method test.
@Test
public void test() {
AstUpdate update = Ast.update("users").set(Collections.singletonMap("name", "Test"));
assertEquals("UPDATE users SET name ='Test'", update.format());
}
use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.
the class AstUpdateBuildTest method testAstFieldReference.
@Test
public void testAstFieldReference() {
AstUpdate update = Ast.update("users").set(Collections.singletonMap(new AstFieldReference("___name", true), "Test"));
assertEquals("UPDATE users SET \"___name\"='Test'", update.format());
}
use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.
the class AstUpdateBuildTest method testEscapedColumns.
@Test
public void testEscapedColumns() {
AstUpdate update = Ast.update("users").set(Collections.singletonMap("___name", "Test"));
assertEquals("UPDATE users SET \"___name\"='Test'", update.format());
}
use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.
the class AstUpdateBuildTest method testWhereIN.
@Test
public void testWhereIN() {
AstUpdate update = Ast.update("users").set(Collections.singletonMap("name", "Test")).whereInPredicate("ID", 3);
assertEquals("UPDATE users SET name ='Test' WHERE ID IN (?, ?, ?)", update.format());
}
Aggregations