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 tables of a database; scanning the source code to locate the API defined query and to determine the one or more tables of the located API defined query; 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 tables of the API defined query; determining contents of the SQL statements based on the one or more tables and respective sets of restrictions, the determining responsive to the API defined query, to the API, and to the ORM; and generating a static SQL query comprising the SQL statements, the generating performed by a computer prior to the source code being executed, the generating responsive to the source code, to the ORM, and to the API.