# DbExplainSupport

> Resolves which database drivers can be explained and the statement prefix each one expects.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [Db](/docs/extensions/debug-core/reference/panel/db/index.md) › DbExplainSupport

| final class | `PHPForge\Debug\Panel\Db\DbExplainSupport` |
| --- | --- |
| Source | [`src/Panel/Db/DbExplainSupport.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/Db/DbExplainSupport.php#L12) |

Resolves which database drivers can be explained and the statement prefix each one expects.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`isSupported()`](#method-isSupported) static | Returns whether the driver produces an EXPLAIN plan the panel can render. | `DbExplainSupport` |
| [`prefix()`](#method-prefix) static | Returns the statement prefix that asks the driver for its plan. | `DbExplainSupport` |

## Method details

### isSupported() <span id="method-isSupported"></span>

```php
public static function isSupported(string $driverName): bool
```

Returns whether the driver produces an EXPLAIN plan the panel can render.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$driverName` | `string` | Driver name reported by the connection. |

**Returns**

`bool`: `true` when the driver is supported; `false` otherwise.

### prefix() <span id="method-prefix"></span>

```php
public static function prefix(string $driverName): string
```

Returns the statement prefix that asks the driver for its plan.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$driverName` | `string` | Driver name reported by the connection. |

**Returns**

`string`: Prefix to prepend to the explained statement, separator included.