Lightweight, easy-to-use querybuilder for PHP inspired by Laravel Eloquent - but with less overhead.
MIT License
Bot releases are visible (Hide)
Published by skipperbent over 6 years ago
getTable
returning raw-query instead of null
on subQuery-tables.Published by skipperbent over 6 years ago
joinUsing
method to QueryBuilderHandler
class (issue #85 - thanks to @Fishy49).using
and orUsing
to JoinBuilder
class.buildCriteria
method in BaseAdapter
class.buildCriteria
method in BaseAdapter
class.join
method which was incorrectly using LEFT JOIN as default type.joinUsing
functionality.orUsing
as it's not supported by sql.JoinBuilder
.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.
Published by skipperbent over 6 years ago
$storedConnection
was overwritten in Connection
class.Published by skipperbent over 6 years ago
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.
Published by skipperbent over 6 years ago
Published by skipperbent over 6 years ago
table
method not returning instance when argument is null.Published by skipperbent over 6 years ago
QueryBuilderHandler
.test.sql
for custom unit-test tables.PDOStatement
closing in QueryBuilderHandler
.PHP version has been changed from version 7.2 to 7.1
Published by skipperbent over 6 years ago
count
method so it counts all rows in query with no exceptions (issue: #75 - thanks @mrcnpdlk)sum
, average
, min
and max
) to QueryBuilderHandler
.QueryBuilderHandler
.This release requires PHP 7.2 or higher
Published by skipperbent over 6 years ago
Transaction
class and simplified the statement
method.QueryObject
to contain instance of Connection
instead of instance of the Pdo
class as this has more features.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.
Published by skipperbent over 6 years ago
table()
with no argument.Published by skipperbent over 6 years ago
EventArguments
class.EventHandler
class to new namespace: \Pecee\Pixie\Event\EventHandler
.EventArguments
class as the only parameter.QueryBuilderHandler
.registerEvent
in Connection
class.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.
Published by skipperbent over 6 years ago
QueryObject
, QueryBuilderHandler
, ... other params if available like start time, etc.Published by skipperbent over 6 years ago
Published by skipperbent almost 7 years ago
Published by skipperbent almost 7 years ago
Published by skipperbent almost 7 years ago
Re-release due to packagist.org error.
Published by skipperbent almost 7 years ago
Re-release due to packagist.org error.
Published by skipperbent almost 7 years ago
Exception
class, as some exceptions doesn't provide proper data-type.Published by skipperbent almost 7 years ago