update docs

This commit is contained in:
开源海哥 2023-03-08 12:27:10 +08:00
parent e4b82f7e50
commit bc0c1b9bec

View File

@ -55,7 +55,7 @@ Map result = row.toCamelKeysMap();
```java ```java
Row row = Db.selectOneById("tb_account","id",1); Row row = Db.selectOneById("tb_account","id",1);
Map result = row.toCamelKeysMap(); Map result = row.toUnderlineKeysMap();
``` ```
## Row 插入时,设置主键生成方式 ## Row 插入时,设置主键生成方式
@ -66,6 +66,7 @@ Map result = row.toCamelKeysMap();
// ID 自增 // ID 自增
Row row = Row.ofKey(RowKey.ID_AUTO); Row row = Row.ofKey(RowKey.ID_AUTO);
row.set(ACCOUNT.USER_NAME,"Michael"); row.set(ACCOUNT.USER_NAME,"Michael");
Db.insertRow("tb_account",row); Db.insertRow("tb_account",row);
``` ```
@ -75,6 +76,7 @@ Db.insertRow("tb_account",row);
// ID 为 uuid // ID 为 uuid
Row row = Row.ofKey(RowKey.ID_UUID); Row row = Row.ofKey(RowKey.ID_UUID);
row.set(ACCOUNT.USER_NAME,"Michael"); row.set(ACCOUNT.USER_NAME,"Michael");
Db.insertRow("tb_account",row); Db.insertRow("tb_account",row);
``` ```
**自定义 Row 主键生成方式** **自定义 Row 主键生成方式**
@ -86,6 +88,7 @@ RowKey myRowKey = RowKey.of("id", KeyType.Generator, "uuid", true);
// 使用自定义的 RowKey // 使用自定义的 RowKey
Row row = Row.ofKey(myRowKey); Row row = Row.ofKey(myRowKey);
row.set(ACCOUNT.USER_NAME,"Michael"); row.set(ACCOUNT.USER_NAME,"Michael");
Db.insertRow("tb_account",row); Db.insertRow("tb_account",row);
``` ```