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

Commit 4e99b8c

Browse files
committed
Initial import
1 parent 2fd1a92 commit 4e99b8c

File tree

10 files changed

+734
-0
lines changed

10 files changed

+734
-0
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
8+
before_script:
9+
- composer self-update
10+
- composer install
11+
- psql -c 'CREATE DATABASE "testing";' -U postgres
12+
13+
script:
14+
- phpunit --coverage-text

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,75 @@ sql
22
===
33

44
Abstraction to SQL queries by using a PDO Wrapper
5+
6+
[![Build Status](https://travis-ci.org/appdeck/sql.png?branch=master)](https://travis-ci.org/appdeck/sql)
7+
[![Latest Stable Version](https://poser.pugx.org/appdeck/sql/v/stable.png)](https://packagist.org/packages/appdeck/sql)
8+
[![Total Downloads](https://poser.pugx.org/appdeck/sql/downloads.png)](https://packagist.org/packages/appdeck/sql)
9+
10+
Installation
11+
------------
12+
This library can be found on [Packagist](https://packagist.org/packages/appdeck/sql).
13+
The recommended way to install this is through [composer](http://getcomposer.org).
14+
15+
Edit your `composer.json` and add:
16+
17+
```json
18+
{
19+
"require": {
20+
"appdeck/sql": "0.1.*"
21+
}
22+
}
23+
```
24+
25+
And install dependencies:
26+
27+
```bash
28+
$ curl -sS https://getcomposer.org/installer | php
29+
$ php composer.phar install
30+
```
31+
32+
Features
33+
--------
34+
- PSR-0 compliant for easy interoperability
35+
36+
Examples
37+
--------
38+
Examples of basic usage are located in the examples/ directory.
39+
40+
Bugs and feature requests
41+
-------------------------
42+
Have a bug or a feature request? [Please open a new issue](https://github.com/appdeck/sql/issues).
43+
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/).
44+
45+
Versioning
46+
----------
47+
sql will be maintained under the Semantic Versioning guidelines as much as possible.
48+
49+
Releases will be numbered with the following format:
50+
51+
`<major>.<minor>.<patch>`
52+
53+
And constructed with the following guidelines:
54+
55+
* Breaking backward compatibility bumps the major (and resets the minor and patch)
56+
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
57+
* Bug fixes and misc changes bumps the patch
58+
59+
For more information on SemVer, please visit [http://semver.org/](http://semver.org/).
60+
61+
Authors
62+
-------
63+
**Flávio Heleno**
64+
65+
+ [http://twitter.com/flavioheleno](http://twitter.com/flavioheleno)
66+
+ [http://github.com/flavioheleno](http://github.com/flavioheleno)
67+
68+
**Vinícius Campitelli**
69+
70+
+ [http://twitter.com/vcampitelli](http://twitter.com/vcampitelli)
71+
+ [http://github.com/vcampitelli](http://github.com/vcampitelli)
72+
73+
Copyright and license
74+
---------------------
75+
76+
Copyright 2014 appdeck under [GPL-3.0](LICENSE).

composer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "appdeck/sql",
3+
"description": "Abstraction to SQL queries by using a PDO Wrapper",
4+
"keywords": ["pdo", "wrapper", "pdo wrapper", "sql", "sql abstraction"],
5+
"homepage": "http://appdeck.github.io/sql",
6+
"license": "GPL-3.0",
7+
"authors": [
8+
{
9+
"name": "Flávio Heleno",
10+
"email": "[email protected]",
11+
"homepage": "http://flavioheleno.me",
12+
"role": "Developer"
13+
},
14+
{
15+
"name": "Vinícius Campitelli",
16+
"email": "[email protected]",
17+
"homepage": "http://viniciuscampitelli.com",
18+
"role": "Developer"
19+
}
20+
],
21+
"require": {
22+
"php": ">=5.3.0"
23+
},
24+
"require-dev": {
25+
"phpdocumentor/phpdocumentor": "2.1.*",
26+
"phpunit/phpunit": "4.0.*"
27+
},
28+
"autoload": {
29+
"psr-0": {
30+
"SQL": "src",
31+
"SQLTest": "tests"
32+
}
33+
},
34+
"minimum-stability": "dev"
35+
}

phpunit.xml.dist

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="true"
3+
backupStaticAttributes="false"
4+
bootstrap="tests/bootstrap.php"
5+
colors="false"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
forceCoversAnnotation="false"
10+
mapTestClassNameToCoveredClassName="false"
11+
processIsolation="true"
12+
stopOnError="false"
13+
stopOnFailure="false"
14+
stopOnIncomplete="false"
15+
stopOnSkipped="false"
16+
strict="false"
17+
verbose="false">
18+
<testsuites>
19+
<testsuite name="SQL Test Suite">
20+
<directory>tests</directory>
21+
</testsuite>
22+
</testsuites>
23+
<filter>
24+
<whitelist>
25+
<directory suffix=".php">src/</directory>
26+
<exclude>
27+
<file>src/SQL/Exception/CacheDisabled.php</file>
28+
<file>src/SQL/Exception/Connection.php</file>
29+
<file>src/SQL/Exception/Query.php</file>
30+
</exclude>
31+
</whitelist>
32+
</filter>
33+
</phpunit>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
*
4+
* Exception thrown when trying to tag a query with a disabled Query Cache
5+
*
6+
* @copyright 2014 appdeck
7+
* @link http://github.com/appdeck/sql
8+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
9+
*/
10+
11+
namespace SQL\Exception;
12+
13+
class CacheDisabled extends \Exception {
14+
protected $message = 'You have to enable cache before tagging a query.';
15+
}

src/SQL/Exception/Connection.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
*
4+
* Exception thrown on Connection Failure
5+
*
6+
* @copyright 2014 appdeck
7+
* @link http://github.com/appdeck/sql
8+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
9+
*/
10+
11+
namespace SQL\Exception;
12+
13+
class Connection extends \Exception {}

src/SQL/Exception/Query.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
*
4+
* Exception thrown on Query Error
5+
*
6+
* @copyright 2014 appdeck
7+
* @link http://github.com/appdeck/sql
8+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
9+
*/
10+
11+
namespace SQL\Exception;
12+
13+
class Query extends \Exception {}

0 commit comments

Comments
 (0)