{"id":25569722,"url":"https://github.com/doytowin/doyto-query","last_synced_at":"2026-01-11T17:05:34.380Z","repository":{"id":38301394,"uuid":"186226706","full_name":"doytowin/doyto-query","owner":"doytowin","description":"DoytoQuery - A Dynamic Query Language Implemented in Java for Database Access","archived":false,"fork":false,"pushed_at":"2025-07-21T09:52:47.000Z","size":4116,"stargazers_count":41,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T17:49:30.933Z","etag":null,"topics":["crud","ddd","java","oqm","orm","sql"],"latest_commit_sha":null,"homepage":"https://www.doyto.win","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doytowin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["f0rb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-05-12T07:51:34.000Z","updated_at":"2025-07-21T09:51:32.000Z","dependencies_parsed_at":"2023-12-07T09:31:12.075Z","dependency_job_id":"ee7d4cf6-c953-4bb0-90bf-aab1cc1e8200","html_url":"https://github.com/doytowin/doyto-query","commit_stats":null,"previous_names":["f0rb/doyto-query"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/doytowin/doyto-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doytowin%2Fdoyto-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doytowin%2Fdoyto-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doytowin%2Fdoyto-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doytowin%2Fdoyto-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doytowin","download_url":"https://codeload.github.com/doytowin/doyto-query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doytowin%2Fdoyto-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud","ddd","java","oqm","orm","sql"],"created_at":"2025-02-21T00:02:35.270Z","updated_at":"2026-01-11T17:05:34.350Z","avatar_url":"https://github.com/doytowin.png","language":"Java","funding_links":["https://github.com/sponsors/f0rb"],"categories":["数据库开发"],"sub_categories":[],"readme":"[![License](https://img.shields.io/:license-apache-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Sonar Stats](https://sonarcloud.io/api/project_badges/measure?project=win.doyto%3Adoyto-query\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=win.doyto%3Adoyto-query)\n[![Code Lines](https://sonarcloud.io/api/project_badges/measure?project=win.doyto%3Adoyto-query\u0026metric=ncloc)](https://sonarcloud.io/component_measures?id=win.doyto%3Adoyto-query\u0026metric=ncloc)\n[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=win.doyto%3Adoyto-query\u0026metric=coverage)](https://sonarcloud.io/component_measures?id=win.doyto%3Adoyto-query\u0026metric=coverage)\n\nDoytoQuery - A Dynamic Query Language Implemented in Java for CRUD\n---\n\n## Introduction\n\nDoytoQuery implements a dynamic query language which generates query statements from objects.\nEntity/view objects are used to generate table names and columns, \nwhile query/having objects are used to dynamically generate query conditions.\nEach field defined in the query object is used to represent a query condition. \nWhen executing query, the query condition corresponding to the assigned field will be combined into the query clause, \nthereby completing the dynamic construction of SQL statements with entity/view objects.\n\nRefer to the [docs](https://query.docs.doyto.win/) for more details.\n\n## Quick Start\n\n1. Initialize the project on Spring Initializer with the following 4 dependencies:\n* Lombok\n* Spring Web\n* Validation\n* \\[A database driver]\n\n2. Add DoytoQuery dependencies in pom.xml:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ewin.doyto\u003c/groupId\u003e\n    \u003cartifactId\u003edoyto-query-jdbc\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ewin.doyto\u003c/groupId\u003e\n    \u003cartifactId\u003edoyto-query-web\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ewin.doyto\u003c/groupId\u003e\n    \u003cartifactId\u003edoyto-query-dialect\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n3. Define entity and query objects for a table:\n```java\n@Getter\n@Setter\n@Entity(name = \"user\")\npublic class UserEntity extends AbstractPersistable\u003cLong\u003e {\n    private String username;\n    private Integer age;\n    private Boolean valid;\n}\n\n@Getter\n@Setter\n@SuperBuilder\n@NoArgsConstructor\n@AllArgsConstructor\npublic class UserQuery extends PageQuery {\n    private String username;\n    private Integer ageGe;\n    private Integer ageLt;\n    private Boolean valid;\n}\n```\n\nInvoking the method [`DataAccess#query(Q)`](https://github.com/doytowin/doyto-query/blob/main/doyto-query-api/src/main/java/win/doyto/query/core/DataAccess.java) in `UserService`:\n```java\n@Service\npublic class UserService extends AbstractCrudService\u003cUserEntity, Long, UserQuery\u003e {\n    public List\u003cUserEntity\u003e findValidAdultUsers() {\n        UserQuery userQuery = UserQuery.builder().ageGe(20).valid(true).pageSize(10).build();\n        // Executed SQL: SELECT username, email, valid, id FROM t_user WHERE age \u003e= ? AND valid = ? LIMIT 10 OFFSET 0\n        // Parameters  : 20(java.lang.Integer), true(java.lang.Boolean)\n        return dataAccess.query(userQuery);\n    }\n}\n```\n\nDefine a controller to support RESTful API:\n```java\n@RestController\n@RequestMapping(\"user\")\npublic class UserController extends AbstractEIQController\u003cUserEntity, Long, UserQuery\u003e {\n}\n```\n\nSet the log level of `logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping` to `trace`, \nand after starting the Spring Boot application, you can see in the console that the RESTful interface is ready for `/user/`:\n\n```\ns.w.s.m.m.a.RequestMappingHandlerMapping : \n\tw.d.q.d.m.u.UserController:\n\t{PUT [/user/{id}]}: update(Persistable)\n\t{DELETE [/user/{id}]}: remove(Serializable)\n\t{GET [/user/{id}]}: get(Serializable)\n\t{DELETE [/user/]}: delete(DoytoQuery)\n\t{PATCH [/user/]}: patch(Object,DoytoQuery)\n\t{GET [/user/]}: page(DoytoQuery)\n\t{POST [/user/]}: create(List)\n\t{PATCH [/user/{id}]}: patch(Object)\n```\n\nRefer to the [demo](https://github.com/doytowin/doyto-query-demo) for more details.\n\n## Architecture for 0.3.x and newer\n\n\u003cimg alt=\"architecture-0.3.x\" src=\"docs/images/architecture-0.3.x.2.png\" width=\"50%\"\u003e\n\n## Versions\n\n| Module                 | Snapshot                                                                                                                                     | Release                                                                                             |\n|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| doyto-query-api        | [![api-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-api/)               | [![api-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-api)               |\n| doyto-query-geo        | [![geo-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-geo/)               | [![geo-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-geo)               |\n| doyto-query-common     | [![common-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-common/)         | [![common-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-common)         |\n| doyto-query-sql        | [![sql-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-sql/)               | [![sql-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-sql)               |\n| doyto-query-jdbc       | [![jdbc-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-jdbc/)             | [![jdbc-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-jdbc)             |\n| doyto-query-web-common | [![web-common-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-web-common/) | [![web-common-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-web-common) |\n| doyto-query-web        | [![web-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-web/)               | [![web-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-web)               |\n| doyto-query-dialect    | [![dialect-snapshots-img]](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/win/doyto/doyto-query-dialect/)       | [![dialect-release-img]](https://central.sonatype.com/artifact/win.doyto/doyto-query-dialect)       |\n\n## Supported Databases\n- MySQL\n- Oracle\n- SQL Server\n- PostgreSQL\n- SQLite\n- HSQLDB\n\nLicense\n-------\nThis project is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).\n\n[geo-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-geo?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[geo-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-geo?color=brightgreen\n[api-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-api?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[api-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-api?color=brightgreen\n[common-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-common?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[common-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-common?color=brightgreen\n[sql-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-sql?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[sql-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-sql?color=brightgreen\n[jdbc-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-jdbc?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[jdbc-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-jdbc?color=brightgreen\n[web-common-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-web-common?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[web-common-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-web-common?color=brightgreen\n[web-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-web?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[web-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-web?color=brightgreen\n[dialect-snapshots-img]: https://img.shields.io/nexus/s/win.doyto/doyto-query-dialect?color=blue\u0026server=https%3A%2F%2Foss.sonatype.org\n[dialect-release-img]: https://img.shields.io/maven-central/v/win.doyto/doyto-query-dialect?color=brightgreen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoytowin%2Fdoyto-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoytowin%2Fdoyto-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoytowin%2Fdoyto-query/lists"}