{"id":13645498,"url":"https://github.com/hyrise/sql-parser","last_synced_at":"2025-04-21T14:31:14.394Z","repository":{"id":21644672,"uuid":"24965364","full_name":"hyrise/sql-parser","owner":"hyrise","description":"SQL Parser for C++. Building C++ object structure from SQL statements.","archived":false,"fork":false,"pushed_at":"2025-04-01T21:03:21.000Z","size":3030,"stargazers_count":770,"open_issues_count":42,"forks_count":246,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-04-01T21:33:26.942Z","etag":null,"topics":["c-plus-plus","hyrise","sql","sql-parser"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyrise.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":"2014-10-08T23:27:56.000Z","updated_at":"2025-04-01T21:03:23.000Z","dependencies_parsed_at":"2024-01-14T09:57:40.374Z","dependency_job_id":"eceb176b-f571-40c4-a732-8a8883560a3a","html_url":"https://github.com/hyrise/sql-parser","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/hyrise%2Fsql-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrise%2Fsql-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrise%2Fsql-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrise%2Fsql-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyrise","download_url":"https://codeload.github.com/hyrise/sql-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070173,"owners_count":21369839,"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":["c-plus-plus","hyrise","sql","sql-parser"],"created_at":"2024-08-02T01:02:35.968Z","updated_at":"2025-04-21T14:31:14.386Z","avatar_url":"https://github.com/hyrise.png","language":"C++","readme":"C++ SQL Parser\n=========================\n[![Build Status](https://github.com/hyrise/sql-parser/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hyrise/sql-parser/actions?query=branch%3Amain)\n\n\nThis is a SQL Parser for C++. It parses the given SQL query into C++ objects.\nIt has been developed for integration in [Hyrise](https://github.com/hyrise/hyrise), but can be used perfectly well in other environments as well.\n\nIn March 2015 we've also written a short paper outlining discussing some development details and the integration into our database Hyrise. You can find the paper [here](docs/technical_documentation.pdf).\n\n\n## Usage\n\n**Note:** You can also find a detailed usage description [here](docs/basic-usage.md).\n\nTo use the SQL parser in your own projects you simply have to follow these few steps.\n\n 1. Download the [latest release here](https://github.com/hyrise/sql-parser/releases)\n 2. Compile the library `make` to create `libsqlparser.so`\n 3. *(Optional, Recommended)* Run `make install` to copy the library to `/usr/local/lib/`\n 4. Run the tests `make test` to make sure everything worked\n 5. Include the `SQLParser.h` from `src/` (or from `/usr/local/lib/hsql/` if you installed it) and link the library in your project\n 6. Take a look at the [example project here](https://github.com/hyrise/sql-parser/tree/main/example)\n\n```cpp\n#include \"hsql/SQLParser.h\"\n\n/* ... */\n\n{\n    // Basic Usage Example\n\n    const std::string query = \"...\";\n    hsql::SQLParserResult result;\n    hsql::SQLParser::parse(query, \u0026result);\n\n    if (result.isValid() \u0026\u0026 result.size() \u003e 0) {\n        const hsql::SQLStatement* statement = result.getStatement(0);\n\n        if (statement-\u003eisType(hsql::kStmtSelect)) {\n            const auto* select = static_cast\u003cconst hsql::SelectStatement*\u003e(statement);\n            /* ... */\n        }\n    }\n}\n```\n\nQuick Links:\n\n * [SQLParser.h](src/SQLParser.h)\n * [SQLParserResult.h](src/SQLParserResult.h)\n * [SelectStatement.h](src/sql/SelectStatement.h)\n\n## How to Contribute\n\n**[Developer Documentation](docs/)**\n\nWe strongly encourage you to contribute to this project! If you want to contribute to this project there are several options. If you've noticed a bug or would like an improvement let us know by creating a [new issue](https://github.com/hyrise/sql-parser/issues). If you want to develop a new feature yourself or just improve the quality of the system, feel free to fork the reposistory and implement your changes. Open a pull request as soon as your done and we will look over it. If we think it's good then your pull request will be merged into this repository.\n\n\n## License\n\nHYRISE sql-parser is licensed as open source after the MIT License which is declared in the LICENSE file of this project.\n","funding_links":[],"categories":["C++","C++ (70)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyrise%2Fsql-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyrise%2Fsql-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyrise%2Fsql-parser/lists"}