-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[*] 如何保证新增和删除多个表的数据时的顺序 #758
Comments
按 JSON 传参上下顺序。 另外 APIJSON 后端 Golang 版也有几个,可以点亮 🌟 Star 支持下热心的作者哦~ |
有序map是不得已的选择,我更想知道的是有没有不依靠上下顺序,而是依靠规范来决定先后执行顺序的方案 |
可以新增关键词 "@sort": "key1,key5,key3..." 来指定每层的顺序,但这样前端等调用房用起来就麻烦不少,不推荐。 |
go map 随机乱序,凡是要保证顺序的 key 都必须写在 @sort 里,不需要保证顺序的可省略确实更好 |
你的目的是实现 APIJSON 的 Go 版后端 ORM 库 还是做 客户端 调用 APIJSON 请求? |
都有 |
Description
如何保证新增和删除多个表时的顺序
比如在一个删除请求中删除主表和其子表数据,如何保证子表的数据会先被删除,java中可以维持map的顺序,但是golang中无法保证map的访问顺序
The text was updated successfully, but these errors were encountered: