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

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

keenlysoft/database
===================

Database and active record package for the Keenly lightweight PHP framework

1.28.0(2mo ago)2882MITPHPPHP &gt;=7.4 &lt;9.0

Since Jul 20Pushed 5y agoCompare

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

READMEChangelog (10)DependenciesVersions (15)Used By (2)

Keenly Database
===============

[](#keenly-database)

`keenlysoft/database` is the database and active record package for the [Keenly lightweight PHP framework](https://github.com/keenlysoft/keenly). It provides a small MySQL-oriented query layer, active record helpers, pagination, and an optional Redis wrapper.

Features
--------

[](#features)

- Active record models for common create, read, update, and delete operations
- Prepared query helpers through `pwhere()`
- Transaction helpers
- Pagination support
- Optional Redis connection wrapper
- PHP 7.4 and PHP 8.x compatibility baseline

Requirements
------------

[](#requirements)

- PHP 7.4 or later
- PDO and the PDO driver for your database
- The BCMath extension when using pagination
- The Redis extension when using the Redis wrapper
- `keenlysoft/keenly` when using framework configuration integration

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

[](#installation)

Install the package with Composer:

```
composer require keenlysoft/database
```

Applications created with [`keenlysoft/app`](https://github.com/keenlysoft/app) include this package automatically.

Quick Start
-----------

[](#quick-start)

Define an application model:

```
