{"repo":"satur-io/duckdb-php","free":true,"listed":false,"github":"https://github.com/satur-io/duckdb-php","clone":"git clone https://github.com/satur-io/duckdb-php.git","description":"DuckDB API for PHP 🐘 🦆","language":"C","stars":88,"topics":["database","duckdb","ffi","ffi-bindings","ffi-wrapper","performance","php","php-library","php8"],"license":"MIT","category":"databases-storage","readme_excerpt":"DuckDB API for PHP This package provides a DuckDB Client API for PHP. Focused on performance, it uses the official C API internally through FFI, achieving good benchmarks. This library is more than just a wrapper for the C API; it introduces custom, PHP-friendly methods to simplify working with DuckDB. It is compatible with Linux, Windows, and macOS, requiring PHP version 8.3 or higher. Full documentation is available in https://duckdb-php.readthedocs.io/. Automatic install (recommended for newcomers) [!NOTE] You will need to allow satur.io/duckdb-auto to execute code to use this installation method, check installation for more details. Quick Start It's that simple! :duck: The function we used here, DuckDB::sql() , performs the query in a new in-memory database which is destroyed after retrieving the result. This is not the most common use case, let's see how to get a persistent connection. Connection As you probably guessed, DuckDB::create() creates a new connection to the specified database, or create a new one if it doesn't exist yet and then establishes the connection. After that, we can use the function query to perform the requests. [!WARNING] Notice the difference between the static method sql and the non-static method query . While the first one always creates and destroys a new in-memory database, the second one uses a previously established connection and should be the preferred option in most cases. In addition, the library also provides prepared statements for bin","default_branch":null,"files":null,"tree":[],"storefront":"/r/satur-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/satur-io/duckdb-php/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}