Patent Document ID: 8112383
Application ID: 10776370
Patent Flag: 1

Claim One:
1. A computer-implemented method, comprising: running, on a computer system, a database management system, the database management system configured to process queries generated in a native query language for the database management system; running, on the computer system, a runtime environment configured to manage execution of intermediate language code; establishing a connection to a client, the client associated with a set of database access privileges; receiving, from the client, a query that invokes intermediate language code; compiling by the runtime environment during a runtime of the database management system, the intermediate language code into an expression encoded in the native query language; generating a context object including information comprising the set of database access privileges, a connection context of the client, a command context of the client, a transaction context of the client, a pipe context of the client, and a trigger context of the client; exposing the context object to the database management system through a utilization of an in-process provider, the in-process provider keeps track of data obtained from the database management system that is referenced from the runtime environment and prevents access of the database management data outside a runtime environment execution frame; executing the expression encoded in the native query language based on the context object; and storing information indicative of a result of the query in memory.