Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
romaninsh committed Mar 15, 2017
2 parents 3d9c79e + 85871ff commit 045322b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ before_script:
- mkdir -p build/logs

script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then CM="phpdbg -qrr"; NC=""; else CM=""; NC="--no-coverage"; fi
#- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then CM="phpdbg -qrr"; NC=""; else CM=""; NC="--no-coverage"; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then CM=""; NC=""; else CM=""; NC="--no-coverage"; fi
- $CM ./vendor/bin/phpunit $NC
- $CM ./vendor/bin/phpunit --configuration phpunit-mysql.xml $NC

after_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then vendor/bin/phpcov merge build/logs/ --clover /build/logs/clover.xml; vendor/bin/test-reporter; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then vendor/bin/phpcov merge build/logs/ --clover cc.xml; vendor/bin/test-reporter --coverage-report cc.xml; fi

notifications:
urls:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.2

- Fix how getDebugQuery() works without sql-formatter
- Fix Query::dsql will return instance of same class if you extend. #116

## 1.1.1

Bugfix and README.md update.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DSQL has been in production since 2006, initially included in [AModules2](https:
[![Gitter](https://img.shields.io/gitter/room/atk4/data.svg?maxAge=2592000)](https://gitter.im/atk4/dataset?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation Status](https://readthedocs.org/projects/dsql/badge/?version=latest)](http://dsql.readthedocs.io/en/latest/?badge=latest)
[![License](https://poser.pugx.org/atk4/dsql/license)](https://packagist.org/packages/atk4/dsql)
[![GitHub release](https://img.shields.io/github/release/atk4/dsql.svg?maxAge=2592000)]()
[![GitHub release](https://img.shields.io/badge/release-1.1.9-brightgreen.png?style=default)](CHANGELOG.md)
[![Build Status](https://travis-ci.org/atk4/dsql.png?branch=develop)](https://travis-ci.org/atk4/dsql)
[![Code Climate](https://codeclimate.com/github/atk4/dsql/badges/gpa.svg)](https://codeclimate.com/github/atk4/dsql)
[![Test Coverage](https://codeclimate.com/github/atk4/dsql/badges/coverage.svg)](https://codeclimate.com/github/atk4/dsql/coverage)
Expand Down Expand Up @@ -173,4 +173,4 @@ frequent topics:

The code of DSQL is available under MIT license with community and [commercial support](http://www.agiletoolkit.org/enterprise) available.

Our team wishes to thanks [Reddit PHP community](https://www.reddit.com/r/PHP/) for feedback and help in creation of this project.
Our team wishes to thanks [Reddit PHP community](https://www.reddit.com/r/PHP/) for feedback and help in creation of this project.
8 changes: 8 additions & 0 deletions docs/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,14 @@ The third argument specifies type of join and defaults to "left" join. You can s

Method can be executed several times on the same Query object.

Joining on expression
`````````````````````

For a more complex join conditions, you can pass second argument as expression::

$q->table('user', 'u');
$q->join('address a', new Expression('a.name like u.pattern'));


Limiting result-set
-------------------
Expand Down
2 changes: 1 addition & 1 deletion phpunit-mysql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
</whitelist>
</filter>
<logging>
<log type="coverage-php" target="build/logs/coverage-mysql.cov"/>
<log type="coverage-clover" target="build/logs/clover-mysql.xml"/>
</logging>
</phpunit>
2 changes: 1 addition & 1 deletion src/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public function getDebugQuery($html = null)
$result = $d; // output as-is
}
if (!$html) {
return strip_tags($result, '<>');
return str_replace('#lte#', '<=', strip_tags(str_replace('<=', '#lte#', $result), '<>'));
}

return $result;
Expand Down
2 changes: 1 addition & 1 deletion src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ public function mode($mode)
*/
public function dsql($properties = [])
{
$q = new self($properties);
$q = new static($properties);
$q->connection = $this->connection;

return $q;
Expand Down

0 comments on commit 045322b

Please sign in to comment.