Skip to content

Latest commit

 

History

History

Source

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

High Level API

From an API point of view the PINQ library already provides the bulk of the required API for this library in the ITraversable and the ICollection interfaces. These interfaces defines the collection methods for querying so the job of the library is to implement the mapping of this API to the applicable backend, in this case MySQL.

As the collection API is already defined the entry point to this library merely is a thin wrapper around the PINQ API:

use Pinq\Demo\Sql\DB;

$db      = new DB($yourPdoConnection);
$results = $db->table('some_table')->where(function)...

The DB::table method returns an instance of IRepository which is the counterpart interface of ICollection that delegates queries to an underlying query provider.

More details on the PINQ query API can be found here.