{"id":37026541,"url":"https://github.com/vlachenal/sql-request-builder","last_synced_at":"2026-01-14T03:05:31.607Z","repository":{"id":57723926,"uuid":"145031430","full_name":"vlachenal/sql-request-builder","owner":"vlachenal","description":"Dynamic SQL request builder","archived":false,"fork":false,"pushed_at":"2023-02-26T11:10:06.000Z","size":975,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-07-01T02:41:50.656Z","etag":null,"topics":["fluent","java","sql"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlachenal.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}},"created_at":"2018-08-16T19:36:36.000Z","updated_at":"2023-02-26T11:10:12.000Z","dependencies_parsed_at":"2022-09-02T06:55:01.522Z","dependency_job_id":null,"html_url":"https://github.com/vlachenal/sql-request-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/vlachenal/sql-request-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlachenal%2Fsql-request-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlachenal%2Fsql-request-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlachenal%2Fsql-request-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlachenal%2Fsql-request-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlachenal","download_url":"https://codeload.github.com/vlachenal/sql-request-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlachenal%2Fsql-request-builder/sbom","scorecard":{"id":925108,"data":{"date":"2025-08-11","repo":{"name":"github.com/vlachenal/sql-request-builder","commit":"f497c5b06a1630f79e72155bf92e39b62b8c7854"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-25T10:47:08.854Z","repository_id":57723926,"created_at":"2025-08-25T10:47:08.854Z","updated_at":"2025-08-25T10:47:08.854Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fluent","java","sql"],"created_at":"2026-01-14T03:05:30.718Z","updated_at":"2026-01-14T03:05:31.587Z","avatar_url":"https://github.com/vlachenal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/vlachenal/sql-request-builder.svg?branch=master)](https://travis-ci.org/vlachenal/sql-request-builder) [![Maintainability](https://api.codeclimate.com/v1/badges/50db46caf82379434877/maintainability)](https://codeclimate.com/github/vlachenal/sql-request-builder/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/50db46caf82379434877/test_coverage)](https://codeclimate.com/github/vlachenal/sql-request-builder/test_coverage)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.vlachenal/sql-request-builder.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.vlachenal%22%20AND%20a:%22sql-request-builder%22)\n\n# sql-request-builder\nDynamic SQL request builder aims to provides a fluent API to easily write dynamic SQL request.\n\n## Synopsis\nIn most web services, there are search features. These features may have several optional filters which will add clauses in SQL request.\n\nManaging every filter makes your source code more complex and less readable. And the more your service have filters, less your code is readable.\n\nThis library provides a fluent API to add clauses only when filter has a valid value (by default not null and not empty). I try to make API to use as easy as if you were writing SQL request.\n\nEvery valid value will be added as prepared statement value to avoid SQL injections.\n\nI will not recommend to use this library for static SQL request. It will induce overhead compared to static SQL query string.\n\n## Requirements\nsql-request-builder is a standalone library. The only requirement is Java 1.8+.\n\nBuild and unit tests are automatically executed with Oracle JDK 1.8 and OpenJDK 10.\n\n## Installation\nsql-request-builder library is published on Maven Central.\n\nIf you are using Maven, you can add the following dependency to your `pom.xml`:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.vlachenal\u003c/groupId\u003e\n  \u003cartifactId\u003esql-request-builder\u003c/artifactId\u003e\n  \u003cversion\u003e0.13\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you are using Gradle, you can add the following dependency:\n```groovy\ncompile \"com.github.vlachenal:sql-request-builder:0.13\"\n```\n\nOtherwise, you can clone this repository and build library using `jar` task.\n\n## Documentation\n\n### Javadoc\nYou can consult Javadoc [here](https://vlachenal.github.io/sql-request-builder/index.html?com/github/vlachenal/sql/package-summary.html).\n\n### Wiki\n[Wiki](https://github.com/vlachenal/sql-request-builder/wiki) contains detailled library usage, releases notes and remaining tasks.\n\n### Examples\nMore examples can be found in unit tests and wiki.\n\nHere is a sample of library usage:\n\nThe following request bean:\n```java\npublic class ExampleRequest {\n  public UUID id;\n  public String firstName;\n  public String lastName;\n  public String email;\n  public String gender;\n  public String country;\n}\n```\n\nis filled with the following values:\n```java\nfinal ExampleRequest req = new ExampleRequest();\nreq.gender = \"F\";\nreq.lastName = \"%Croft%\";\n```\n\nThe following code will generate an SQL request to retrieve 'heroes' according to the request:\n```java\nfinal SQLQuery query = SQL.select().field(\"*\")\n    .from(\"Heroes\")\n    .where(SQL.clauses(\"id\", Clauses::equalsTo, req.id)\n           .and(\"first_name\", Clauses::like, req.firstName)\n           .and(\"last_name\", Clauses::like, req.lastName)\n           .and(\"email\", Clauses::equalsTo, req.email)\n           .and(\"gender\", Clauses::equalsTo, req.gender)\n           .and(\"country\", Clauses::equalsTo, req.country)\n        ).build();\n```\n\nThe generated SQL request will be:\n```sql\nSELECT * FROM Heroes WHERE last_name LIKE ? AND gender = ?\n```\n\nWith `%Croft%` and `F` as values.\n\nQuery and values can be retrieved like this:\n```java\nString strQuery = query.getQuery();\nList\u003cObject\u003e valueLst = query.getValues();\nObject[] values = query.values();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlachenal%2Fsql-request-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlachenal%2Fsql-request-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlachenal%2Fsql-request-builder/lists"}