diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-07-07 02:00:28 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-07-07 02:43:41 +0300 |
commit | e58d23067743641529348e4a1cc93cf1c73a85a5 (patch) | |
tree | 1098e75ffaa6e0d84a4c400217ec62e6c4a923d4 /tests/Fragments/WhereKeywordTest.php | |
parent | 06c0a645e9d19b1f899c3883ae9b11e5c50bc31e (diff) | |
download | sql-parser-e58d23067743641529348e4a1cc93cf1c73a85a5.zip sql-parser-e58d23067743641529348e4a1cc93cf1c73a85a5.tar.gz sql-parser-e58d23067743641529348e4a1cc93cf1c73a85a5.tar.bz2 |
Improved fragments. New builders available. Refactored some fields.
New query utility to extract the name of the tables used in a statement.
TRUNCATE is being parsed now.
CREATE parsing and building has been improved.
Improved the definition of UPDATE and DELETE statements.
Fixed coding style. Improved documentation and tests.
Diffstat (limited to 'tests/Fragments/WhereKeywordTest.php')
-rw-r--r-- | tests/Fragments/WhereKeywordTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Fragments/WhereKeywordTest.php b/tests/Fragments/WhereKeywordTest.php index e125cf0..ded3a80 100644 --- a/tests/Fragments/WhereKeywordTest.php +++ b/tests/Fragments/WhereKeywordTest.php @@ -15,4 +15,12 @@ class WhereKeywordTest extends TestCase $fragment = WhereKeyword::parse(new Parser(), $this->getTokensList('/* id = */ id = 10')); $this->assertEquals($fragment[0]->expr, 'id = 10'); } + + public function testParseBetween() + { + $fragment = WhereKeyword::parse(new Parser(), $this->getTokensList('(id BETWEEN 10 AND 20) OR (id BETWEEN 30 AND 40)')); + $this->assertEquals($fragment[0]->expr, '(id BETWEEN 10 AND 20)'); + $this->assertEquals($fragment[1]->expr, 'OR'); + $this->assertEquals($fragment[2]->expr, '(id BETWEEN 30 AND 40)'); + } } |