{"id":13458569,"url":"https://github.com/JSQLParser/JSqlParser","last_synced_at":"2025-03-24T15:31:36.466Z","repository":{"id":37335678,"uuid":"1944709","full_name":"JSQLParser/JSqlParser","owner":"JSQLParser","description":"JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern","archived":false,"fork":false,"pushed_at":"2024-05-11T18:06:30.000Z","size":11976,"stargazers_count":4985,"open_issues_count":67,"forks_count":1309,"subscribers_count":212,"default_branch":"master","last_synced_at":"2024-05-13T12:39:25.444Z","etag":null,"topics":["ast","hierarchy","java","jsqlparser","mysql","oracle","parser","paypal","postgresql","sql","sql-statement","sqlserver","statement"],"latest_commit_sha":null,"homepage":"https://github.com/JSQLParser/JSqlParser/wiki","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/JSQLParser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE_APACHEV2","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://paypal.me/wumpz"}},"created_at":"2011-06-23T22:51:52.000Z","updated_at":"2024-05-19T11:39:21.710Z","dependencies_parsed_at":"2024-05-19T11:39:19.466Z","dependency_job_id":"9bf137be-656c-4b0b-a2fd-9703edacbb17","html_url":"https://github.com/JSQLParser/JSqlParser","commit_stats":{"total_commits":1621,"total_committers":131,"mean_commits":"12.374045801526718","dds":"0.23318938926588528","last_synced_commit":"0e9833328d01a315951e75058786660633b0953c"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSQLParser%2FJSqlParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSQLParser%2FJSqlParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSQLParser%2FJSqlParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSQLParser%2FJSqlParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSQLParser","download_url":"https://codeload.github.com/JSQLParser/JSqlParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245298070,"owners_count":20592533,"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":["ast","hierarchy","java","jsqlparser","mysql","oracle","parser","paypal","postgresql","sql","sql-statement","sqlserver","statement"],"created_at":"2024-07-31T09:00:54.052Z","updated_at":"2025-03-24T15:31:31.455Z","avatar_url":"https://github.com/JSQLParser.png","language":"Java","readme":"# [JSqlParser 5.0 Website](https://jsqlparser.github.io/JSqlParser) \u003cimg src=\"src/site/sphinx/_images/logo-no-background.svg\" alt=\"drawing\" width=\"200\" align=\"right\"/\u003e\n\n[![Maven deploy snapshot](https://github.com/JSQLParser/JSqlParser/actions/workflows/maven_deploy.yml/badge.svg)](https://github.com/JSQLParser/JSqlParser/actions/workflows/maven_deploy.yml)\n[![Gradle CI](https://github.com/JSQLParser/JSqlParser/actions/workflows/gradle.yml/badge.svg)](https://github.com/JSQLParser/JSqlParser/actions/workflows/gradle.yml)\n[![Coverage Status](https://coveralls.io/repos/JSQLParser/JSqlParser/badge.svg?branch=master)](https://coveralls.io/r/JSQLParser/JSqlParser?branch=master) \n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/6f9a2d7eb98f45969749e101322634a1)](https://www.codacy.com/gh/JSQLParser/JSqlParser/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=JSQLParser/JSqlParser\u0026amp;utm_campaign=Badge_Grade)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jsqlparser/jsqlparser/badge.svg)](http://maven-badges.herokuapp.com/maven-central/com.github.jsqlparser/jsqlparser) [![Javadocs](https://www.javadoc.io/badge/com.github.jsqlparser/jsqlparser.svg)](https://www.javadoc.io/doc/com.github.jsqlparser/jsqlparser)\n[![Gitter](https://badges.gitter.im/JSQLParser/JSqlParser.svg)](https://gitter.im/JSQLParser/JSqlParser?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n## Summary\n\nPlease visit the [WebSite](https://jsqlparser.github.io/JSqlParser). **JSqlParser** is a RDBMS agnostic SQL statement parser. It translates SQL statements into a traversable hierarchy of Java classes (see [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#parse-a-sql-statements)):\n\n```sql\nSELECT 1 FROM dual WHERE a = b\n```\n\n```text\nSQL Text\n └─Statements: statement.select.PlainSelect\n    ├─selectItems: statement.select.SelectItem\n    │  └─LongValue: 1\n    ├─Table: dual\n    └─where: expression.operators.relational.EqualsTo\n       ├─Column: a\n       └─Column: b\n```\n\n```java\nString sqlStr = \"select 1 from dual where a=b\";\n\nPlainSelect select = (PlainSelect) CCJSqlParserUtil.parse(sqlStr);\n\nSelectItem selectItem =\n        select.getSelectItems().get(0);\nAssertions.assertEquals(\n        new LongValue(1)\n        , selectItem.getExpression());\n\nTable table = (Table) select.getFromItem();\nAssertions.assertEquals(\"dual\", table.getName());\n\nEqualsTo equalsTo = (EqualsTo) select.getWhere();\nColumn a = (Column) equalsTo.getLeftExpression();\nColumn b = (Column) equalsTo.getRightExpression();\nAssertions.assertEquals(\"a\", a.getColumnName());\nAssertions.assertEquals(\"b\", b.getColumnName());\n}\n```\n\nJSQLParser-4.9 was the last JDK8 compatible version. The recent JSQLParser-5.0 depends on JDK11 and introduces API breaking changes to the AST Visitors. Please see the Migration Guide for the details.\n\n## [Supported Grammar and Syntax](https://jsqlparser.github.io/JSqlParser/syntax.html)\n\n**JSqlParser** aims to support the SQL standard as well as all major RDBMS. Any missing syntax or features can be added on demand.\n\n| RDBMS                                                                                                           | Statements                                                                                                                                      |\n|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| Oracle\u003cbr\u003eMS SQL Server and Sybase\u003cbr\u003ePostgres\u003cbr\u003eMySQL and MariaDB\u003cbr\u003eDB2\u003cbr\u003eH2 and HSQLDB and Derby\u003cbr\u003eSQLite | `SELECT`\u003cbr\u003e`INSERT`, `UPDATE`, `UPSERT`, `MERGE`\u003cbr\u003e`DELETE`, `TRUNCATE TABLE`\u003cbr\u003e`CREATE ...`, `ALTER ....`, `DROP ...`\u003cbr\u003e`WITH ...`         |\n| Salesforce SOQL                                                                                                 | `INCLUDES`, `EXCLUDES` |\n\n**JSqlParser** can also be used to create SQL Statements from Java Code with a fluent API (see [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#build-a-sql-statements)).\n\n## Sister Projects\n\nIf you like JSqlParser then please check out its related projects:\n\n* [JSQLFormatter](https://manticore-projects.com/JSQLFormatter/index.html) for pretty printing and formatting SQL Text\n\n* [JSQLTranspiler](https://manticore-projects.com/JSQLTranspiler/index.html) for dialect specific rewriting, SQL Column resolution and Lineage\n\n## Alternatives to JSqlParser?\n[**General SQL Parser**](http://www.sqlparser.com/features/introduce.php?utm_source=github-jsqlparser\u0026utm_medium=text-general) looks pretty good, with extended SQL syntax (like PL/SQL and T-SQL) and java + .NET APIs. The tool is commercial (license available online), with a free download option.\n\nAlternatively the dual-licensed [JOOQ](https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/) provides a hand-written Parser supporting a lot of RDBMS, translation between dialects, SQL transformation, can be used as a JDBC proxy for translation and transformation purposes.\n\n## [Documentation](https://jsqlparser.github.io/JSqlParser)\n  1. [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#parse-a-sql-statements)\n  2. [Build Instructions](https://jsqlparser.github.io/JSqlParser/usage.html) and [Maven Artifact](https://jsqlparser.github.io/JSqlParser/usage.html#build-dependencies)\n  3. [Contribution](https://jsqlparser.github.io/JSqlParser/contribution.html)\n  4. [Change Log](https://jsqlparser.github.io/JSqlParser/changelog.html#latest-changes-since-jsqlparser-version)\n  5. [Issues](https://github.com/JSQLParser/JSqlParser/issues)\n\n## License\n\n**JSqlParser** is dual licensed under **LGPL V2.1** or **Apache Software License, Version 2.0**.\n","funding_links":["https://paypal.me/wumpz"],"categories":["Java","其他__大数据","SQL","\u003ca name=\"Java\"\u003e\u003c/a\u003eJava"],"sub_categories":["网络服务_其他","Parsers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJSQLParser%2FJSqlParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJSQLParser%2FJSqlParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJSQLParser%2FJSqlParser/lists"}