Skip to content

Commit 7f9ce40

Browse files
committed
Merge branch 'master' into motranslator
2 parents a06ebff + 0c5d875 commit 7f9ce40

File tree

17 files changed

+210
-128
lines changed

17 files changed

+210
-128
lines changed

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/tests export-ignore
2+
/tools export-ignore
3+
.gitattributes export-ignore
4+
.gitignore export-ignore
5+
.travis.yml export-ignore
6+
codeconv.yml export-ignore
7+
phpunit.xml export-ignore
8+
.php_cs export-ignore

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
## [Unreleased]
44

5+
* Coding style fixes.
6+
* Fixed indentation in HTML formatting.
7+
* Fixed parsing of unterminated variables.
8+
9+
## [3.4.16] - 2017-01-06
10+
11+
* Coding style fixes.
12+
* Properly handle operators AND, NOT, OR, XOR, DIV, MOD
13+
514
## [3.4.15] - 2017-01-02
615

716
* Fix return value of Formatter.toString() when type is text
817
* Fix parsing of FIELDS and LINES options in SELECT..INTO
918
* PHP 7.2 compatibility.
1019
* Better parameter passing to query formatter.
11-
* Coding style fixes.
1220

1321
## [3.4.14] - 2016-11-30
1422

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ $parser->statements[0]->from[0] = $table2;
7777
$statement = $parser->statements[0];
7878
$query2 = $statement->build();
7979
var_dump($query2); // outputs string(19) "SELECT * FROM `b` "
80+
81+
// Change SQL mode
82+
SqlParser\Context::setMode('ANSI_QUOTES');
83+
84+
// build the query again using different quotes
85+
$query2 = $statement->build();
86+
var_dump($query2); // outputs string(19) "SELECT * FROM "b" "
8087
```
8188

8289
## More information

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@
3232
"psr-4": {
3333
"SqlParser\\": "src"
3434
}
35+
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"SqlParser\\Tests\\": "tests"
39+
}
3540
}
3641
}

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4-
bootstrap="tests/bootstrap.php"
4+
bootstrap="vendor/autoload.php"
55
colors="true"
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"

src/Components/Expression.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Expression extends Component
3030
*/
3131
private static $ALLOWED_KEYWORDS = array(
3232
'AS' => 1, 'DUAL' => 1, 'NULL' => 1, 'REGEXP' => 1, 'CASE' => 1,
33+
'DIV' => 1, 'AND' => 1, 'OR' => 1, 'XOR' => 1, 'NOT' => 1, 'MOD' => 1,
3334
);
3435

3536
/**

0 commit comments

Comments
 (0)