You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/ggql/ggql

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ggql/ggql

v0.8.0
Source
Go
Version published
Created
Source

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

FAQs

Package last updated on 25 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts