Skip to content

Commit e25cf4d

Browse files
committed
isTableProvided -> hasTable
1 parent 8ed8e23 commit e25cf4d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Mcp/Tools/DatabaseSchema/DatabaseSchemaDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ abstract class DatabaseSchemaDriver
88
{
99
public function __construct(protected $connection = null) {}
1010

11-
protected function isTableProvided(?string $table): bool
11+
protected function hasTable(?string $table): bool
1212
{
1313
return ! in_array($table, [null, '', '0'], true);
1414
}

src/Mcp/Tools/DatabaseSchema/MySQLSchemaDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getFunctions(): array
4343
public function getTriggers(?string $table = null): array
4444
{
4545
try {
46-
if ($this->isTableProvided($table)) {
46+
if ($this->hasTable($table)) {
4747
return DB::connection($this->connection)->select('SHOW TRIGGERS WHERE `Table` = ?', [$table]);
4848
}
4949

src/Mcp/Tools/DatabaseSchema/PostgreSQLSchemaDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getTriggers(?string $table = null): array
6060
FROM information_schema.triggers
6161
WHERE trigger_schema = current_schema()
6262
';
63-
if ($this->isTableProvided($table)) {
63+
if ($this->hasTable($table)) {
6464
$sql .= ' AND event_object_table = ?';
6565

6666
return DB::connection($this->connection)->select($sql, [$table]);

src/Mcp/Tools/DatabaseSchema/SQLiteSchemaDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getTriggers(?string $table = null): array
3636
{
3737
try {
3838
$sql = "SELECT name, sql FROM sqlite_master WHERE type = 'trigger'";
39-
if ($this->isTableProvided($table)) {
39+
if ($this->hasTable($table)) {
4040
$sql .= ' AND tbl_name = ?';
4141

4242
return DB::connection($this->connection)->select($sql, [$table]);

0 commit comments

Comments
 (0)