LPS-42551

Hi Ivan, Looks good. I made few minor cleanups and got rid of old code I don't think is needed anymore. One thing I noticed is that if someone writes a query like "test's multiple" (without the double quotes) it will potentially generate invalid query because the single quote is not escaped. Can you add a test for that and add proper escaping. Other than that very good job.