This commit is contained in:
Looly
2022-05-26 12:12:05 +08:00
parent 268f258537
commit 969a017f02
4 changed files with 15 additions and 10 deletions

View File

@@ -70,6 +70,12 @@ public class DbTest {
Assert.assertEquals(4, count);
}
@Test
public void countByQueryTest() throws SQLException {
final long count = Db.use().count(Entity.create("user"));
Assert.assertEquals(4, count);
}
@Test
public void countTest2() throws SQLException {
final long count = Db.use().count("select * from user order by name DESC");