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 3w 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 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

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

1615d 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.7k595.8M6.5k](/packages/doctrine-dbal)[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.

5632.6M52](/packages/aura-sql)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5013.9M129](/packages/dibi-dibi)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4563.1M37](/packages/aura-sqlquery)[cycle/database

DBAL, schema introspection, migration and pagination

65746.2k48](/packages/cycle-database)[apix/cache

A thin PSR-6 cache wrapper with a generic interface to various caching backends emphasising cache taggging and indexing to Redis, Memcached, PDO/SQL, APC and other adapters.

114546.3k6](/packages/apix-cache)

PHPackages © 2026

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