doytowin/doyto-query
57.8
Adequate · 21 September 2026
10.5k
lines of production code
Java
primary language
4
measurements over time
What this system is
Doyto Query is a Java framework that simplifies data access by generating SQL and handling database interactions through annotations and a fluent API. It provides a unified interface for CRUD operations, complex aggregations, and spatial queries across multiple SQL databases, while also supporting MongoDB. The system integrates with Spring Boot to offer automatic configuration, web-layer validation, and caching capabilities.
How it got here
2019–2021 — Doyto Query 2.0 modularization
30 changes.
The project underwent a significant architectural shift, reorganizing the codebase into a multi-module Maven structure with distinct layers for API, SQL, JDBC, and web components. This period introduced a comprehensive set of new annotations, core interfaces, and utility classes to support advanced query building, aggregation, and caching features.
2022 — Spring Boot auto-configuration and web layer expansion
20 changes.
This period focused on integrating the library with the Spring Boot ecosystem through auto-configuration for JDBC access and web components. It introduced new features for geographic queries and web-layer validation, while significantly expanding test coverage for configuration, error handling, and domain path processing.
2023–2024 — SQL dialect and row mapper expansion
9 changes.
This period focused on expanding database compatibility by adding SQL dialects for multiple RDBMS platforms and introducing new JDBC row mapper implementations. The work included refactoring SQL field processing logic and adding comprehensive test coverage for the new features.
Features
Add GeoJSON deserialization support for multiple geometry types
The doyto-query-common module now includes new deserializers (GeoShapeDeserializer, PointDeserializer) that enable parsing of various GeoJSON geometry types, including Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. This allows the library to deserialize these standard GeoJSON shapes into internal model classes, supporting more complex spatial data handling in queries.
doyto-query-common/src/main/java/win/doyto/query/geo · high confidence
Add geo-spatial query model classes
The doyto-query-geo module now includes a new set of Java classes that define the data structures for geographic queries. This includes the GeoShape interface and GeoType constants, along with concrete model classes for Point, Box, Circle, and various GeoJSON geometry types (GeoPoint, GeoPolygon, GeoLine, GeoMultiPoint, GeoMultiLine, GeoMultiPolygon, and GeoCollection). These classes provide the necessary data models to support geographic search and spatial filtering capabilities.
doyto-query-geo · high confidence
Added SQL dialects for HSQLDB, MySQL 8, Oracle, PostgreSQL, SQL Server, and SQLite
The library now supports pagination, insert-ignore, and multi-generated-key features for HSQLDB, MySQL 8, Oracle, PostgreSQL, SQL Server, and SQLite. Each database has a dedicated dialect class implementing the Dialect interface, enabling correct SQL generation for paging (e.g., LIMIT/OFFSET, ROWNUM, or OFFSET/FETCH), handling upserts (e.g., ON CONFLICT, INSERT OR IGNORE), and resolving generated keys. Corresponding unit tests verify the SQL output for each dialect.
doyto-query-dialect · high confidence
Added cache wrapper and proxy infrastructure
Introduced a new caching layer in the \doyto-query-web\ module, comprising \CacheInvoker\, \CacheProxy\, \CacheUtil\, \CacheWrapper\, and \DefaultCacheWrapper\. This adds a functional interface for cache operations, a dynamic proxy to wrap \Cache\ instances with error logging and null-return on failure, a utility for executing cache lookups with a thread pool for background writes, and a wrapper that conditionally applies the proxy based on the \GlobalConfiguration\ setting \ignoreCacheException\.
doyto-query-web/src/main/java/win/doyto/query/cache · high confidence
Added test data and schema for the doyto-query-test module
Added new resource files to the doyto-query-test module to support testing. This includes schema.sql defining database tables (t\_user, t\_menu, t\_role, t\_perm, and their association tables) and data.sql populating them with test data. Additionally, logback-spring.xml was added to configure logging for the test profile, and role.json provides role data for testing purposes.
doyto-query-test/src/main/resources · high confidence
Adds validation and error-handling components for query parameters
The library introduces new components in the web layer to improve input validation and error reporting. A \NotEmptyQuery\ annotation and its \NotEmptyQueryValidator\ enforce that query objects contain at least one valid parameter, preventing empty or invalid requests. A \CollectionValidator\ ensures that collections passed as arguments are validated element-by-element, providing detailed error feedback. Additionally, a \CommonExceptionHandler\ and \ErrorCodeI18nService\ standardize how validation failures and other web-layer exceptions are caught, translated into localized error codes, and returned to the client.
doyto-query-web-common/src/main/java/win/doyto/query/web/component · high confidence
Doyto Query API 2.0 introduces new annotations for SQL mapping and query composition
The Doyto Query API 2.0 release adds a comprehensive set of new annotations to the \win.doyto.query.annotation\ package, enabling more expressive SQL mapping and query building. Key additions include \@Case\ for conditional SQL clauses, \@Clause\ for custom SET operations, \@Entity\ and \@EntityType\ to replace JPA-specific annotations like \@MongoEntity\, and \@ForeignKeys\ for managing relationships. The update also introduces \@SubqueryV2\, \@GroupBy\, \@Join\, and \@ViewType\ to support advanced query structures such as nested views, subqueries, and various join types, while renaming \@View\ to \@CompositeView\ to better reflect its aggregation purpose.
doyto-query-api/src/main/java/win/doyto/query/annotation · high confidence
Enable automatic JDBC data access via Spring Boot auto-configuration
The library now registers itself with Spring Boot's auto-configuration mechanism. A new \META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports\ file declares \DataQueryClientAutoConfiguration\, and a \META-INF/services/win.doyto.query.service.DataAccessFactory\ file registers \JdbcDataAccessFactory\. This allows the JDBC data access capabilities to be automatically discovered and initialized by Spring Boot without manual configuration.
doyto-query-jdbc/src/main/resources · high confidence
Introduce JDBC implementation for Doyto Query 2.0
The \doyto-query-jdbc\ module now provides a complete JDBC-based implementation of the Doyto Query 2.0 API. This includes new classes such as \JdbcDataAccess\, \JdbcDataQueryClient\, \JdbcAssociationService\, and \JdbcDatabaseOperations\, which handle relational data access, complex join queries, and association management using raw JDBC operations. The \DatabaseOperations\ interface and \TransactionExecutor\ abstraction allow for flexible transaction management, supporting features like custom row mappers, aggregate queries, and multi-row insert key generation across different database dialects.
doyto-query-jdbc/src/main/java/win/doyto/query/jdbc · high confidence
New base entity hierarchy and validation groups for audit and persistence
The \doyto-query-api\ module introduces a new base entity hierarchy (\AbstractPersistable\, \AbstractEntity\, \AbstractCommonEntity\) that provides generic support for auto-managing \createUserId\, \updateUserId\, \createTime\, and \updateTime\ fields. This is paired with new validation groups (\CreateGroup\, \UpdateGroup\, \PatchGroup\) and interfaces (\CreateUserAware\, \UpdateUserAware\, \UserIdProvider\) that enable automatic population of audit fields during create and update operations.
doyto-query-api/src/main/java/win/doyto/query/entity · high confidence
New core query and aggregation interfaces
The \doyto-query-api\ module introduces a new set of core interfaces to support aggregation queries, data access, and query building. New interfaces include \AggregateClient\ and \AggregateChain\ for building and executing aggregation queries, \DataQueryClient\ for standard data queries, and \DataAccess\ for general CRUD operations. The \DoytoQuery\ interface now includes methods for paging, sorting, and locking, while \PageQuery\ provides a concrete implementation with page and size management. Additional support is added for composite IDs (\CompositeId\), optimistic and pessimistic locking (\LockMode\, \OptimisticLock\), and association management (\AssociationService\). The \QuerySuffix\ enum is expanded to support various query conditions, and \AggregationPrefix\ handles aggregation function prefixes.
doyto-query-api/src/main/java/win/doyto/query/core · high confidence
New response advice and sort argument resolver components
Added JsonResponseAdvice to automatically wrap controller return values in a standardized JSON response structure, and introduced SortArgumentResolver to parse and validate sort parameters from HTTP requests, supporting both simple column names and complex format key=value expressions. These components enable consistent API response formatting and flexible sorting capabilities for query endpoints.
doyto-query-web/src/main/java/win/doyto/query/web/component · high confidence
New response and error handling types for the web layer
The \doyto-query-web-common\ module now includes a new set of classes in the \win.doyto.query.web.response\ package to standardize API responses and error handling. This includes the \JsonResponse\ and \ErrorResponse\ models for structuring JSON payloads, the \ErrorCode\ interface and \ErrorCodeException\ for managing error states, and the \PresetErrorCode\ enum for common error codes. These additions provide a consistent way to return data and handle validation or business errors in the web layer.
doyto-query-web-common/src/main/java/win/doyto/query/web/response · high confidence
New row mapper implementations and interfaces in the JDBC module
The \doyto-query-jdbc\ module introduces a new \rowmapper\ package containing several new classes and interfaces to handle JDBC result sets. This includes the \RowMapper\ and \ResultSetExtractor\ functional interfaces, along with concrete implementations such as \BeanPropertyRowMapper\ (which maps SQL columns to Java bean properties, supporting snake\_case, camelCase, and custom labels), \ColumnMapRowMapper\ (which maps rows to \Map\<String, Object\>\), \SingleColumnRowMapper\ (for extracting a single column), and \JoinRowMapperResultSetExtractor\ (for handling joined query results).
doyto-query-jdbc/src/main/java/win/doyto/query/jdbc/rowmapper · high confidence
New web configuration components and initializers
The web module now includes a new DoytoQueryInitializer that configures global settings such as join ID/table/table formats, start page number, camel-case mapping, cache exception handling, and dialect via environment properties. Additionally, the web layer gains a GeoShapeEditor for parsing GeoShape objects, an InjectBean annotation with a corresponding BeanPostProcessor to autowire annotated fields, a SortFieldsProperties class to manage sort field prefixes and mappings, and a WebComponentsConfiguration that registers these components along with an internationalized error code service.
doyto-query-web-common/src/main/java/win/doyto/query/web/config · high confidence
Spring Boot auto-configuration for JDBC query client
The library now provides Spring Boot auto-configuration for the JDBC query client. New configuration classes (DataQueryClientAutoConfiguration, DataQueryClientConfiguration, DatabaseOperationsConfiguration) automatically register the DataQueryClient and DatabaseOperations beans when Spring Boot and a DataSource are present, simplifying setup for Spring-based applications.
doyto-query-jdbc/src/main/java/win/doyto/query/jdbc/autoconfigure · high confidence
Behavioural changes
Added error message properties for common web module
New resource files (error.properties and error\_zh\_CN.properties) were added to the doyto-query-web-common module, defining localized error messages for scenarios such as internal errors, validation failures, and file upload limits.
doyto-query-web-common/src/main/resources · high confidence
Global configuration and default paging behavior updated
The GlobalConfiguration class has been refactored to centralize query-related settings, introducing configurable formats for table names, join IDs, and join tables, alongside a new SimpleDialect that uses standard LIMIT/OFFSET pagination syntax. Additionally, the library now defaults to starting page numbers from ONE, meaning the first page is 1 instead of 0, which changes how pagination is calculated in queries.
doyto-query-common/src/main/java/win/doyto/query/config · high confidence
Improved web layer configuration and error handling
The web module now includes a new WebMvcConfigurerAdapter that configures Jackson's ObjectMapper with specific date formatting (yyyy-MM-dd HH:mm:ss), timezone (GMT+8), and media types, while also removing duplicate HTTP message converters. Additionally, a new HttpUtil class provides case-insensitive header retrieval and JSON error response writing, enhancing i18n support and fixing garbled message issues.
doyto-query-web/src/main/java/win/doyto/query/web · high confidence
New configuration options for table naming and sorting
The framework now exposes several new configuration properties in Spring Boot's externalized configuration. Users can now customize table naming patterns with 'doyto.query.config.table-format' and 'doyto.query.config.join-table-format', as well as 'doyto.query.config.join-id-format'. Additionally, the 'doyto.query.config.sort-prefix' and 'doyto.query.config.sort-fields-map' properties allow for configurable sorting behavior, while 'doyto.query.config.map-camel-case-to-underscore' controls field name mapping. These changes enable more flexible database table naming and sorting strategies.
doyto-query-web-common/src/main/resources/META-INF · high confidence
Refactor service layer with decorator pattern and SPI-based DataAccess
The service layer in \doyto-query-web\ has been restructured to use a decorator pattern for cross-cutting concerns like caching, user ID injection, and entity aspects. \AbstractDynamicService\ now constructs the \DataAccess\ chain at runtime via \DataAccessManager\, which uses Java SPI to load \DataAccessFactory\ implementations. New classes include \AspectDataAccess\, \CachedDataAccess\, and \UserIdDataAccess\ to wrap the core \DataAccess\ logic. This change also introduces \AbstractCrudService\ and \CrudService\ interfaces, and moves memory-based data access logic into \MemoryDataAccess\. The refactoring aims to improve modularity and support for multiple data access strategies (e.g., SQL, Mongo) through a unified service interface.
doyto-query-web/src/main/java/win/doyto/query/service · high confidence
Refactored SQL field processing with new processor classes
The \doyto-query-sql\ module has been refactored to use a new \FieldProcessor\ interface and a suite of specialized processor classes (e.g., \ColumnFieldProcessor\, \OrFieldProcessor\, \SubqueryProcessor\) to handle different query field types. This change reorganizes how SQL conditions are built for various field types, including collections, subqueries, and domain paths, while maintaining the same external API for query objects.
doyto-query-sql/src/main/java/win/doyto/query/sql/field · high confidence
Refactored SQL query building with new builder classes
The SQL query building logic has been refactored into new dedicated builder classes: \AggregateQueryBuilder\ for handling aggregate queries with \WITH\ and nested views, \AssociationSqlBuilder\ for managing join table operations like insert, delete, and count, and \RelationalQueryBuilder\ for standard relational queries. These changes restructure how SQL is generated for entity metadata, join conditions, and subdomains, while also introducing \CompoundOperatorsSuffix\ to support arithmetic suffixes (e.g., \+\, \-\, \\*\, \/\) in field names.
doyto-query-sql/src/main/java/win/doyto/query/sql · high confidence
Refactored common utility classes for query processing
The \doyto-query-common\ module introduces new utility classes \BeanUtil\, \ColumnUtil\, and \CommonUtil\ to handle bean serialization, column resolution, and common string/field operations. \BeanUtil\ now manages Jackson \ObjectMapper\ configuration, including support for Java 8 date/time types and GeoJSON deserialization. \ColumnUtil\ provides methods to filter and resolve entity fields, handling annotations like \@DomainPath\ and \@Id\. \CommonUtil\ offers string manipulation and field reflection utilities, including \escapeLike\ for wildcard escaping. These changes streamline the internal implementation of query generation and data mapping.
doyto-query-common/src/main/java/win/doyto/query/util · high confidence
Refactored controller hierarchy with new base classes and validation
The controller layer has been restructured with new abstract base classes (AbstractController, AbstractRestController, AbstractDynamicController, AbstractEIQController) that enforce stricter controller definitions and add validation for request objects in patch, update, and delete operations. This introduces validation groups (CreateGroup, UpdateGroup, PatchGroup, PageGroup) to the REST API interface, ensuring that request bodies are validated according to the specific HTTP method being used.
doyto-query-web/src/main/java/win/doyto/query/web/controller · high confidence
Refactored domain path processing with new Relation and DomainPathDetail classes
The library has introduced new \Relation\ and \DomainPathDetail\ classes in the \win.doyto.query.relation\ package to handle domain path transformations. \DomainPathDetail\ now manages the conversion of domain paths to join tables, utilizing \GlobalConfiguration\ for table formatting and join table registration. \Relation\ encapsulates foreign key and associative table information, supporting directional relationships via \-\>\ and \\<-\ syntax. This refactoring simplifies the internal processing of \@DomainPath\ annotations, enabling more flexible and configurable join table generation for many-to-one and one-to-many relationships.
doyto-query-common/src/main/java/win/doyto/query/relation · high confidence
Updated project documentation and configuration files
The repository's root-level documentation has been significantly expanded and modernized. The English README.md has been replaced with a comprehensive guide including SonarCloud badges, a detailed quick-start section with Java and XML code examples, architecture diagrams, and a module version table. A new Chinese translation (README\_zh.md) has been added. Additionally, a lombok.config file was introduced to configure Lombok's annotation generation behavior, and the .gitignore file was updated to include standard build and IDE directories.
(repo-wide) · high confidence
Test coverage
Add integration test configuration files for multiple database backends; Added English localization for argument type mismatch error; Added RoleRowMapper test class; Added TPC-H benchmark test suite; Added demo application and test utilities for integration testing; Added embedded MongoDB configuration for integration tests; Added integration test for RoleController; Added integration tests for the demo application's web layer; Added integration tests for the menu module; Added test coverage for JDBC query and association services; Added test coverage for web validation, application configuration, and error codes; Added test domain models and query classes for user-related scenarios; Added test entities and queries for menu hierarchy and user associations; Added test entities and queries for permission and user relationships; Added test entities and queries for the role module; Added test fixtures for dynamic and standard query scenarios; Added test fixtures for menu entity and request models; Added test for custom QueryBuilder implementation; Added test stubs for the RoleController; Added tests for DomainPathDetail and relation processing; Added tests for GeoShape deserialization and construction; Added tests for GlobalConfiguration behavior; Added tests for SQL query builders and helpers; Added tests for web component validation and error handling; Added unit and integration tests for cache, service, and web components; Added unit tests for AggregationPrefix and PageQuery; Added unit tests for BeanPropertyRowMapper; Added unit tests for DoytoQueryInitializer configuration; Added unit tests for SQL field processors; Added unit tests for query utility classes; Added user module test fixtures for integration testing.
Dependencies
DoytoQuery 2.1.2-SNAPSHOT: New modules and Spring Boot 3.5.8 upgrade
The DoytoQuery library has been restructured into a multi-module Maven project (version 2.1.2-SNAPSHOT) with a new parent POM that upgrades the Spring Boot base to 3.5.8. This change introduces several new sub-modules to better organize the codebase: \doyto-query-api\ for core APIs, \doyto-query-common\ for shared utilities, \doyto-query-sql\ for SQL mapping, \doyto-query-web-common\ for web integration, \doyto-query-web\ for the web layer, \doyto-query-jdbc\ for SQL execution, \doyto-query-dialect\ for database-specific dialects, \doyto-query-geo\ for geographic data structures, and \doyto-query-test\ for testing utilities. The parent POM also updates the \flatten-maven-plugin\ to version 1.6.0 and configures test resources and compiler settings for the new module structure.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 63 → 58 (-5.0)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 90 (-9.8)
- Maturity 77 → 70 (-6.7)
- Readiness 66 → 68 (+2.3)
- Security 47 → 39 (-8.1)
Resolved (9)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (7 lines × 2) (doyto-query-sql/src/main/java/win/doyto/query/sql/field/CollectionProcessor.java)
- No exposed public API
- Scanner failed to run — not a clean result
- Small-team knowledge concentration
- Test reliability not included
- The architecture migration doc lists each version's change but does not explain what new features or breaking changes were introduced in each release. (docs/README.md)
- The quick start omits any code example showing how to define an entity/view object and call the query API. (README.md)
New (51)
- Boundary-crossing change coupling: QuerySuffix.java ↔ SqlQuerySuffix.java (doyto-query-api/src/main/java/win/doyto/query/core/QuerySuffix.java)
- Coverage not measured — no coverage collector is wired up
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Dormant codebase
- Duplicated block (8 lines × 2) (doyto-query-sql/src/main/java/win/doyto/query/sql/field/CollectionProcessor.java)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 31 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
doytowin/doyto-query was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0166d952dc60652b9e56abef4a75cb6fedbd7404 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.