PHPackages                             rastatech/odbal - 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. rastatech/odbal

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

rastatech/odbal
===============

Oracle Database Abstraction Layer

1.5(5y ago)157MITPHPPHP &gt;=5.6.0

Since Mar 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rastatech/odbal)[ Packagist](https://packagist.org/packages/rastatech/odbal)[ RSS](/packages/rastatech-odbal/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (23)Used By (0)

odbal
=====

[](#odbal)

Oracle Database Abstraction Layer

implement the normal way: `composer require rastatech/odbal`

This is an abstraction layer intended to take some of the pain &amp; suffering out of using Oracle Stored Procedures, for which this DBAL is specifically geared. Eventually this could easily work for Pass-Thru SQL too, as I designed it w/ a placeholder for that, but it doesn't currently. Feel free to fork &amp; add it! :) )

You can do everything pretty much by extending the Main.php class with your own model. I've included a sample model (example\_model) extension of the dbal\\main as an example of how to use the ODBAL.

One last set of things you'll need to define are the following arrays; I set these arrays currently via an `.ini` file defined in a location external to the application and that is retrieved and consumed at the application level, but you can do them in the model, or whatever. An example of some suffix arrays for an `.ini` file is in the wiki.

ahem, sorry; the `.ini` file arrays:

- your `cursor_params` - the parameter names/suffix strings (it'll handle both) - you want to define as being `OUT_CURSOR` parameters, e.g. `CURSOR`s you're expecting back from Oracle. When ODBAL sees parameters with these strings, it will know that these should be bound as `CURSOR`s. This allows you to retrieve multiple OUT\_CURSORS from a package. Very nifty.
- `out_params` - OUT variables that are *not* `CURSOR`s. When ODBAL sees parameters with these string names, it will magically create class variables at the level of your Model (exending Main.php) with the same names as the parameters sent. You can access OUT vars (non-`CURSOR`) via `$this->{parametername}` in your model. In your `.ini` file you must define the parameter names/suffix strings you want it to recognize as OUT params. You must pass an array of `(length=x,type={valid oci bind type or non-repeating portion of same},value={null ok here if you are not passing something IN this way})` to ODBAL as a value for Oracle to bind properly to the *OUT* param.
- NEW! `in_params` - IN params that need a type definition, if you're expecting them to occasionally be empty. works the same as OUT params, can be in the Request or the .ini file....`(length={leave null},type={valid oci bind type or non-repeating portion of same},value=())` -- note the empty array in the value
- Oh, and if you are using a *Function* instead of a *Procedure*, you'll want to define the 'function\_return\_params' - a set of strings or string suffixes that the ODBAL will recognize as a function return variable. This works similarly to the non-`CURSOR` OUT vars, but you can pass in that parameter name as the 2nd argument to the `run_sql` method to get the value back directly.

I've included a directory of *example\_models* for you to see a coupla different ways to include these arrays.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

22

Last Release

2163d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/546e208c0f0577c50dc7f746a45c6caedabaed97e808e7676fc82143b36fcd44?d=identicon)[rastatech](/maintainers/rastatech)

---

Top Contributors

[![rastatech](https://avatars.githubusercontent.com/u/10049474?v=4)](https://github.com/rastatech "rastatech (44 commits)")

---

Tags

abstractiondatabaseoracledblayerstored-procedure

### Embed Badge

![Health badge](/badges/rastatech-odbal/health.svg)

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

###  Alternatives

[doctrine/dbal

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

9.7k578.4M5.6k](/packages/doctrine-dbal)[adodb/adodb-php

ADOdb is a PHP database abstraction layer library

4553.9M28](/packages/adodb-adodb-php)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

925511.7k13](/packages/envms-fluentpdo)[lichtner/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921274.8k6](/packages/lichtner-fluentpdo)[fpdo/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921244.9k7](/packages/fpdo-fluentpdo)

PHPackages © 2026

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