Releases: iliaal/pdo_duckdb
Releases · iliaal/pdo_duckdb
0.2.1
Fixed
- Linux prebuilt binaries are now genuinely self-contained. The 0.2.0 Linux
.sofailed to load on a clean host (undefined symbol: _ZTVN10__cxxabiv120__function_type_infoE) because the bundled DuckDB C++ runtime was never statically linked — the gcc C-driver link ignored the g++-only-static-libstdc++flag. The build now links the staticlibstdc++/libgcc_ehexplicitly. macOS and Windows binaries were unaffected. 0.2.0's broken Linux assets were removed, so installs pinned to 0.2.0 fall back to a source build on Linux.
0.2.0
Added
- Prebuilt binaries are now published with each release, so
pie install iliaal/pdo_duckdbinstalls a ready-to-use extension with no local DuckDB library or build toolchain. Coverage: Linux glibc x86_64 and arm64, macOS Apple Silicon (arm64), and Windows x64 (thread-safe and non-thread-safe). PIE falls back to a source build when no prebuilt matches. --with-pdo-duckdb-static=DIRconfigure mode, which statically links DuckDB's static-libs bundle into a self-contained extension (how the Linux and macOS prebuilts are built; the Windows package bundlesduckdb.dll).
0.1.0
Initial release. A PDO driver for DuckDB.
Added
- Connect to a file-backed or in-memory DuckDB database through the standard PDO API:
new PDO('duckdb:…')and, on PHP 8.4+,PDO::connect('duckdb:…'). - Prepared statements with positional
?and named:nameplaceholders (rewritten to DuckDB$N; a repeated:namebinds once). - Result decoding via DuckDB's data-chunk/vector API: native scalars map to PHP
int/float/string/bool;UBIGINT/HUGEINT/DECIMAL/temporal/UUID/ENUM/BITand nestedLIST/ARRAY/STRUCT/MAPrender to their canonical string form.execute()materializes the result; rows are then fetched chunk by chunk. Pdo\Duckdb\Appender(viaPDO::duckdbAppender()) for fast bulk inserts over DuckDB's native appender. It validates the whole row before appending and is marked unusable after a failed append/flush/close, per DuckDB's contract. On PHP 8.4+ the method lives on a driver-specificPdo\Duckdbsubclass.- Transactions (
beginTransaction/commit/rollBack),PDO::quote(), and DuckDB extension loading through ordinary SQL (LOAD/INSTALL). - PHP 8.1 through 8.5 support.
Security
- When
open_basediris set, the connection disables DuckDB's external SQL file access (read_csv/COPY/ATTACH/httpfs) viaenable_external_access=false, fails closed if it cannot be applied, and re-enforces the sandbox on the live connection at every SQL entry point — covering persistent-connection reuse andopen_basedirtightened mid-request after a connection opened. - Embedded NUL bytes in SQL (
query/prepare/exec) and induckdbAppender()table/schema names are rejected, rather than silently truncating the statement or identifier at the NUL.