1
mirror of https://github.com/CarmJos/EasySQL.git synced 2026-06-04 15:28:20 +08:00

修复修正+混淆改善

This commit is contained in:
Ghost_chu
2022-02-10 18:57:21 +08:00
parent 0f4bf90f56
commit 1ab23aa14f
+6 -6
View File
@@ -144,7 +144,7 @@ Steve 的公司老板开发了一个 IM 软件,但是 Steve 公司运维是土
.addColumn("message","TEXT NULL","网友发言") .addColumn("message","TEXT NULL","网友发言")
.addAutoIncrementColumn("id") //设置 id 列自增 .addAutoIncrementColumn("id") //设置 id 列自增
.setIndex(IndexType.PRIMARY_KEY,null,"id","sender") //配置主键 .setIndex(IndexType.PRIMARY_KEY,null,"id","sender") //配置主键
.setIndex(IndexType.PRIMARY_KEY,"sender_message_index","sender","message") //配置索引 .setIndex(IndexType.INDEX,"sender_message_index","sender","message") //配置索引
.build() .build()
.executeAsync(); .executeAsync();
``` ```
@@ -174,9 +174,9 @@ Steve 到达南极之后,南极的员工把2FA密钥塞给Steve便骑着海豚
```java ```java
sqlManager.createInsertBatch("polarbear") sqlManager.createInsertBatch("polarbear")
.setColumnNames("name","temp","hunger") .setColumnNames("name","temp","hunger")
.addParamsBatch("Karl", "-17C", "100") .addParamsBatch("Karl", -17, 100)
.addParamsBatch("Lucy","-3C","80") .addParamsBatch("Lucy",-3,80)
.addParamsBatch("Lily","-10C","70") .addParamsBatch("Lily",-10,70)
.executeAsync((list) -> {/*RowIDs*/} ); .executeAsync((list) -> {/*RowIDs*/} );
``` ```
@@ -210,8 +210,8 @@ Steve 翻看着跑路员工留下的为数不多的资料,发现公司在南
.inTable("the_end") .inTable("the_end")
.addCondition("thanks_read","this_stupid_guide") .addCondition("thanks_read","this_stupid_guide")
.build() .build()
.execute(); .execute()) {
ResultSet set = query.getResultSet();) { ResultSet set = query.getResultSet(); // SQLQuery 关闭时,ResultSet 会一同关闭
set.next(); set.next();
set.getString("see_you_next_time"); set.getString("see_you_next_time");
}catch (Exception exception){ }catch (Exception exception){