1. A method of query analysis, comprising: employing at least one processor configured to execute computer-executable instructions stored in memory to perform the following acts: analyzing a query specified with a source programming language with respect to constraints of a target query programming language to determine validity of the query at compile time with a type-based state machine, wherein the type-based state machine is generated as a function of the target query programming language by encoding the constraints of the target query programming language in terms of data types as states and methods as transitions between the states.
1. A method of query analysis, comprising: employing at least one processor configured to execute computer-executable instructions stored in memory to perform the following acts: analyzing a query specified with a source programming language with respect to constraints of a target query programming language to determine validity of the query at compile time with a type-based state machine, wherein the type-based state machine is generated as a function of the target query programming language by encoding the constraints of the target query programming language in terms of data types as states and methods as transitions between the states. 5. The method of claim 1 further comprises signaling an error upon detection of one or more invalid query operators or an invalid pattern of query operators.