PHPackages                             casual/database - 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. casual/database

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

casual/database
===============

一个漫不经心的适合常驻内存PHP程序的数据库驱动组件.

2.2.2(4y ago)613211MITPHPPHP &gt;=7.3

Since May 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Chaz6Chez/casual-database)[ Packagist](https://packagist.org/packages/casual/database)[ RSS](/packages/casual-database/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (10)Dependencies (2)Versions (17)Used By (1)

casual-database
===============

[](#casual-database)

**Casual Long-living MySQL connection for daemon.**

```
This project is forked from Medoo and made a resident memory adaptation.
Thanks Medoo.

```

说明
--

[](#说明)

- 基于 [Medoo2.1.x](https://medoo.in/doc) 语法

    - [where](./docs/where.md)
    - [select](./docs/where.md)
- 兼容链式调用

    - Connection 链式调用连接类
    - AbstractModel 模型层
    - 支持 Master/Slave 数据库区分
    - 支持多库
- 符合常驻内存应用的长连接
- 支持 驱动

    NameDriverMySQL, MariaDBphp\_pdo\_mysqlODBCphp\_pdo\_odbcSQLitephp\_pdo\_sqlitePostgreSQLphp\_pdo\_pgsql
- 符合SQL标准错误码的 SQLSTATE 映射表

    - [SQLSTATE参考表](./docs/SQLSTATE.md)
- 预置事件

    事件类型描述onBeforePreparecallable预处理前onBeforeBindcallable绑定前onBeforeExeccallable执行前onAfterExeccallable执行后onAfterTransactioncallable事务后（不论成功与否）onAfterRollbackcallable回滚后（不论成功与否）onAfterCommitcallable提交后（不论成功与否）
- 支持 logger

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~17 days

Total

16

Last Release

1661d ago

Major Versions

0.01 → 1.0.02021-05-21

1.x-dev → 2.0.0-beta2021-08-22

PHP version history (2 changes)0.01PHP &gt;=7.3

1.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22535862?v=4)[chaz6chez](/maintainers/Chaz6Chez)[@chaz6chez](https://github.com/chaz6chez)

---

Top Contributors

[![chaz6chez](https://avatars.githubusercontent.com/u/22535862?v=4)](https://github.com/chaz6chez "chaz6chez (41 commits)")

---

Tags

mysqlpgsqlodbccasual

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/casual-database/health.svg)

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k614.3M7.3k](/packages/doctrine-dbal)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[aura/sql

A PDO extension that provides lazy connections, array quoting, query profiling, value binding, and convenience methods for common fetch styles. Because it extends PDO, existing code that uses PDO can use this without any changes to the existing code.

5662.7M59](/packages/aura-sql)[cycle/database

DBAL, schema introspection, migration and pagination

71811.3k65](/packages/cycle-database)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

2414.4k](/packages/perplorm-perpl)

PHPackages © 2026

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