feat: initialize backend database service architecture and implement frontend schema explorer components
This commit is contained in:
@@ -69,6 +69,12 @@ class MySqlDriver implements DatabaseDriverInterface, SchemaDiscoveryInterface
|
||||
return $this->query("SELECT * FROM `{$table}` LIMIT ? OFFSET ?", [$limit, $offset]);
|
||||
}
|
||||
|
||||
public function getTableCount(string $table): int
|
||||
{
|
||||
$result = $this->query("SELECT COUNT(*) as count FROM `{$table}`");
|
||||
return (int) ($result[0]->count ?? 0);
|
||||
}
|
||||
|
||||
public function getForeignKeys(string $table): array
|
||||
{
|
||||
$sql = "
|
||||
|
||||
Reference in New Issue
Block a user