跳到主要内容

transaction

执行一个事务

声明

mixed transaction(function fn, ...)

参数

参数名描述
fn回调函数(具体执行的数据库操作)

返回值

[ 操作结果, fn的返回值 ]

操作结果:nil值为失败,true值为成功

使用方式

返回文档