Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
4.0.0
-
Security Level: Public
-
Sherlock Build 1891 on Debian 7
Description
N1QL needs better syntax error messages.. If I include a FROM clause after a WHERE clause when it is supposed to be before I get this error..
500: Internal Server Error
{
"requestID": "19ad97c5-ebde-4229-85d2-249253ae102d",
"errors": [
],
"status": "fatal"
}
Compare this error to MySQL 5.6...
CREATE TABLE people
(`first` varchar(5), `last` varchar(5), `age` int)
;
INSERT INTO people
(`first`, `last`, `age`)
VALUES
('joe', 'blogs', 23),
('mary', 'smith', 25),
('chris', 'jones', 21)
;
Now if I query it with,
select * where age='23' from people;
I get
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where age='23' from people' at line 1
It gives a descriptive error helping to point out the mistake.