GQL – Git Query Language

Jul 18, 2023 | Programming

Crates.io
Deps
Release
Docs
GitHub release
GitHub issues
GitHub
GitHub all releases

GQL is a query language with a syntax very similar to SQL with a tiny engine to perform queries on .git files instead of database files. The engine executes the query on the fly without the need to create database files or convert .git files into any other format.

animated

How to Use GQL

Using GQL for querying your git files is as straightforward as pie! Just think of it as having a powerful chef (the GQL engine) who doesn’t need to cook food from scratch (create database files). Instead, they whip up delicious dishes (run queries) instantly using the ingredients already in your kitchen (your .git files).

Sample Queries

  • SELECT 1
  • SELECT 1 + 2
  • SELECT LEN(Git Query Language)
  • SELECT One IN (One, Two, Three)
  • SELECT Git Query Language LIKE %Query%
  • SET @arr = [1, 2, 3];
  • SELECT [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
  • SELECT @arr[1], @arr[2], @arr[3], ARRAY_LENGTH(@arr);
  • SELECT DISTINCT title AS tt FROM commits;
  • SELECT author_name, COUNT(author_name) AS commit_num FROM commits GROUP BY author_name, author_email ORDER BY commit_num DESC LIMIT 10;
  • SELECT * FROM refs WHERE type = branch;
  • SELECT * FROM commits WHERE LOWER(name) = 'amrdeveloper';

Documentation

For more detailed insights about GQL, check out the following resources:

Troubleshooting

While GQL is designed to be user-friendly, you may encounter some hiccups while navigating through your queries. Here are some troubleshooting ideas:

  • Ensure that your .git files are accessible and not corrupted.
  • Check your query syntax; remember, GQL is case-insensitive!
  • Refer to the Full Documentation for guidance and examples.
  • If you face persistent issues, consider reaching out to the community or checking the GitHub issues page for resolutions.
  • For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

License

This project is licensed under the MIT License. You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of this software without any restrictions. However, do not forget to include the copyright notice with any substantial portions of the Software.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox