2017 © Pedro Peláez
 

library pheasant-adodb

A subset of the ADOdb API on Pheasant

image

99designs/pheasant-adodb

A subset of the ADOdb API on Pheasant

  • Monday, November 14, 2016
  • by lox
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13,861 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Pheasant-adodb

Implements a subset of the ADOdb API using Pheasant, (*1)

Example Usage

# set up Pheasant connection
$pheasant = \Pheasant::setup('mysql://user@localhost/mydb');
$adodbConnection = new \PheasantAdodb\Connection($pheasant->connection());

# start using ADOdb API
$adodbConnection->Execute("SELECT 1,2,3")->GetAll();

Or as a drop in replacement for adodb, you can use the compatability include files, (*2)

# include compatibility files
require_once('adodb/adodb.inc.php');
require_once('adodb/adodb-exceptions.inc.php');

# instantiate ADOdb, set fetch mode
$adodbConnection = ADONewConnection('mysql://user@localhost/mydb');
$adodbConnection->setFetchMode(ADODB_FETCH_ASSOC);

# start using ADOdb API
$adodbConnection->Execute("SELECT 1,2,3")->GetAll();

Limitations and assumptions

  • Tries to match the behavour of ADOdb v4.81 with the adodb-mysqlt driver only
  • ->Replace( does not support disabling auto quoting
  • Every field is escaped as if it were a string
  • Magic quotes not supported
  • If instantiated directly
    • Assumes ADODB_FETCH_ASSOC as the only fetchmode
    • Throws exceptions instead of returning error codes
  • If instantiated via ADONewConnection
    • requires ->setFetchMode(ADODB_FETCH_ASSOC) to be called
    • returns error codes unless adodb-exceptions.inc.php is included

Testing

The testsuite uses the real adodb (with mysqlt driver) to compare the results from API calls., (*3)

composer install --dev
mysql -e 'create database pheasantadodb_test1;'
mysql -e 'create database pheasantadodb_test2;'
phpunit

Build Status, (*4)

The Versions

14/11 2016

dev-master

9999999-dev http://github.com/mtibben/pheasant-adodb

A subset of the ADOdb API on Pheasant

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by Michael Tibben

orm mysql activerecord datamapper adodb pheasant

14/11 2016

v1.0.0

1.0.0.0 http://github.com/mtibben/pheasant-adodb

A subset of the ADOdb API on Pheasant

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by Michael Tibben

orm mysql activerecord datamapper adodb pheasant

03/12 2012

v0.3.1

0.3.1.0 http://github.com/99designs/pheasant-adodb

A subset of the ADOdb API on Pheasant

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by Michael Tibben

orm mysql 99designs activerecord datamapper adodb pheasant

26/11 2012

v0.3.0

0.3.0.0 http://github.com/99designs/pheasant-adodb

A subset of the ADOdb API on Pheasant

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by Michael Tibben

orm mysql 99designs activerecord datamapper adodb pheasant