Skip to content

Commit

Permalink
Release version 1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
FaaPz committed Jan 20, 2016
1 parent 8df429d commit 65d415f
Show file tree
Hide file tree
Showing 18 changed files with 569 additions and 149 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Changelog

##### v1.9.4
+ Revised documentation (WIP)
+ Updated `InsertStatement` class with:
- Fixed `execute()` method

##### v1.9.3
+ Updated `InsertStatement` class with:
- Added `$insertId` argument in `execute()` method
Expand Down Expand Up @@ -53,4 +58,4 @@
+ Removed old changelog notes

##### v1.7.0
+ Revised release version
+ Revised release version
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Fabian de Laender
Copyright (c) 2015-2016 Fabian de Laender

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $insertStatement = $pdo->insert(array('id', 'usr', 'pwd'))
->into('users')
->values(array(1234, 'your_username', 'your_password'));

$insertId = $insertStatement->execute();
$insertId = $insertStatement->execute(false);

// UPDATE users SET pwd = ? WHERE id = ?
$updateStatement = $pdo->update(array('pwd' => 'your_new_password'))
Expand All @@ -70,4 +70,4 @@ See [CHANGELOG](https://github.com/FaaPz/Slim-PDO/blob/master/CHANGELOG.md)

### License

See [LICENSE](https://github.com/FaaPz/Slim-PDO/blob/master/LICENSE)
See [LICENSE](https://github.com/FaaPz/Slim-PDO/blob/master/LICENSE)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slim/pdo",
"description": "PDO database library for Slim Framework",
"version": "1.9.3",
"version": "1.9.4",
"type": "library",
"keywords": ["pdo", "database", "slim", "framework"],
"homepage": "https://github.com/FaaPz/Slim-PDO",
Expand Down
58 changes: 47 additions & 11 deletions docs/AGGREGATES.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,53 @@
### Aggregates
# Aggregates

##### Methods
> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
+ `count()`
+ `distinctCount()`
+ `max()`
+ `min()`
+ `avg()`
+ `sum()`
### Methods

> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
##### `count($column = '*', $as = null, $distinct = false)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | `'*'` | ...
`$as` | *string* | `null` | ...
`$distinct` | *bool* | `false` | ...

##### `distinctCount($column = '*', $as = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | `'*'` | ...
`$as` | *string* | `null` | ...

##### `max($column, $as = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$as` | *string* | `null` | ...

##### `min($column, $as = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$as` | *string* | `null` | ...

##### `avg($column, $as = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$as` | *string* | `null` | ...

##### `sum($column, $as = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$as` | *string* | `null` | ...

##### Examples
### Examples

```php
// ... COUNT( * )
Expand All @@ -28,4 +64,4 @@ $selectStatement->min('salary');
$selectStatement->max('salary');
$selectStatement->avg('price');
$selectStatement->sum('votes');
```
```
16 changes: 10 additions & 6 deletions docs/Clause/GROUP_BY.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
### GROUP BY clause
# GROUP BY clause

##### Methods
> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
+ `groupBy()`
### Methods

> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
##### `groupBy($statement)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$statement` | *string* | required | ...

##### Examples of grouping
### Examples

```php
// ... GROUP BY f_name
$selectStatement->groupBy('f_name');
```
```
66 changes: 54 additions & 12 deletions docs/Clause/HAVING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,60 @@
### HAVING clause
# HAVING clause

##### Methods
> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
+ `having()`
+ `orHaving()`
+ `havingCount()`
+ `havingMax()`
+ `havingMin()`
+ `havingAvg()`
+ `havingSum()`
### Methods

> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
##### `having($column, $operator = null, $rule = 'AND')`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...
`$rule` | *string* | `'AND'` | ...

##### `orHaving($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### `havingCount($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### `havingMax($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### `havingMin($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### `havingAvg($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### `havingSum($column, $operator = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$column` | *string* | required | ...
`$operator` | *string* | `null` | ...

##### Examples
### Examples

```php
// ... HAVING MIN( price ) > ? OR MAX( price ) < ?
Expand All @@ -30,4 +72,4 @@ $selectStatement->havingAvg('price', '<', 12.5);

// ... HAVING SUM( votes ) > ?
$selectStatement->havingSum('votes', '>', 25);
```
```
50 changes: 41 additions & 9 deletions docs/Clause/JOIN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,47 @@
### JOIN clause
# JOIN clause

##### Methods
> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
+ `join()`
+ `leftJoin()`
+ `rightJoin()`
+ `fullJoin()`
### Methods

> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
##### `join($table, $first, $operator = null, $second = null, $type = 'INNER')`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$table` | *string* | required | ...
`$first` | *string* | required | ...
`$operator` | *string* | `null` | ...
`$second` | *string* | `null` | ...
`$type` | *string* | `'INNER'` | ...

##### `leftJoin($table, $first, $operator = null, $second = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$table` | *string* | required | ...
`$first` | *string* | required | ...
`$operator` | *string* | `null` | ...
`$second` | *string* | `null` | ...

##### `rightJoin($table, $first, $operator = null, $second = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$table` | *string* | required | ...
`$first` | *string* | required | ...
`$operator` | *string* | `null` | ...
`$second` | *string* | `null` | ...

##### `fullJoin($table, $first, $operator = null, $second = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$table` | *string* | required | ...
`$first` | *string* | required | ...
`$operator` | *string* | `null` | ...
`$second` | *string* | `null` | ...

##### Examples
### Examples

```php
// ... INNER JOIN orders ON customers.id = orders.customer_id
Expand All @@ -24,4 +56,4 @@ $selectStatement->rightJoin('orders', 'customers.id', '=', 'orders.customer_id')

// ... FULL OUTER JOIN orders ON customers.id = orders.customer_id
$selectStatement->fullJoin('orders', 'customers.id', '=', 'orders.customer_id');
```
```
17 changes: 11 additions & 6 deletions docs/Clause/LIMIT.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
### LIMIT clause
# LIMIT clause

##### Methods
> Used in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md), [UPDATE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/UPDATE.md) and [DELETE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/DELETE.md) statements.
+ `limit()`
### Methods

> Used in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md), [UPDATE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/UPDATE.md) and [DELETE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/DELETE.md) statements.
##### `limit($number, $end = null)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$number` | *int* | required | ...
`$end` | *int* | `null` | ...

##### Examples of limiting
### Examples

```php
// ... LIMIT 10
$statement->limit(10);

// ... LIMIT 10 , 30
$statement->limit(10, 30);
```
```
16 changes: 10 additions & 6 deletions docs/Clause/OFFSET.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
### OFFSET clause
# OFFSET clause

##### Methods
> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
+ `offset()`
### Methods

> Used only in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md) statements.
##### `offset($number)`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$number` | *int* | required | ...

##### Examples of offsetting
### Examples

```php
// ... OFFSET 20
$selectStatement->offset(20);
```
```
17 changes: 11 additions & 6 deletions docs/Clause/ORDER_BY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
### ORDER BY clause
# ORDER BY clause

##### Methods
> Used in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md), [UPDATE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/UPDATE.md) and [DELETE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/DELETE.md) statements.
+ `orderBy()`
### Methods

> Used in [SELECT](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/SELECT.md), [UPDATE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/UPDATE.md) and [DELETE](https://github.com/FaaPz/Slim-PDO/blob/master/docs/Statement/DELETE.md) statements.
##### `orderBy($statement, $order = 'ASC')`

Parameter | Type | Default | Description
--- | --- | --- | ---
`$statement` | *string* | required | ...
`$order` | *string* | `'ASC'` | ...

##### Examples of ordering
### Examples

```php
// ... ORDER BY l_name ASC
Expand All @@ -15,4 +20,4 @@ $statement->orderBy('l_name', 'ASC');

// ... ORDER BY l_name DESC
$statement->orderBy('l_name', 'DESC');
```
```
Loading

0 comments on commit 65d415f

Please sign in to comment.