{"id":20887586,"url":"https://github.com/thederickff/jsqb","last_synced_at":"2025-07-28T07:08:44.157Z","repository":{"id":79427992,"uuid":"151290898","full_name":"thederickff/jsqb","owner":"thederickff","description":"Stop to lost time writing repeated SQL queries and let Java SQL Query Builder do the job for you. It's simple, fast and lightweight.","archived":false,"fork":false,"pushed_at":"2024-02-11T18:16:05.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T19:45:42.393Z","etag":null,"topics":["builder","crud","database","java","sql","sql-query-builder"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thederickff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-10-02T16:57:34.000Z","updated_at":"2023-10-23T09:37:26.000Z","dependencies_parsed_at":"2025-05-12T19:37:42.483Z","dependency_job_id":"30017f8b-25ee-4f89-af71-38890da268ca","html_url":"https://github.com/thederickff/jsqb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/thederickff/jsqb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thederickff%2Fjsqb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thederickff%2Fjsqb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thederickff%2Fjsqb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thederickff%2Fjsqb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thederickff","download_url":"https://codeload.github.com/thederickff/jsqb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thederickff%2Fjsqb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267476144,"owners_count":24093442,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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":["builder","crud","database","java","sql","sql-query-builder"],"created_at":"2024-11-18T08:21:11.457Z","updated_at":"2025-07-28T07:08:44.149Z","avatar_url":"https://github.com/thederickff.png","language":"Java","readme":"SQL Query Builder\n=================\n\nStop to lost time writing repeated SQL queries and let Java SQL Query Builder do the job for you. It's simple, fast and lightweight. **You don't need to make a connection with a database.** \n\n\u003ca name=\"index_block\"\u003e\u003c/a\u003e\n\n* [1. Installation](#block1)\n* [1.1. Installation with Maven](#block1.1)\n* [2. SELECT Statement](#block2)     \n    * [2.1. Basic SELECT statement](#block2.1) \n    * [2.2. SELECT with Specific Fields statement](#block2.2)\n    * [2.3. Aliased SELECT statement](#block2.3)\n* [3. INNER JOIN statement](#block3)\n    * [3.1 Simple Inner join](#block3.1)\n* [4. Author](#block4)\n* [5. License](#block5)\n\n\u003ca name=\"block1\"\u003e\u003c/a\u003e\n## 1. Installation [↑](#index_block)\nFor default installation, see [Releases](https://github.com/derickfelix/jsqb/releases) section to download the .jar file and add it to the path of your project.\n\u003ca name=\"block1.1\"\u003e\u003c/a\u003e\n### 1.1. Installation with Maven [↑](#index_block)\nTo install with maven, you can use the [Jitpack](https://jitpack.io/) for that.\n\nStep 1. Add the JitPack repository to your build file\n```xml\n\u003crepositories\u003e\n    ...\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\nStep 2. Add the dependency\n```xml\n\u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.derickfelix\u003c/groupId\u003e\n        \u003cartifactId\u003ejsqb\u003c/artifactId\u003e\n        \u003cversion\u003eLATEST\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\nIf the project doesn't have any GitHub Releases you can use the short commit hash or 'master-SNAPSHOT' as the version. Check the [Jitpack](https://jitpack.io/) page for more details. \n\n\n\n\u003ca name=\"block2\"\u003e\u003c/a\u003e\n## 2. SELECT Statement [↑](#index_block)\n\n\u003ca name=\"block2.1\"\u003e\u003c/a\u003e\n### 2.1. Basic SELECT statement [↑](#index_block) \n#### Usage:\n```java\npublic class Usage {\n    public static void main(String[] args)\n    {\n        Jsqb jsqb = new Jsqb();\n        String sql = jsqb.select(\"users\").write();\n    \n        System.out.println(sql);\n    }\n}\n```\n#### Output:\n```sql\nSELECT users.* FROM users\n```\n\n\u003ca name=\"block2.2\"\u003e\u003c/a\u003e\n### 2.2. SELECT with Specific Fields [↑](#index_block) \n#### Usage:\n```java\npublic class Usage {\n    public static void main(String[] args)\n    {\n        Jsqb jsqb = new Jsqb();\n        String sql = jsqb.select(\"users\", \"id\", \"name\", \"email\").write();\n    \n        System.out.println(sql);\n    }\n}\n```\n#### Output:\n```sql\nSELECT users.id, users.name, users.email FROM users\n```\n\n\u003ca name=\"block2.3\"\u003e\u003c/a\u003e\n### 2.2. Aliased SELECT statement [↑](#index_block) \nThe same of the previous one but with more information.\n\n#### Usage:\n```java\npublic class Usage {\n    public static void main(String[] args)\n    {\n        Jsqb jsqb = new Jsqb();\n        String sql = jsqb.select(\"users\", \"id as userId\", \"name as username\", \"email as receiver\").write();\n    \n        System.out.println(sql);\n    }\n}\n```\n#### Output:\n```sql\nSELECT users.id as userId, users.name as username, users.email as receiver FROM users\n```\n\n\u003ca name=\"block3\"\u003e\u003c/a\u003e\n## 3. INNER JOIN statement [↑](#index_block)\n\n\u003ca name=\"block3.1\"\u003e\u003c/a\u003e\n### 3.1. Simple Inner join [↑](#index_block)\nThe `innerJoin()` method expects the `tableName`, and the `on` detail, and the `fields` parameter is optional.\nThis method is described as:\n`innerJoin(String tableName, String on, String... fields)`.\n\n#### Usage:\n```java\npublic class Usage {\n    public static void main(String[] args)\n    {\n        Jsqb jsqb = new Jsqb();\n        String sql = jsqb.select(\"users\", \"id\", \"name\", \"email\")\n                             .innerJoin(\"roles\", \"roles.id = users.role_id\", \"name\", \"level\")\n                             .write();\n    \n        System.out.println(sql);\n    }\n}\n```\n#### Output:\n```sql\nSELECT users.id, users.name, users.email, roles.name, roles.level FROM users \nINNER JOIN roles on roles.id = users.role_id\n```\n\n\u003ca name=\"block4\"\u003e\u003c/a\u003e\n## 4. Author [↑](#index_block)\nDerick Felix\n\n - \u003cderickfelix@zoho.com\u003e\n - [https://github.com/derickfelix](https://github.com/derickfelix)\n\n\n\u003ca name=\"block5\"\u003e\u003c/a\u003e\n## 5. License [↑](#index_block)\nJava SQL Query Builder is licensed under the Apache license.\n\n```\nCopyright 2018 derickfelix.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n \n     http://www.apache.org/licenses/LICENSE-2.0\n \nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthederickff%2Fjsqb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthederickff%2Fjsqb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthederickff%2Fjsqb/lists"}