Browse Source

bugfixes

drop_old_mail
Stephan Richter 3 years ago
parent
commit
1f5343428b
  1. 2
      pom.xml
  2. 2
      src/main/java/de/srsoftware/widerhall/data/Database.java
  3. 6
      src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java

2
pom.xml

@ -6,7 +6,7 @@
<groupId>org.example</groupId> <groupId>org.example</groupId>
<artifactId>Widerhall</artifactId> <artifactId>Widerhall</artifactId>
<version>0.2.2</version> <version>0.2.3</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

2
src/main/java/de/srsoftware/widerhall/data/Database.java

@ -133,7 +133,7 @@ public class Database {
@Override @Override
protected Request clone() { protected Request clone() {
Request clone = new Request(sql); Request clone = new Request(new StringBuilder(sql));
clone.where.putAll(where); clone.where.putAll(where);
clone.values.putAll(values); clone.values.putAll(values);
return clone; return clone;

6
src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java

@ -50,8 +50,8 @@ public class DatabaseTest extends TestCase {
} }
public void testUpdate(){ public void testUpdate(){
assertEquals("UPDATE Test",Database.open().update("Test").sql()); assertEquals("UPDATE Test",Database.open().update("Test").compile().toString());
assertEquals("UPDATE Test SET x = 5",Database.open().update("Test").set("x",5).sql()); assertEquals("UPDATE Test SET x = 5",Database.open().update("Test").set("x",5).compile().toString());
assertEquals("UPDATE Test SET x = 5, y = 6",Database.open().update("Test").set("x",5).set("y",6).sql()); assertEquals("UPDATE Test SET x = 5, y = 6",Database.open().update("Test").set("x",5).set("y",6).compile().toString());
} }
} }
Loading…
Cancel
Save