PHPackages                             jasperfw/data-access - 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. jasperfw/data-access

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

jasperfw/data-access
====================

Database Access Library

1.1.2(4y ago)01063Apache-2.0PHPPHP ^8.1CI failing

Since Feb 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jasperfw/data-access)[ Packagist](https://packagist.org/packages/jasperfw/data-access)[ RSS](/packages/jasperfw-data-access/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (8)Used By (3)

Jasper FW - Data Access
=======================

[](#jasper-fw---data-access)

The Data Access Library provides wrappers for interacting with MySQL, SQL Server, SQLite and more coming soon.

The included database connection wrappers mostly wrap PDO drivers. However, some drivers wrap alternative drivers (such as odbi for Oracle) where PDO support is not available or complete.

In addition to database connectivity, this library provides a set of ResultSet objects that wrap PDOStatment objects, arrays, or other data holders. These ResultSet objects can be used as prepared statements and storage objects for the results of queries against a wide variety of data sources with a simple, uniform interface.

Features
--------

[](#features)

- AIntegrate with popular database engines (MySQL and MS Server currently, partial DB2 support, more coming soon.)
- Simple Prepared Statement / result containers

Instructions
============

[](#instructions)

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

[](#installation)

Install using composer `composer require "jasperfw/data-access"`

Basic Usage
-----------

[](#basic-usage)

### Establish a database connection

[](#establish-a-database-connection)

1. Create a configuration array containing the database connection attributes

```
$config = [
    'server' => 'mysql://localhost:port', // This is your DSN string for most database types
    'username' => 'bob',
    'password' => 'myUniquePassword',
];
```

2. Instantiate a database connection object, passing in the $configuration array, and optionally a PSR-3 compliant logger, such as Monolog

```
$dbc = new MySQL($config, $logger);
```

### Query the database

[](#query-the-database)

1. Quickly query the database, and output the results as an array. The `query()` function accepts two parameters, the query string, and an options array, which can contain a 'params' element for a parameterized query:

```
$queryString = "SELECT * FROM users WHERE username = :username";
$myArray = $dbc->query($queryString, ['params' => [':username' => 'bob']])->toArray();
```

2. Use parameterized queries and Result Sets

```
$queryString = "SELECT * FROM order_lines WHERE productID = :pid";
$stmt = $dbc->getStatement($queryString);
$stmt->execute([':pid' => '12345']);
if ($stmt->querySucceeded()) {
    $resultArray = $stmt->toArray();
}
$stmt->execute([':pid' => '54321']);
if ($stmt->querySucceeded()) {
    $resultArray2 = $stmt->toArray();
}
```

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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 ~149 days

Recently: every ~185 days

Total

6

Last Release

1613d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e587f99865e86a6017790de670eddcc411174fca453eca382bdf03b65401837?d=identicon)[wigedev](/maintainers/wigedev)

---

Top Contributors

[![wigedev](https://avatars.githubusercontent.com/u/2421683?v=4)](https://github.com/wigedev "wigedev (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jasperfw-data-access/health.svg)

```
[![Health](https://phpackages.com/badges/jasperfw-data-access/health.svg)](https://phpackages.com/packages/jasperfw-data-access)
```

###  Alternatives

[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)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.5M254](/packages/api-platform-metadata)[cycle/database

DBAL, schema introspection, migration and pagination

71811.3k75](/packages/cycle-database)[symfony/ai-store

Low-level abstraction for storing and retrieving documents in a vector store.

22443.1k142](/packages/symfony-ai-store)

PHPackages © 2026

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