Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[兼容问题咨询]想请教下APIJSON从5.3.0版本升级到6.2.0版本遇到远程函数调用优先级不一致的问题 #629

Open
KumaNeko33 opened this issue Nov 1, 2023 · 1 comment

Comments

@KumaNeko33
Copy link

KumaNeko33 commented Nov 1, 2023

Description

请求示例:
{
"[]":{
"TEST_TABLE":{
"@column":"id,name",
"@Datasource":"xxxDataSource"
},
"count":"1",
"page":"0",
"query":"2"
},
"list()":"moveObj([],$..TEST_TABLE)",
"method":"GET",
"pageInfo@":"/[]/info"
}
之前用的5.3.0版本,list()的远程调用函数moveObj,会在解析处理[]后执行,现在升级到6.2.0版本,变成了先执行list()的远程调用函数moveObj,再解析处理[]。导致传递给远程调用函数moveObj的参数TEST_TABLE的值不是执行SQL后的数据,而是执行前的JSON对象。
目前我这边给list+()降低优先级解决了问题,就是已经上线的这种用法的远程调用函数都需要处理。

比对了5.3.0版本和6.2.0版本的源码,发现是针对远程调用函数的优先级定义做了变更,5.3.0版本我用的非Table内的list():moveObj,通过functionMap去批量执行,6.2.0版本变成了满足isPlus == false && isTable == false条件 通过parseFunction立即执行了,想请问下这里这么改的原因?是要修复什么问题吗?

@TommyLemon
Copy link
Collaborator

为了修复这个 bug 导致 #426

可以把 API 按 APIJSON 的版本来区分,新的 HTTP API 用
/apijson/6/get
这样的版本标识,旧的保持不变,对应两套服务,一个是现有使用 APIJSON 5.3 的,另一个是使用 APIJSON 6.0+ 的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants