Patent Document ID: 9146957
Application ID: 13721601

Base Claim:
1. A method of transforming a query at a web server, the method comprising: traversing, at the web server, an abstract syntax tree representing the query, for each node in the abstract syntax tree: setting a conjunct position field in a data structure corresponding to the node as true when the node's parent is a WHERE node; setting a conjunct position field in a data structure corresponding to the node as false when the node's parent is an OR node; setting a conjunct position field in a data structure corresponding to the node as identical to a conjunct position field in a data structure corresponding to the node's parent node when the node's parent is an AND node; transforming any IN node in the abstract syntax tree to an INNER JOIN node when the conjunct position field in the data structure corresponding to the IN node is set as true; converting the abstract syntax tree into a Structured Query Language (SQL) query; and transmitting the SQL query to a database for processing.

---

Claim 2:
2. The method of claim 1 , further comprising: receiving the query from a web client; transforming the query into an ActiveRecord query domain specific language abstract syntax tree; and the converting including converting an ActiveRecord query domain specific language abstract syntax tree into the SQL query.