Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioheleno committed Mar 11, 2014
1 parent 2fd1a92 commit 4e99b8c
Show file tree
Hide file tree
Showing 10 changed files with 734 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: php

php:
- 5.3
- 5.4
- 5.5

before_script:
- composer self-update
- composer install
- psql -c 'CREATE DATABASE "testing";' -U postgres

script:
- phpunit --coverage-text
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,75 @@ sql
===

Abstraction to SQL queries by using a PDO Wrapper

[![Build Status](https://travis-ci.org/appdeck/sql.png?branch=master)](https://travis-ci.org/appdeck/sql)
[![Latest Stable Version](https://poser.pugx.org/appdeck/sql/v/stable.png)](https://packagist.org/packages/appdeck/sql)
[![Total Downloads](https://poser.pugx.org/appdeck/sql/downloads.png)](https://packagist.org/packages/appdeck/sql)

Installation
------------
This library can be found on [Packagist](https://packagist.org/packages/appdeck/sql).
The recommended way to install this is through [composer](http://getcomposer.org).

Edit your `composer.json` and add:

```json
{
"require": {
"appdeck/sql": "0.1.*"
}
}
```

And install dependencies:

```bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
```

Features
--------
- PSR-0 compliant for easy interoperability

Examples
--------
Examples of basic usage are located in the examples/ directory.

Bugs and feature requests
-------------------------
Have a bug or a feature request? [Please open a new issue](https://github.com/appdeck/sql/issues).
Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).

Versioning
----------
sql will be maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

`<major>.<minor>.<patch>`

And constructed with the following guidelines:

* Breaking backward compatibility bumps the major (and resets the minor and patch)
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
* Bug fixes and misc changes bumps the patch

For more information on SemVer, please visit [http://semver.org/](http://semver.org/).

Authors
-------
**Flávio Heleno**

+ [http://twitter.com/flavioheleno](http://twitter.com/flavioheleno)
+ [http://github.com/flavioheleno](http://github.com/flavioheleno)

**Vinícius Campitelli**

+ [http://twitter.com/vcampitelli](http://twitter.com/vcampitelli)
+ [http://github.com/vcampitelli](http://github.com/vcampitelli)

Copyright and license
---------------------

Copyright 2014 appdeck under [GPL-3.0](LICENSE).
35 changes: 35 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "appdeck/sql",
"description": "Abstraction to SQL queries by using a PDO Wrapper",
"keywords": ["pdo", "wrapper", "pdo wrapper", "sql", "sql abstraction"],
"homepage": "http://appdeck.github.io/sql",
"license": "GPL-3.0",
"authors": [
{
"name": "Flávio Heleno",
"email": "[email protected]",
"homepage": "http://flavioheleno.me",
"role": "Developer"
},
{
"name": "Vinícius Campitelli",
"email": "[email protected]",
"homepage": "http://viniciuscampitelli.com",
"role": "Developer"
}
],
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "2.1.*",
"phpunit/phpunit": "4.0.*"
},
"autoload": {
"psr-0": {
"SQL": "src",
"SQLTest": "tests"
}
},
"minimum-stability": "dev"
}
33 changes: 33 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
processIsolation="true"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
strict="false"
verbose="false">
<testsuites>
<testsuite name="SQL Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
<exclude>
<file>src/SQL/Exception/CacheDisabled.php</file>
<file>src/SQL/Exception/Connection.php</file>
<file>src/SQL/Exception/Query.php</file>
</exclude>
</whitelist>
</filter>
</phpunit>
15 changes: 15 additions & 0 deletions src/SQL/Exception/CacheDisabled.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
*
* Exception thrown when trying to tag a query with a disabled Query Cache
*
* @copyright 2014 appdeck
* @link http://github.com/appdeck/sql
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
*/

namespace SQL\Exception;

class CacheDisabled extends \Exception {
protected $message = 'You have to enable cache before tagging a query.';
}
13 changes: 13 additions & 0 deletions src/SQL/Exception/Connection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
*
* Exception thrown on Connection Failure
*
* @copyright 2014 appdeck
* @link http://github.com/appdeck/sql
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
*/

namespace SQL\Exception;

class Connection extends \Exception {}
13 changes: 13 additions & 0 deletions src/SQL/Exception/Query.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
*
* Exception thrown on Query Error
*
* @copyright 2014 appdeck
* @link http://github.com/appdeck/sql
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
*/

namespace SQL\Exception;

class Query extends \Exception {}
Loading

0 comments on commit 4e99b8c

Please sign in to comment.