mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-05 00:25:32 +08:00
[0.3.5] 修复 ConditionalBuilder 对于参数未添加 AND 链接的问题
This commit is contained in:
@@ -2,6 +2,7 @@ package cc.carm.lib.easysql.testrunner;
|
||||
|
||||
import cc.carm.lib.easysql.EasySQL;
|
||||
import cc.carm.lib.easysql.api.SQLManager;
|
||||
import cc.carm.lib.easysql.testrunner.tests.DeleteTest;
|
||||
import cc.carm.lib.easysql.testrunner.tests.QueryCloseTest;
|
||||
import cc.carm.lib.easysql.testrunner.tests.QueryFunctionTest;
|
||||
import cc.carm.lib.easysql.testrunner.tests.TableCreateTest;
|
||||
@@ -49,6 +50,7 @@ public class Main {
|
||||
// tests.add(new SQLUpdateBatchTests());
|
||||
// tests.add(new SQLUpdateReturnKeysTest());
|
||||
tests.add(new QueryFunctionTest());
|
||||
tests.add(new DeleteTest());
|
||||
|
||||
print("准备进行测试...");
|
||||
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package cc.carm.lib.easysql.testrunner.tests;
|
||||
|
||||
import cc.carm.lib.easysql.api.SQLManager;
|
||||
import cc.carm.lib.easysql.testrunner.EasySQLTest;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class DeleteTest extends EasySQLTest {
|
||||
|
||||
|
||||
@Override
|
||||
public void onTest(SQLManager sqlManager) throws SQLException {
|
||||
|
||||
Integer changes = sqlManager.createDelete("test_user_table")
|
||||
.addCondition("id", ">", 5)
|
||||
.addNotNullCondition("username")
|
||||
.build().execute();
|
||||
|
||||
System.out.println("change(s): " + changes);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user