-
-
Notifications
You must be signed in to change notification settings - Fork 565
FAQ
walon edited this page Dec 1, 2021
·
29 revisions
table的index字段指定主键列表。 详细请参见 wiki-配置相关定义 中关于table的mode和index的相关文档。
map及list表支持主键概念,未指定mode和index的情况下,自动为mode=map模式,并记录bean的第一个字段作为主键。
假设 TbTest表的记录为Test类型,你想用Test的my_index字段作为key,则:
- 如果在xml里定义表,则在table的index属性中指定主键字段名,如下:
<table name="TbTest" value="Test" index="my_index"/>
- 如果在 table.xlsx里定义表,则在index列指定主键名,如下
## | full_name | value_type | define_from_excel | input | index | ... |
---|---|---|---|---|---|---|
TbTest | Test | true | equip.xlsx | my_index |
支持。 table mode=list时,支持联合多主键模式和独立多主键模式。详细文档参见 wiki-配置相关定义 中关于table的mode的相关文档。
支持。wiki-配置相关定义 中关于 分级定义及分组导出相关文档。
- excel族。 csv、xls、xlm、xlsx、xlsm 等等。 csv支持各种编码,luban会智能猜测它的编码,无论你用gbk还是utf-8或者其他编码,都能正确处理。
- json
- xml
- lua
- yaml
可以。 参见 wiki-配置相关定义 中关于 table.input的文档。
可以。 参见 wiki-配置相关定义 中关于 table.input的文档。