pecee-pixie

Lightweight, easy-to-use querybuilder for PHP inspired by Laravel Eloquent - but with less overhead.

MIT License

Downloads
22.7K
Stars
41
Committers
22

Bot releases are hidden (Show)

pecee-pixie - Version 4.9.1

Published by skipperbent over 6 years ago

  • Fixed getTable returning raw-query instead of null on subQuery-tables.
  • Replaced alias-name in aggregate to generic one.
pecee-pixie - Version 4.9.0

Published by skipperbent over 6 years ago

  • Added new joinUsing method to QueryBuilderHandler class (issue #85 - thanks to @Fishy49).
  • Added new using and orUsing to JoinBuilder class.
  • Added support for columns (column1, columns2 etc.) in buildCriteria method in BaseAdapter class.
  • Optimized and simplified buildCriteria method in BaseAdapter class.
  • Fixed behavior for join method which was incorrectly using LEFT JOIN as default type.
  • Added unit tests for new joinUsing functionality.
  • Removed orUsing as it's not supported by sql.
  • Added unit test for JoinBuilder.
  • Minor optimisations.
  • Updated documentation to reflect new changes.

Release notes

Please read this section carefully before updating in a production environment:

This version corrects the default behavior for the $qb->join() method. The default join behavior is now JOIN instead of LEFT JOIN. Please change all references in your code to use the leftJoin method instead, or specify the join-type using the $type parameter.

pecee-pixie - Version 4.8.1

Published by skipperbent over 6 years ago

  • Fixed events not firing as $storedConnection was overwritten in Connection class.
pecee-pixie - Version 4.8.0

Published by skipperbent over 6 years ago

  • Feature: added better database connection handling.
  • Updated unit-tests.
  • Updated documentation.

Release notes

Added better control for database connections. A connection to the database will now only be established when a new instance of QueryBuilderHandler is created or when $connection->connect(); has been called manually.

This will ensure that projects that sets the connection in the bootstrap, won't connect to the database unless a query has been created or if the connect() method has been called has been called specifically.

Example:

This will no longer automatically establish a database connection:

$connection = (new \Pecee\Pixie\Connection('mysql', $config));

Unless $connection->connect() or $connection->getQueryBuilder() or new QueryBuilderHandler() is called.

pecee-pixie - Version 4.7.2

Published by skipperbent over 6 years ago

  • Cleanup and optimisations.
pecee-pixie - Version 4.7.1

Published by skipperbent over 6 years ago

  • Fixed table method not returning instance when argument is null.
  • Minor optimisations (simplified code).
pecee-pixie - Version 4.7.0

Published by skipperbent over 6 years ago

  • Added new overwriting feature to QueryBuilderHandler.
  • Added test.sql for custom unit-test tables.
  • Updated readme to with new query-overwriting feature.
  • Changed required PHP version from 7.2 to 7.1.
  • Added proper PDOStatement closing in QueryBuilderHandler.
  • Optimisations.

Release notes

PHP version has been changed from version 7.2 to 7.1

pecee-pixie - Version 4.6.0

Published by skipperbent over 6 years ago

  • Fixed count method so it counts all rows in query with no exceptions (issue: #75 - thanks @mrcnpdlk)
  • Added new aggregate-methods (sum, average, min and max) to QueryBuilderHandler.
  • Simplified aggregate method in QueryBuilderHandler.
  • Updated code-syntax to PHP 7.2.
  • Added unit-tests for new functionality.
  • Updated composer dependencies.
  • Updated documentation to reflect new changes.

Release notes

This release requires PHP 7.2 or higher

pecee-pixie - Version 4.5.1

Published by skipperbent over 6 years ago

  • Cleaned up Transaction class and simplified the statement method.
  • Changed QueryObject to contain instance of Connection instead of instance of the Pdo class as this has more features.
  • Cleaned up files and removed newlines.
pecee-pixie - Version 4.5.0

Published by skipperbent over 6 years ago

  • Added better ExceptionHandling thanks to @mrcnpdlk - pecee-pixie will now try to parse the error code and throw a matching Exception, which may help out when debugging. This will not cause any chances to existing code, as they all inherit from the base Exception class from earlier versions.

  • Added better connection handling. It's now possible to close the connection using the close method in the Connection class. The library will try to reconnect using stored credentials if the connection is established afterwords. This is especially useful for controlling open connections in beanstalkd scripts or long-running scripts where open connections can cause issues.

  • Added new unit tests for new ExceptionHandling feature.

  • Updated and cleaned the documentation.

  • A bunch of optimisations and bugfixes.

pecee-pixie - Version 4.4.1

Published by skipperbent over 6 years ago

  • Added support for removing table from query by calling table() with no argument.
  • Minor updates to the documentation.
pecee-pixie - Version 4.4.0

Published by skipperbent over 6 years ago

  • Added new EventArguments class.
  • Moved EventHandler class to new namespace: \Pecee\Pixie\Event\EventHandler.
  • Simplified arguments for event callbacks by using the new EventArguments class as the only parameter.
  • Added support for unions in QueryBuilderHandler.
  • Added shortcut for registerEvent in Connection class.
  • Updated documentation to reflect new changes.
  • Added unit-tests for new sql-union functionality.
  • Minor optimisations + cleanup.

Release notes

This release contains changes that might break your project. Please read the release notes carefully before updating in a production environment.

  • Moved EventHandler class to new namespace: \Pecee\Pixie\Event\EventHandler.
    Please change all class references for \Pecee\Pixie\EventHandler to the new namespace \Pecee\Pixie\Event\EventHandler.

  • Simplified arguments for event callbacks by using the new EventArguments class as the only parameter.
    Event callbacks no longer have an insane amount of parameters. Instead it only returns a EventArguments object which contains all information for the event.

Example:

$qb->registerEvent(EventHandler::EVENT_AFTER_DELETE, 'my_table', function(EventArguments $arguments)
{
    $bindings = $arguments->getQuery()->getBindings();
    
    $arguments
        ->getQueryBuilder()
        ->table('person_details')
        ->where('person_id', $binding[0])
        ->delete();
});

Please refer to the documentation for more info.

pecee-pixie - Version 4.3.0

Published by skipperbent over 6 years ago

  • Events now fires properly when executing raw queries.
  • Added new event for raw queries.
  • EventHandler now returns parameters for events in a better order.
  • Fixed lastQuery not being availible in some instances when using select.
  • Fixed types and phpDocs.

Release note

  • This release has changed the order of the parameters for events. The order is now: QueryObject, QueryBuilderHandler, ... other params if available like start time, etc.
pecee-pixie - Version 4.2.6

Published by skipperbent over 6 years ago

  • Fixed bool PDO parameters inserting null value when using transactions.
pecee-pixie - Version 4.2.5

Published by skipperbent almost 7 years ago

  • Removed PDOException error-code as it's not an integer which is what exceptions espect.
pecee-pixie - Version 3.6.4

Published by skipperbent almost 7 years ago

  • Removed PDOException error-code as it's not an integer which is what exceptions espect.
pecee-pixie - Version 3.6.3

Published by skipperbent almost 7 years ago

Re-release due to packagist.org error.

  • Exception fixes.
pecee-pixie - Version 4.2.4

Published by skipperbent almost 7 years ago

Re-release due to packagist.org error.

  • Exception fixes.
pecee-pixie - Version 4.2.2

Published by skipperbent almost 7 years ago

  • Changed type for code parameter in Exception class, as some exceptions doesn't provide proper data-type.
pecee-pixie - Version 3.6.1

Published by skipperbent almost 7 years ago

  • Removed PHP7 stuff.