Query Object Mapping for Automated SQL Clause Construction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing object-relational mapping (ORM) technologies require users to write their own codes to construct query clauses, leading to complex coding, difficulty in debugging, and prolonged development times.

Innovation Solution

A query object mapping method that intensively defines query conditions as fields in a query object, mapping these conditions into query clauses using logical operators, simplifying the construction of database query statements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If users write their own codes to construct query clauses in existing ORM technology, then query functionality can be achieved, but coding complexity increases and development time prolongs

Engineering Contradiction:
Improveease of query clause constructionVSAvoidcoding complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The query object automatically generates query clauses by mapping its own fields to SQL conditions. The system serves itself by introspecting the query object's properties and constructing the appropriate WHERE clause conditions without requiring manual SQL writing, thereby reducing coding complexity while maintaining query functionality

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The query object acts as an intermediary between the application layer and the database query construction. It provides a simplified object-oriented interface that automatically translates to SQL query clauses, mediating between user-friendly field definitions and the underlying database query requirements

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If users write their own codes to construct query clauses, then query functionality is achieved, but debugging difficulty increases

Engineering Contradiction:
Improvequery functionalityVSAvoiddebugging difficulty
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The query object automatically generates and executes query clauses based on its field definitions, reducing the gap between intent and execution. This self-service mechanism minimizes manual intervention points where errors could occur, making debugging easier while maintaining query functionality

Inventive Principle:
Principle #25Self-service

3Productivity

If manual coding is used to construct query clauses, then database access can be implemented, but development time increases

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoiddevelopment time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The query object pre-defines all necessary query parameters and field mappings before query execution. By preparing the query structure in advance through object instantiation and field assignment, the system eliminates time-consuming manual SQL construction during runtime, thereby improving development efficiency without sacrificing database access capability

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250321954A1Query object mapping method, device and product
Publication Date: 2025.10.16 XIANGYANG DOYTOWIN SOFTWARE TECHNOLOGY CO LTD
  • US20250321954A1 patent drawing
  • US20250321954A1 patent drawing
  • US20250321954A1 patent drawing

AI summary

A query object mapping method, a device and a product are provided, and a technical field of database access is related to. The method includes: obtaining a query condition corresponding to each assigned field in an instance of a query object by applying an adapted field mapping method; and combining the query conditions into a query clause by using a logical AND operator; thereafter, constructing a complete database query statement based on the query clause, and then completing database access. Compared with the concept of the object-relational mapping (ORM) technology and an entity object in the prior art, the concept of the query object is newly defined, and a query object mapping method is provided. The method is used to map an instance of the query object into the query clause.