Search in sources :

Example 6 with AstUpdate

use of com.developmentontheedge.sql.model.AstUpdate in project be5 by DevelopmentOnTheEdge.

the class AstUpdateBuildTest method testMany.

@Test
public void testMany() {
    HashMap<Object, Object> map = new HashMap<>();
    map.put("count", 4);
    map.put("name", "?");
    AstUpdate update = Ast.update("users").set(map);
    assertEquals("UPDATE users SET count = 4, name =?", update.format());
}
Also used : AstUpdate(com.developmentontheedge.sql.model.AstUpdate) HashMap(java.util.HashMap) Test(org.junit.Test)

Aggregations

AstUpdate (com.developmentontheedge.sql.model.AstUpdate)6 Test (org.junit.Test)6 AstFieldReference (com.developmentontheedge.sql.model.AstFieldReference)1 HashMap (java.util.HashMap)1