-
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
APIJSON能不能保证事务啊 #270
Comments
增删改默认启用事务,但不支持同时 既增又删 这种两个以上操作,可以用远程函数做另一种操作 |
调用远程函数的话意思是在增加数据的请求体里面调用远程函数 后端写修改sql语句是吗 |
对 |
谢谢 |
这种说法 使用apijson新增,然后在远程函数里进行修改,那这两个操作是在一个事务里吗? |
在,只要有一个失败,就整体失败,回滚事务。只有都成功整体才成功,提交事务。 |
|
@AwenJackson |
@han-1023 @28-HuaSheng @AwenJackson APIJSON 6.0 + 后已支持一个请求同时 增删改查 |
前提:数据库表格之间没有任何关系
例子:添加一条数据到流水表 根据流水的账户id会锁定账户表主键id从而改变余额信息
像这样的操作一个要添加数据到表格,一个要修改数据,APIJSON的话一次请求不能完成的,这种的话怎么保证事物呢?
The text was updated successfully, but these errors were encountered: