5 ms·
it's a bit fragile only due to my laziness, it could be done properly if this were a serious project.
by phpnode 6y ago
it's a bit fragile only due to my laziness, it could be done properly if this were a serious project.
- 3np 6y agoHow would it be done if done properly?
- phpnode 6y agosame mechanism, just deal with more edge cases. e.g. whitespace isn't really trimmed correctly at the moment, it doesn't handle escaping quotes in strings and so on. I did think about trying to match postgres's grammar but it's a lot of work and probably implementing a PEG first would make it easier.