This commit is contained in:
as2252258@163.com
2021-09-24 02:34:13 +08:00
parent 7f50d1b5c8
commit 27e87a461e
+2 -1
View File
@@ -142,6 +142,7 @@ 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
{ {
@@ -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')) {