Comments (6)
from luban.
理想是应该这种map的格式。当然这里还可以优化,value的引用
from luban.
这是已知问题,很多语言并没有内置的多key索引的支持,因此由开发者自己选择合适的实现。写一个make_index2函数就能较好达到效果。
from luban.
那是需要自己修改代码生成的源码咯?如果是这样那我自己定制一个生成器吧。
from luban.
我觉得没必要改源码。 你实现一个make_index函数将列表转换为你想要的索引方式即可 ,代码类似这样
function make_index(t, key1, key2)
local nt = {}
for _, v in ipairs(t) do
nt[v[key1]] = v
nt[v[key2]] = v
end
return nt
end
from luban.
了解,谢谢!
from luban.
Related Issues (20)
- 多人并行开发时,是否支持excel文件合并 HOT 1
- 关于模板里面的这个方法是用来做什么的啊,删除了会不会有影响public void ResolveRef(Tables tables) HOT 1
- 嵌套集合list<list>生成的typescript有编译问题,java没问题 HOT 1
- 值类型生成的代码错误 HOT 1
- 对于Unity中导出JsonC#类,如果需要code_target支持newtonsoft-json或者JsonUtility对应的数据模型,请问有扩展的可能吗? HOT 2
- JavaDeclaringTypeNameVisitor.Accept(TEnum type)实现错了 HOT 3
- 空列表读取错误 HOT 1
- 没有设置导出的组也会检查ref, 导致报错:ref 引用的表 xxx 没有导出 HOT 3
- 是否能考虑添加typescript_bin的支持 HOT 2
- type=int?! 校验器无效果 HOT 2
- 能否为生成类型添加克隆函数 HOT 1
- 输出的json文件,可以不要格式化吗? HOT 5
- 导出表数据时如何额外生成一个存储常量值的C#类 HOT 1
- 2.6.2 go generate failed error HOT 1
- 嵌套容器类型的 ref 校验失效 HOT 1
- go-json无法导出嵌套容器 HOT 1
- 生成的golang代码,多主键索引有问题 HOT 1
- [feature request] 通过某个列的值限定另一多态列的子类型 HOT 1
- 在类型为(map#sep=,),string,int情况下CollectionToString接口生成的字符串没有左大括号{ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luban.