{"id":17808188,"url":"https://github.com/holmofy/spring-data-criteria","last_synced_at":"2025-03-17T15:30:37.033Z","repository":{"id":121334620,"uuid":"583269963","full_name":"holmofy/spring-data-criteria","owner":"holmofy","description":"`Spring Data Criteria` extends Spring Data JDBC \u0026 R2DBC \u0026 JPA to support dynamic sql","archived":false,"fork":false,"pushed_at":"2023-10-04T09:39:03.000Z","size":93,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T00:51:17.338Z","etag":null,"topics":["annotation-processor","dynamic-sql","jpamodelgen","model-generator","spring","spring-data","spring-data-jdbc","spring-data-jpa","spring-data-r2dbc","spring-jdbc","sql"],"latest_commit_sha":null,"homepage":"","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/holmofy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-12-29T09:18:59.000Z","updated_at":"2024-11-30T19:14:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a9b1799-e61e-4f21-b68d-4c6d284b881d","html_url":"https://github.com/holmofy/spring-data-criteria","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmofy%2Fspring-data-criteria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmofy%2Fspring-data-criteria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmofy%2Fspring-data-criteria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmofy%2Fspring-data-criteria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holmofy","download_url":"https://codeload.github.com/holmofy/spring-data-criteria/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243865529,"owners_count":20360457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["annotation-processor","dynamic-sql","jpamodelgen","model-generator","spring","spring-data","spring-data-jdbc","spring-data-jpa","spring-data-r2dbc","spring-jdbc","sql"],"created_at":"2024-10-27T15:09:02.155Z","updated_at":"2025-03-17T15:30:37.027Z","avatar_url":"https://github.com/holmofy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status(https://github.com/holmofy/spring-data-jdbc-criteria/actions/workflows/package.yaml/badge.svg)](https://github.com/holmofy/spring-data-jdbc-criteria/actions/workflows/package.yaml/badge.svg)](https://repo1.maven.org/maven2/io/github/holmofy/)\n\n`Spring Data Criteria` extends Spring Data JDBC \u0026 Spring Data R2DBC \u0026 Spring Data JPA to support dynamic sql. \n\nto see [`DATAJDBC-319`](https://github.com/spring-projects/spring-data-relational/issues/542), [`DATAJPA-2724`](https://github.com/spring-projects/spring-data-jpa/issues/2724).\n\nThe usage is as follows:\n\n```java\npublic interface UserDao extends ListCrudRepository\u003cUser, Long\u003e, CriteriaExecutor\u003cUser\u003e {\n    default Page\u003cUser\u003e searchByQuery(UserQuery query, Pageable pageable) {\n        return findAll(Criteria.from(eq(User_.province, query.province))\n                        .and(eq(User_.city, query.city))\n                        .and(like(User_.area, query.area))\n                        .and(like(User_.name, query.nick))\n                        .and(between(User_.created, query.createFrom, query.createTo))\n                , pageable);\n    }\n}\n```\n\nIt will dynamically generate sql based on whether the query field is empty.\n\n## How to use \n\n* [Using it with `spring-data-jdbc`](./spring-data-criteria-jdbc)\n* [Using it with `spring-data-jpa`](./spring-data-criteria-jpa)\n* [Using it with `spring-data-r2dbc`](./spring-data-criteria-r2dbc)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmofy%2Fspring-data-criteria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholmofy%2Fspring-data-criteria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmofy%2Fspring-data-criteria/lists"}