Giter Site home page Giter Site logo

ggql

Build Status codecov Go Report Card License Tag

Introduction

ggql is forked from GQL and written in Go.

ggql is a query and mutate language with a syntax very similar to SQL with a tiny engine to perform queries or mutation on .git files instance of database files, note that all keywords in ggql are case-insensitive similar to SQL.

Prerequisites

  • Go >= 1.20.0

Run

# Build
make build

# Query
./bin/ggql -q "select * from branches" -r /path/to/git/repo
./bin/ggql -q "select * from commits where author_name=joe" -r /path/to/git/repo
./bin/ggql -q "select * from projects where name=test" -r /path/to/git/repo

# Mutate
./bin/ggql -m "update project set name=test" -r /path/to/git/repo
./bin/ggql -m "insert into project (change_id, name) values (1, test)" -r /path/to/git/repo
./bin/ggql -m "delete from change where change_id=1" -r /path/to/git/repo

Usage

ggql is a SQL like query and mutate language to run on local repositories

Usage: ggql [OPTIONS]

Options:
-r,  --repos <REPOS>        Path for local repositories to run query on
-q,  --query <GQL Query>    GitQL query to run on selected repositories
-m,  --mutate <GQL Mutate>  GitQL mutate to run on selected repositories
-p,  --pagination           Enable print result with pagination
-ps, --pagesize             Set pagination page size [default: 10]
-o,  --output               Set output format [render, json, csv]
-a,  --analysis             Print Query analysis
-h,  --help                 Print GitQL help
-v,  --version              Print GitQL Current Version

License

Project License can be found here.

Reference

ggql's Projects

ggql icon ggql

Git Query Language in Go

gql icon gql

Git Query language is a SQL like language to perform queries on .git files with supports of most of SQL features such as grouping, ordering and aggregations functions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.