2017 © Pedro Peláez
 

library query

Chain-able asynchronous query builder for MySQL PDO

image

primal/query

Chain-able asynchronous query builder for MySQL PDO

  • Sunday, December 2, 2012
  • by ChiperSoft
  • Repository
  • 1 Watchers
  • 3 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Primal.Query

Created and Copyright 2012-2013 by Jarvis Badgley, chiper at chipersoft dot com., (*1)

Primal.Query is a chain-able asynchronous query builder class which allows for easy construction and execution of complex queries with data escapement., (*2)

Primal PHP is a collection of independent PHP micro-libraries., (*3)

Requirements

Primal.Query requires PHP 5.3 (tested under 5.3.10). Use of the built in execution methods (select(), insert(), delete(), etc) requires the PHP Data Objects (PDO) extension be installed and configured., (*4)

Usage

A Query object can be initialized directly via the new operator, but the intended implementation is for initial properties to be chained off of a static initialization method. Example:, (*5)

$q=Primal\Query\MySQL::Make($pdo) //$pdo contains your PDO link object
   ->from('users','u')
   ->leftJoin("user_billing b USING (user_id)")
   ->orderBy('u.name')
   ->returns('u.id', 'u.name', 'b.start_date')
   ->whereTrue('b.active')
   ->whereDateInRange('b.start_date', new DateTime('yesterday'));
$results = $q->select();

If you wish to run the query yourself instead of using the built in execution functions, the build* functions will return a tuple array containing the query text and an array of all named parameters., (*6)

Documentation

Method documentation is still forthcoming. In the meantime please use the doc comments in the class itself., (*7)

The Versions

02/12 2012

dev-master

9999999-dev http://github.com/PrimalPHP/Query

Chain-able asynchronous query builder for MySQL PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

database query pdo mysql

02/12 2012

v1.0.1

1.0.1.0 http://github.com/PrimalPHP/Query

Chain-able asynchronous query builder for MySQL PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

database query pdo mysql

29/11 2012

v1.0.0

1.0.0.0 http://github.com/PrimalPHP/Query

Chain-able asynchronous query builder for MySQL PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

database query pdo mysql