Description
Description
Since we now have separate classes for different PDO types, could we get Pdo\Sqlite::setAuthorizer()
?
The SQLite3 extension supports it: https://www.php.net/manual/en/sqlite3.setauthorizer.php
The C interface is pretty straightforward: https://www.sqlite.org/c3ref/set_authorizer.html, you get the action as an int, some string parameters, and return one of these values:
The authorizer callback should return SQLITE_OK to allow the action, SQLITE_IGNORE to disallow the specific action but allow the SQL statement to continue to be compiled, or SQLITE_DENY to cause the entire SQL statement to be rejected with an error
The SQLite3 extension's setAuthorizer()
has a bool return type so I'm assuming it's SQLITE_OK
and SQLITE_DENY
, since SQLITE_IGNORE
probably has pretty niche use cases.