JaCraig/SQLParser
JaCraig/SQLParser has 133 GitHub stars and 20 forks. Star changes are not measured yet. Last checked 2026-11-14 08:25 UTC. Last push 2026-11-10.
What you can do
- Lexical analysis: Tokenizing SQL queries into individual tokens.
- Syntactic analysis: Parsing SQL queries into an abstract syntax tree.
- Query manipulation: Modifying and transforming the parsed SQL queries.
- Query analysis: Extracting metadata and information from SQL queries.
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
An SQL Parser/Lexer for C#
데이터README.md
OriginalSQLParser
This C# library provides a SQL parser and lexer implementation using ANTLR. It allows you to parse SQL queries into an abstract syntax tree (AST) and perform various operations on the parsed queries.
Features
- Lexical analysis: Tokenizing SQL queries into individual tokens.
- Syntactic analysis: Parsing SQL queries into an abstract syntax tree.
- Query manipulation: Modifying and transforming the parsed SQL queries.
- Query analysis: Extracting metadata and information from SQL queries.
Installation
You can install the library via NuGet:
dotnet add package SQLParser
Usage
To use this library in your C# project, follow these steps:
Add a reference to the
SQLParserpackage in your project.Import the
SQLParsernamespace in your code:using SQLParser.Parsers.TSql; using SQLParser;Create a parser listener class:
/// <summary> /// This is an example of a printer that can be used to parse a statement. /// </summary> /// <seealso cref="TSqlParserBaseListener" /> internal class Printer : TSqlParserBaseListener { /// <summary> /// Gets or sets a value indicating whether [statement found]. /// </summary> /// <value> /// <c>true</c> if [statement found]; otherwise, <c>false</c>. /// </value> public bool StatementFound { get; set; } /// <summary> /// Enter a parse tree produced by <see cref="M:SQLParser.Parsers.TSql.TSqlParser.dml_clause" />. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public override void EnterDml_clause([NotNull] TSqlParser.Dml_clauseContext context) { // This is a select statement if the select_statement_standalone is not null StatementFound |= context.select_statement_standalone() != null; base.EnterDml_clause(context); } }Parse the query:
Parser.Parse("SELECT * FROM Somewhere", ExamplePrinter, Enums.SQLType.TSql);
Contributing
Contributions are welcome! If you encounter any bugs, issues, or have feature requests, please create an issue on this repository.
If you want to contribute to the codebase, follow these steps:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- Make your changes and write tests if applicable.
- Submit a pull request.
Please ensure that your code follows the existing code style and passes the tests before submitting a pull request.
License
This library is released under the Apache 2 License.
Acknowledgments
- This library was built using ANTLR (version 4).
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,729 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,898 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,491 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,522 스타