mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进Connection类的事务方法
This commit is contained in:
@@ -545,9 +545,9 @@ abstract class Connection
|
|||||||
}
|
}
|
||||||
$this->commit($label);
|
$this->commit($label);
|
||||||
return $result;
|
return $result;
|
||||||
} catch (\PDOException $e) {
|
} catch (\Exception $e) {
|
||||||
$this->rollback();
|
$this->rollback();
|
||||||
return false;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +570,7 @@ abstract class Connection
|
|||||||
$this->linkID->beginTransaction();
|
$this->linkID->beginTransaction();
|
||||||
}
|
}
|
||||||
$this->transTimes++;
|
$this->transTimes++;
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user