# US 2011/0035396 A1 · Runtime-defined dynamic queries

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2011/0035396 A1
- Document ID: US20110035396A1
- Status: Published application
- Kind: A1
- Application number: 12/535,688
- Filed: 2009-08-05
- Published: 2011-02-10
- Earliest claimed: 2009-08-05
- Assignees: Microsoft Corporation
- Inventors: Michael Merz; Alexander N. Samoylenko
- Web page: https://patentgrep.com/patent/US20110035396A1

## CPC

- G06F 16/245: Query processing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A programming model for a query service (e.g., web) that supports defining query builders which are bound dynamically at runtime to parameter values. Moreover, the programming model can be used to customize the query execution, for example, by adding pre-processing, post-processing, or dynamic binding to queries (e.g., selecting the query to be executed dynamically at runtime). As a consequence, generalized and parameterized queries can be used (with different runtime values for parameters) in different scenarios.

## Claims

### Claim 1

A computer-implemented query system, comprising:
one or more query builders for generating a query at runtime, the one or more query builders each associated with query parameters; and
a query service for accessing a query builder for a consumer and returning query results to the consumer based on the associated query parameters.

### Claim 2 (depends on 1)

The system of claim 1, wherein the query builder is bound dynamically at runtime to generate the query.

### Claim 3 (depends on 1)

The system of claim 1, wherein the parameters of the query builder are bound dynamically at runtime.

### Claim 4 (depends on 1)

The system of claim 1, wherein the query builder includes a method that stores the parameters for use by other methods.

### Claim 5 (depends on 1)

The system of claim 1, wherein the query builder includes a method that initializes an instance of a custom query builder for passing custom parameters.

### Claim 6 (depends on 1)

The system of claim 1, wherein the query builder includes a method that retrieves the query at runtime.

### Claim 7 (depends on 1)

The system of claim 1, wherein the query builder includes a method that retrieves the query results for return to the consumer.

### Claim 8 (depends on 1)

The system of claim 1, further comprising a custom query builder that is initialized at runtime to input custom query parameters to the query builder as a replacement for the query parameters.

### Claim 9

A computer-implemented query system, comprising:
a query builder for generating a query at runtime, the query builder associated with query parameters, the query, and a query run;
a custom query builder associated with the query builder that is optionally initialized at runtime to input custom query parameters to the query builder as replacements for the query parameters; and
a query service for accessing the query builder for a consumer and returning query results to the consumer based on the query parameters or the custom query parameters.

### Claim 10 (depends on 9)

The system of claim 9, wherein the query parameters or the custom query parameters of the query builder are bound dynamically at runtime.

### Claim 11 (depends on 9)

The system of claim 9, wherein the query builder includes a method that stores the query parameters for use by other methods and a method that initializes an instance of the custom query builder.

### Claim 12 (depends on 9)

The system of claim 9, wherein the query builder includes a method that retrieves the query at runtime and a method that retrieves the query results of the query run for return to the consumer.

### Claim 13 (depends on 9)

The system of claim 9, wherein the query parameters or the custom query parameters are employed at runtime to generate the query, which query is created by modifying a selected query.

### Claim 14 (depends on 9)

The system of claim 9, wherein the query and the query run are created dynamically at runtime.

### Claim 15

A computer-implemented query method, comprising:
defining a query builder and associated query parameters;
accessing the query builder in response to a query request;
building a concrete query at runtime based on the query parameters; and
returning query results for the query at runtime.

### Claim 16 (depends on 15)

The method of claim 15, further comprising defining a custom query builder in association with the query builder for dynamic creation of a custom query based on custom parameters.

### Claim 17 (depends on 15)

The method of claim 15, further comprising passing in the query parameters at runtime.

### Claim 18 (depends on 15)

The method of claim 15, further comprising providing a query service via which the query builder is selected and arguments are passed in response to the request, the request from a consumer application.

### Claim 19 (depends on 18)

The method of claim 18, wherein the query service interfaces to multiple different query builders for building corresponding queries at runtime.

### Claim 20 (depends on 15)

The method of claim 15, further comprising binding the parameters only at runtime to dynamically create the concrete query.
