1. A method comprising: receiving source code comprising an application programming interface (API) defined query written to communicate with an API, the API configured to provide access to an object relational model (ORM) for converting, during execution of the source code, the API defined query into a dynamic structured query language (SQL) query comprising SQL statements, wherein the API defined query in the source code comprises one or more names of tables of a database; before execution of the source code, performing static analysis of the source code to locate the API defined query and to determine the one or more names of tables of the located API defined query; before execution of the source code, scanning the located API defined query in the source code to determine a respective set of restrictions that are defined in the source code for each of the one or more named tables of the API defined query; before execution of the source code, determining contents of the SQL statements based on the one or more names of tables and respective sets of restrictions, the determining based on the API defined query, to the API, and to the ORM; before execution of the source code, generating a static SQL query comprising the SQL statements, the generating performed by a computer prior to the source code being executed, the generating based on the source code, to the ORM, and to the API; before execution of the source code, pre-compiling, binding and compiling the generated static SQL query into an execution plan comprising machine executable code corresponding to the generated static SQL query; and during execution of the source code, locating the execution plan comprising the machine executable code corresponding generated static SQL query and executing the execution plan in place of the API defined query.