Exception class: Fixed issue causing notice when error has no message defined.".$query->join('hostnames', 'host', '=', $this->raw('?', [$host]))
SqlServer class.EventHandler::registerEvent so optional $table parameter comes after required.Raw bindings not set properly when using within select statement like: select($this->builder->raw('CONCAT(simple, ?)', ['criteria'])).$table parameter in EventHandler::registerEvent to use EventHandler::ANY constant instead of null.BaseAdapter & SqlServerAdapter.Raw bindings not being set properly on some occasions for instance update(['alias' => $query->raw('?',['value'])]).BaseAdapter code by using arrayStr instead of foreach loops.QueryBuilderBehaviorTest::testRawStatementsWithinCriteria.prefix property to aliasPrefix in QueryBuilderHandler__toString magic methods.FOR UPDATE using the QueryBuilderHandler::for method.Connection::getStoredConnection.COUNT (issue #91).Raw instances (issue: #92).$columns argument to delete method in QueryBuilderHandler to specify which columns to delete.ON statement from the query.getTable returning raw-query instead of null on subQuery-tables.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.
$storedConnection was overwritten in Connection class.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.
table method not returning instance when argument is null.QueryBuilderHandler.test.sql for custom unit-test tables.PDOStatement closing in QueryBuilderHandler.PHP version has been changed from version 7.2 to 7.1
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
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.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.
How can I help you explore Laravel packages today?