2017 © Pedro Peláez
 

library gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

image

rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  • Wednesday, May 9, 2018
  • by rotexdegba
  • Repository
  • 1 Watchers
  • 1 Stars
  • 483 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Generic Data Access Objects (GDAO)

Run PHP Tests and Code Quality Tools   GitHub release (latest SemVer)   GitHub   Coverage Status   GitHub repo size   Packagist Downloads   GitHub top language   Packagist PHP Version Support   GitHub commits since latest release (by date)   GitHub last commit   GitHub Release Date   Libraries.io dependency status for GitHub repo , (*1)

Description

A package containing class and interface definitions that can be used as a basis for a __**Table Data Gateway**__ (http://bit.ly/1F8Zjfc) and __**Data Mapper**__ (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks. Below are its main components:, (*2)

  • an abstract Model class (it's the Table Data Gateway and Data Mapper that interacts with a database table by performing DM tasks like Selection, Insertion, Deletion & Updating of data), (*3)

  • a RecordInterface interface (contains definitions of methods that any class representing a row of data in a database table, MUST IMPLEMENT. Such classes can only access a database table via an instance of the Model class), (*4)

  • an optional CollectionInterface interface (contains definitions of methods that any class that is to serve as a collection of multiple instances of RecordInterface objects, MUST IMPLEMENT), (*5)

This API is intended to make it easy / trivial to swap out different implementations of each of the Main classes. For example, an application may have been written to use a package that implements this API in the following classes: ModelYY, CollectionYY (which implements CollectionInterface) and RecordYY (which implements RecordInterface). In the future if another package implementing this API has a ModelZZ which performs some operations more efficiently than ModelYY, you should be able to easily substitute ModelYY with ModelZZ if all your data access code strictly adheres to the GDAO API (you would now end up using ModelZZ, CollectionYY and RecordYY in your updated code; which should all work nicely together)., (*6)

This package isn't meant to perform database schema management tasks like creating/altering tables, etc. However, it exposes a PDO object (via \GDAO\Model->getPDO()) that can be used to perform such tasks and other data manipulation (DM) tasks that cannot be accomplished via this API., (*7)

GDAO Classes & Interfaces, (*8)

Assumptions and Conventions in this API.

  • Each database table has a single auto-incrementing numeric primary key column (composite primary keys are not supported; however a single primary key column that is non-numeric should work), (*9)

  • Implementation(s) of this API must be powered by at least one PDO object. Vendor specific php database extensions (eg. mysqli, SQLite3 etc.) are not to be used in implementation(s) of this API., (*10)

  • This API is architected with the intent of having Records and Collections created via the Model., (*11)

    Users of any implementation of this API should not be directly instantiating new Collections or Records via their constructors, instead they should create them by calling the appropriate implementation of \GDAO\Model::createCollection(..) or \GDAO\Model::createRecord(..)., (*12)

Definition of terms used in the phpdoc comment blocks:

  • Consumer: an individual developer or group of developers that use a package / library containing concrete implementation of the APIs specified in the abstract classes in this package., (*13)

  • Implementer: The developer that creates a package / library containing concrete implementation of the APIs specified in the abstract classes in this package., (*14)

Running Tests

./vendor/bin/phpunit --coverage-text, (*15)

Branching

These are the branches in this repository:, (*16)

  • master: contains code for the latest major version of this package
  • 2.x: contains code for the 2.x version of this package
  • 1.X: contains code for the 1.x version of this package. This version never got a stable release and has been abandoned

The Versions

09/05 2018

dev-2.0-active-development

dev-2.0-active-development https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper

09/05 2018

dev-master

9999999-dev https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper

06/05 2018

dev-revert-2-2.0-active-development

dev-revert-2-2.0-active-development https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper

06/05 2018

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper

06/05 2018

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper

25/08 2015

1.0.0-RC1

1.0.0.0-RC1 https://github.com/rotexsoft/gdao

A package containing class and interface definitions that can be used as a basis for a Table Data Gateway (http://bit.ly/1F8Zjfc) and Data Mapper (http://bit.ly/1hD2qCc) implementation of a database access library that performs data manipulation (DM) tasks.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

orm database sql postgresql gateway table mapper pdo mysql data db sqlite data mapper table data gateway table-data-gateway data-mapper