PHPackages                             dancal/duckdb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dancal/duckdb

ActiveLibrary[Database &amp; ORM](/categories/database)

dancal/duckdb
=============

A PHP library for communication with DuckDB

0.7.0-alpha.3(1y ago)337MITCPHP ^8.1

Since Jun 7Pushed 1y agoCompare

[ Source](https://github.com/dancal/duckdb-php)[ Packagist](https://packagist.org/packages/dancal/duckdb)[ Docs](https://github.com/dancal/duckdb-php)[ GitHub Sponsors](https://github.com/kambo)[ RSS](/packages/dancal-duckdb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

DuckDB PHP library
==================

[](#duckdb-php-library)

changes
-------

[](#changes)

- Merge Pull Request : [kambo-1st#6](https://github.com/kambo-1st/duckdb-php/pull/6)

An unofficial [DuckDB](https://duckdb.org/) communication library for PHP.

[![Latest Version on Packagist](https://camo.githubusercontent.com/b98c7c34ba8bddc82e084939fa7d925aae8357059c62b4dd3363a4eb9daf85ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616d626f2f6475636b64622d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kambo/duckdb-php)[![Tests](https://camo.githubusercontent.com/5a26eba8b262295affbce9cdf1c5fe5013b27826290ed97e85db745211e067ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b616d626f2d3173742f6475636b64622d7068702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kambo-1st/duckdb-php/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/7c5761c80830c90b9b9d5852dba6f80a8af4fc3557737d91027eb28f43361da3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616d626f2f6475636b64622d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kambo/duckdb-php)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kambo/duckdb kambo/duckdb-php-linux-lib
```

Note: the kambo/duckdb-php-linux-lib package contains a binary library for Linux.

Usage
-----

[](#usage)

```
$database = new Kambo\DuckDB\Database();
$connection = new Kambo\DuckDB\Connection($database);

$connection->query('CREATE TABLE integers(i INTEGER, j INTEGER);');
$connection->query('INSERT INTO integers VALUES (3,4), (5,6), (7, NULL) ');

$result = $connection->query('SELECT * FROM integers;');

var_export($result->toArray());
```

Current limitations
-------------------

[](#current-limitations)

- This library is in alpha version.
- It currently only works under Linux (work is ongoing for other platforms).
- It has limited support of DuckDB APIs.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

703d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d41636edbb42a8a54f49b0f391149530b17f3982bd4f0249a2864068ed8d4c3c?d=identicon)[dancal](/maintainers/dancal)

---

Top Contributors

[![dancal](https://avatars.githubusercontent.com/u/2622020?v=4)](https://github.com/dancal "dancal (9 commits)")[![kambo-1st](https://avatars.githubusercontent.com/u/6493048?v=4)](https://github.com/kambo-1st "kambo-1st (3 commits)")

---

Tags

duckdbkambo

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dancal-duckdb/health.svg)

```
[![Health](https://phpackages.com/badges/dancal-duckdb/health.svg)](https://phpackages.com/packages/dancal-duckdb)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
