PHPackages                             arraypress/swiftdb - 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. arraypress/swiftdb

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

arraypress/swiftdb
==================

A modern database abstraction layer for WordPress, based on BerlinDB, providing an efficient and structured approach to database operations.

01PHP

Since Feb 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/arraypress/swiftdb)[ Packagist](https://packagist.org/packages/arraypress/swiftdb)[ RSS](/packages/arraypress-swiftdb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SwiftDB
=======

[](#swiftdb)

SwiftDB is an enhanced fork of BerlinDB, expanding upon its robust foundation to provide an even more comprehensive ORM-like experience for WordPress database tables. While maintaining the core principles and elegance of BerlinDB, SwiftDB introduces additional features and improvements to meet modern WordPress development needs.

Overview
--------

[](#overview)

This library provides a structured approach to WordPress database management, offering both the original BerlinDB functionality and new advanced features:

### Original BerlinDB Features

[](#original-berlindb-features)

- ORM-like interface for WordPress database tables
- Custom table creation and management
- Structured query building
- Efficient data retrieval and manipulation

### New SwiftDB Enhancements

[](#new-swiftdb-enhancements)

- Aggregate query support (COUNT, SUM, AVG, etc.)
- Column/row data type casting

### Upcoming SwiftDB Enhancements

[](#upcoming-swiftdb-enhancements)

- Advanced type system:
    - Strict PHP type hints and return types
    - Automatic type casting for columns and rows
    - Custom type definitions and validation
- Enhanced relationships and JOINs:
    - One-to-one and one-to-many relationships
    - Table relationship definitions
    - JOIN query builder
    - Cross-table type safety
- Modern developer experience:
    - Full PHP 7.4+ type hinting
    - Static analysis support
    - IDE autocompletion friendly
    - Strict type enforcement

Origin and Evolution
--------------------

[](#origin-and-evolution)

SwiftDB builds upon the excellent foundation of BerlinDB, a project that emerged from WordCamp Europe 2019 and represents the collective wisdom of multiple major WordPress projects including Easy Digital Downloads, Sugar Calendar, and Restrict Content Pro.

The original BerlinDB was created to solve the challenge of custom database management in WordPress, eliminating code duplication and fragmentation across projects. SwiftDB continues this mission while adding modern features and improvements.

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

[](#installation)

```
composer require arraypress/swiftdb
```

Credits
-------

[](#credits)

SwiftDB is a fork of [BerlinDB](https://github.com/berlindb/core), originally created by Sandhills Development, LLC. The original project represents the cumulative effort of dozens of individuals across multiple projects and continues to inspire this enhanced version.

License
-------

[](#license)

GPL-2.0-or-later

---

SwiftDB is maintained by [ArrayPress](https://arraypress.com). While this project builds upon BerlinDB's foundation, we aim to push the boundaries of what's possible in WordPress database management.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance54

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![arraypress](https://avatars.githubusercontent.com/u/22668877?v=4)](https://github.com/arraypress "arraypress (3 commits)")

### Embed Badge

![Health badge](/badges/arraypress-swiftdb/health.svg)

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

###  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)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

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

Reliese Components for Laravel Framework code generation.

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

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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