The patent badge is an abbreviated version of the USPTO patent document. The patent badge does contain a link to the full patent document.

The patent badge is an abbreviated version of the USPTO patent document. The patent badge covers the following: Patent number, Date patent was issued, Date patent was filed, Title of the patent, Applicant, Inventor, Assignee, Attorney firm, Primary examiner, Assistant examiner, CPCs, and Abstract. The patent badge does contain a link to the full patent document (in Adobe Acrobat format, aka pdf). To download or print any patent click here.

Date of Patent:
Mar. 26, 2024

Filed:

Sep. 14, 2022
Applicant:

Microsoft Technology Licensing, Llc, Redmond, WA (US);

Inventors:

Karthik Saligrama Ramachandra, Bangalore, IN;

Surabhi Gupta, Bangalore, IN;

Sanket Jayant Purandare, Boston, MA (US);

Assignee:
Attorney:
Primary Examiner:
Assistant Examiner:
Int. Cl.
CPC ...
G06F 16/00 (2019.01); G06F 8/41 (2018.01); G06F 8/75 (2018.01); G06F 16/242 (2019.01); G06F 16/2452 (2019.01);
U.S. Cl.
CPC ...
G06F 16/24522 (2019.01); G06F 8/41 (2013.01); G06F 8/75 (2013.01); G06F 16/244 (2019.01);
Abstract

Methods and systems are provided for converting a loop (e.g., a cursor loop) to a declarative Structured Query Language (SQL) query that invokes a custom aggregate function. The loop includes a select query and a loop body that includes a program fragment that can be evaluated over a result set of the select query one row at a time. The system verifies that the loop body does not modify a persistent state of the database. A custom aggregate function that expresses the loop body is automatically constructed according to a contract. An aggregate class comprising aggregation methods of the contract are used to construct the aggregate function based on results of static analysis. The select query is automatically rewritten to form a declarative SQL query that invokes the custom aggregate function. The declarative SQL query may be executed by a database management system (DBMS) SQL server.


Find Patent Forward Citations

Loading…