Dynamic return type generation in a database system
AssigneeOracle International Corporation
InventorsAdiel M. Yoaz, Qin Yu, Ravi Murthy, Susan Kotsovolos
Life of this patent
Estimating the term…
Abstract
Dynamic return type generation in a database system. A request is received to execute a first function. A second function is executed if the first function is defined to return data in a first type of data structure. When executed, the second function returns formatting information that indicates an arrangement of fields of data within the first type of data structure. The first function is executed to obtain a collection of data formatted according to the first type of data structure, and the collection of data is organized according to the formatting information returned by the second function.
Claims21
A method of operation within a data processing system, the method comprising:
- before receiving a request to execute a statement that requires computation of a first function, associating the first function with a second function that returns a data type descriptor for the first function;
- receiving a request to execute the statement that requires computation of the first function to return data from a source;
- and
- in response to receiving the request to execute the statement, performing the steps of:
- executing the second function to obtain the data type descriptor that identifies one or more data types of result data that should be returned for the first function;
- registering the one or more data types with a data processing system;
- compiling the statement based on the registered one or more data types;
- executing the first function to obtain the result data;
- storing the result data obtained from the source in a format that reflects the registered one or more data types;
- and
- returning the result data as data in the format of the registered one or more data types;
- and
- wherein the method is performed by one or more computing devices.
A system comprising:
- a processing entity;
- and
- a memory coupled to the processing entity and having program code stored therein which, when executed by the processing entity, causes the processing entity to:
- before receiving a request to execute a statement that requires computation of a first function, associate the first function with a second function that returns a data type descriptor for the first function;
- receive a request to execute the statement that requires computation of the first function included in the program code to return data from a source;
- and
- in response to receiving the request to execute the statement, performing the steps of:
- executing the second function to obtain the data type descriptor that identifies one or more data types of result data that should be returned for the first function;
- registering the one or more data types with a data processing system;
- compiling the statement based on the registered one or more data types;
- executing the first function to obtain the result data;
- and
- storing the result data obtained from the source in a format that reflects the registered one or more data types;
- and
- returning the result data as data in the format of the registered one or more data types.
A volatile or non-volatile computer-readable storage medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to:
- before receiving a request to execute a statement that requires computation of a first function, associate the first function with a second function that returns a data type descriptor for the first function;
- receive a request to execute the statement that requires computation of the first function to return data from a source;
- and
- in response to receiving the request to execute the statement, performing the steps of:
- executing the second function to obtain the data type descriptor that identifies one or more data types of result data that should be returned for the first function;
- registering the one or more data types with a data processing system;
- compiling the statement based on the registered one or more data types;
- executing the first function to obtain the result data;
- and
- storing the result data obtained from the source in a format that reflects the registered one or more data types;
- and
- returning the result data as data in the format of the registered one or more data types.
Dependencies are inferred from the claim text.