[php-src] Issue #21322: PDO\SQLite: Add support for getting raw SQL query (same as SQLite3::getSQL)
| From: | bohwaz | Date: | Sun, 01 Mar 2026 17:45:44 +0000 |
| Subject: | [php-src] Issue #21322: PDO\SQLite: Add support for getting raw SQL query (same as SQLite3::getSQL) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251740@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21322
Author: bohwaz
### Description
SQLite3 class supports fetching the raw SQL query as a string from the statement:
SQLite3Stmt::getSQL(bool $expand = false)
Adding an attribute to fetch the same for PDO\SQLite would be nice, eg.:
```
PDOStatement::getAttribute(PDO\SQLite::ATTR_SQL_STATEMENT)
PDOStatement::getAttribute(PDO\SQLite::ATTR_SQL_EXPANDED_STATEMENT)
```