This commit is contained in:
as2252258@163.com
2021-09-24 02:34:13 +08:00
parent 7f50d1b5c8
commit 27e87a461e
+7 -6
View File
@@ -138,11 +138,12 @@ class Connection extends Component
} }
} }
/** /**
* @return mixed * @return mixed
* @throws ReflectionException * @throws ReflectionException
* @throws NotFindClassException * @throws NotFindClassException
*/ * @throws \Exception
*/
public function getSchema(): Schema public function getSchema(): Schema
{ {
if ($this->_schema === null) { if ($this->_schema === null) {
@@ -158,7 +159,7 @@ class Connection extends Component
* @param $sql * @param $sql
* @return bool * @return bool
*/ */
#[Pure] public function isWrite($sql): bool public function isWrite($sql): bool
{ {
if (empty($sql)) return false; if (empty($sql)) return false;
if (str_starts_with(strtolower($sql), 'select')) { if (str_starts_with(strtolower($sql), 'select')) {