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.
できること
- 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.
計測したスター増加
- 24時間
- 履歴を収集中
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
An SQL Parser/Lexer for C#
データREADME.md
オリジナルSQLParser
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,725 スターgrafana/grafana
オープンで組み合わせ可能なオブザーバビリティおよびデータ可視化プラットフォームです。Prometheus、Loki、Elasticsearch、InfluxDB、Postgres など、複数のソースからメトリクス、ログ、トレースを可視化できます。
77,897 スターredis/redis
リアルタイムのデータ駆動型アプリケーションを構築する開発者にとって、Redis は最も選ばれ、最速で、機能が最も豊富なキャッシュ、データ構造サーバー、ドキュメントおよびベクトルクエリエンジンです。
77,491 スターapache/superset
Apache Superset は、データ可視化とデータ探索のためのプラットフォームです。
75,522 スター