Skip to content

Commit

Permalink
v0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
kristuff authored Oct 8, 2020
2 parents e03691a + 9bbeefb commit f1e0d2f
Show file tree
Hide file tree
Showing 30 changed files with 49 additions and 45 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [v0.5] - 2020-10-08

### Changed
- **Possible break change** Fix typo with Output class (instead of Outpout)

## [v0.4] - 2020-09-25

Expand Down
2 changes: 1 addition & 1 deletion lib/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
4 changes: 2 additions & 2 deletions lib/Datasource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down Expand Up @@ -134,7 +134,7 @@ public function getDriver()
* Get the PDO connection
*
* @access public
* @return PDO
* @return \PDO
*/
public function getConnection()
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Driver/DatabaseDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand All @@ -24,7 +24,7 @@
use Kristuff\Patabase;
use Kristuff\Patabase\Driver;
use Kristuff\Patabase\Exception;
use Kristuff\Patabase\Outpout;
use Kristuff\Patabase\Output;

/**
* Class DatabaseDriver
Expand Down Expand Up @@ -65,7 +65,7 @@ abstract class DatabaseDriver
* @access private
* @var string
*/
private $defaultOutputFormat = Outpout::ASSOC;
private $defaultOutputFormat = Output::ASSOC;

/**
* Options for CREATE TABLE
Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/DriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
4 changes: 2 additions & 2 deletions lib/Driver/Mysql/MysqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down Expand Up @@ -342,5 +342,5 @@ public function sqlColumnAutoIncrement($type)
{
return $type .' AUTO_INCREMENT';
}

}
2 changes: 1 addition & 1 deletion lib/Driver/Postgres/PostgresDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/ServerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/Sqlite/SqliteDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/Sqlite/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Exception/InvalidArgException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Exception/MissingArgException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Exception/PatabaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down
14 changes: 7 additions & 7 deletions lib/Outpout.php → lib/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand All @@ -25,30 +25,30 @@
*
* Define api output constant constants
*/
abstract class Outpout
abstract class Output
{
/**
* Define the constant JSON for json outpout
* Define the constant JSON for json Output
*/
const JSON = 'JSON';

/**
* Define the constant JSON_PRETTY_PRINT for json pretty print outpout
* Define the constant JSON_PRETTY_PRINT for json pretty print Output
*/
const JSON_PRETTY_PRINT = 'JSONPP';

/**
* Define the constant OBJ for objects outpout
* Define the constant OBJ for objects Output
*/
const OBJ = 'OBJ';

/**
* Define the constant COLUMN for column outpout
* Define the constant COLUMN for column Output
*/
const COLUMN = 'COLUMN';

/**
* Define the constant ASSOC for associative array outpout
* Define the constant ASSOC for associative array Output
*/
const ASSOC = 'ASSOC';
}
2 changes: 1 addition & 1 deletion lib/Query/CreateTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Having.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/InsertBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/QueryBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
14 changes: 7 additions & 7 deletions lib/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand All @@ -25,7 +25,7 @@
use Kristuff\Patabase\Exception;
use Kristuff\Patabase\SqlException;
use Kristuff\Patabase\Driver;
use Kristuff\Patabase\Outpout;
use Kristuff\Patabase\Output;

/**
* Class QueryBuilder
Expand Down Expand Up @@ -299,20 +299,20 @@ protected static function fetchOutput(QueryBuilder $query, $executed, $outputFor
{
switch (strtoupper($outputFormat)){

case Outpout::ASSOC:
case Output::ASSOC:
return $executed ? $query->pdoStatement->fetchAll(\PDO::FETCH_ASSOC) : array();

case Outpout::OBJ:
case Output::OBJ:
return $executed ? $query->pdoStatement->fetchAll(\PDO::FETCH_OBJ) : array();

case Outpout::COLUMN:
case Output::COLUMN:
return $executed ? $query->pdoStatement->fetchAll(\PDO::FETCH_COLUMN) : array();

case Outpout::JSON:
case Output::JSON:
$results = $executed ? $query->pdoStatement->fetchAll(\PDO::FETCH_ASSOC) : array();
return json_encode($results, JSON_NUMERIC_CHECK);

case Outpout::JSON_PRETTY_PRINT:
case Output::JSON_PRETTY_PRINT:
$results = $executed ? $query->pdoStatement->fetchAll(\PDO::FETCH_ASSOC) : array();
return json_encode($results, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK);

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/QueryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/SelectBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
*
* @copyright 2017-2020 Kristuff
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Query/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/SqlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @version 0.4.0
* @version 0.5.0
* @copyright 2017-2020 Kristuff
*/

Expand Down

0 comments on commit f1e0d2f

Please sign in to comment.