mirror of
https://github.com/CarmJos/EasySQL.git
synced 2024-09-19 21:35:47 +00:00
[0.3.11] (破坏性更新) 令SQLUpdateAction返回的值为 Long 以适配自增主键大小范围。
This commit is contained in:
parent
a2d972621d
commit
03e157d3d9
@ -1,7 +1,7 @@
|
||||
package cc.carm.lib.easysql.tests;
|
||||
|
||||
import cc.carm.lib.easysql.api.SQLManager;
|
||||
import cc.carm.lib.easysql.TestHandler;
|
||||
import cc.carm.lib.easysql.api.SQLManager;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
@ -11,12 +11,11 @@ public class DeleteTest extends TestHandler {
|
||||
@Override
|
||||
public void onTest(SQLManager sqlManager) throws SQLException {
|
||||
|
||||
Integer changes = sqlManager.createDelete("test_user_table")
|
||||
|
||||
System.out.println("change(s): " + sqlManager.createDelete("test_user_table")
|
||||
.addCondition("id", ">", 5)
|
||||
.addNotNullCondition("username")
|
||||
.build().execute();
|
||||
|
||||
System.out.println("change(s): " + changes);
|
||||
.build().execute());
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public class SQLUpdateBatchTests extends TestHandler {
|
||||
@Override
|
||||
public void onTest(SQLManager sqlManager) throws SQLException {
|
||||
|
||||
List<Integer> updates = sqlManager.createInsertBatch("test_user_table")
|
||||
List<Long> updates = sqlManager.createInsertBatch("test_user_table")
|
||||
.setColumnNames("uuid", "username", "age")
|
||||
.setAllParams(generateParams())
|
||||
.execute();
|
||||
|
@ -11,7 +11,7 @@ public class SQLUpdateReturnKeysTest extends SQLUpdateBatchTests {
|
||||
|
||||
@Override
|
||||
public void onTest(SQLManager sqlManager) throws SQLException {
|
||||
List<Integer> generatedKeys = sqlManager.createInsertBatch("test_user_table")
|
||||
List<Long> generatedKeys = sqlManager.createInsertBatch("test_user_table")
|
||||
.setColumnNames("uuid", "username", "age")
|
||||
.setAllParams(generateParams())
|
||||
.returnGeneratedKeys()
|
||||
|
Loading…
Reference in New Issue
Block a user