Skip to content

Commit

Permalink
replace query in describeTable method to Query::info()->listColumns
Browse files Browse the repository at this point in the history
  • Loading branch information
BMTmohammedtaha committed Sep 26, 2023
1 parent 5cd86a8 commit 55204c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TargetTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Effectra\Database;

use Effectra\SqlQuery\Query;

/**
* Trait for working with database table information.
*/
Expand All @@ -16,7 +18,7 @@ trait TargetTable
*/
public function describeTable(): array
{
$query = "DESCRIBE {$this->getTable()}";
$query = Query::info()->listColumns($this->getTable());
return $this->query((string) $query)->fetch();
}

Expand Down

0 comments on commit 55204c4

Please sign in to comment.