mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 18:05:36 +08:00
Build Unix SQLite with SQLITE_ENABLE_COLUMN_METADATA so the metadata APIs are available on macOS and Linux. Remove the pdo_sqlite configure override that forced PHP to treat sqlite3_column_table_name() as unavailable, and add sanity checks for both SQLite compile options and PDO column metadata.
11 lines
286 B
PHP
11 lines
286 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
$sqlite = new SQLite3(':memory:');
|
|
$enabled = $sqlite->querySingle("SELECT sqlite_compileoption_used('ENABLE_COLUMN_METADATA')");
|
|
|
|
if ((int) $enabled !== 1) {
|
|
throw new RuntimeException('SQLite was not built with SQLITE_ENABLE_COLUMN_METADATA.');
|
|
}
|