Gh-sql - Query GitHub Projects (beta) with SQL

Overview

gh-sql: Query GitHub Projects (beta) with SQL

Installation

gh extension install KOBA789/gh-sql

Features

  • SELECT items
  • DELETE items
  • UPDATE item fields
    • You can not modify Title, Assignees, Labels, Milestone, or Repository

Usage

USAGE:
    gh-sql [OPTIONS] <OWNER> <PROJECT_NUMBER>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -e, --execute <execute>    SQL statement to execute
    -o, --output <output>      "table", "json" or these initial [default: table]

ARGS:
    <OWNER>
    <PROJECT_NUMBER>

eg. JSON output in non-interactive execution

  • -oj: output as json
  • -e: non-interactive mode
gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items;'

eg. Make task list in markdown

Of course, you can also pipe it to jq.

gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items where Repository is not null;' | \
    jq -r '"- " + .Repository + "#" + (.Issue | tostring)'
You might also like...
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx 🧰 The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

SQL validator tool for BigQuery standard SQL.

bqvalid What bqvalid does bqvalid is the SQL validator tool for BigQuery standard SQL. bqvalid fails with error message if there's the expression that

A safe, extensible ORM and Query Builder for Rust

A safe, extensible ORM and Query Builder for Rust API Documentation: latest release – master branch Homepage Diesel gets rid of the boilerplate for da

A query builder that builds and typechecks queries at compile time

typed-qb: a compile-time typed "query builder" typed-qb is a compile-time, typed, query builder. The goal of this crate is to explore the gap between

Diesel - A safe, extensible ORM and Query Builder for Rust

A safe, extensible ORM and Query Builder for Rust API Documentation: latest release – master branch Homepage Diesel gets rid of the boilerplate for da

Qoo - Query Object Oriented. Pronunciation is Kuu.

qoo Query Object Oriented. Pronunciation is Kuu. demo use qoo::base::*; use qoo::select::*; use qoo::insert::*; use qoo::update::*; use qoo::delete::*

Diesel - ORM and Query Builder for Rust

A safe, extensible ORM and Query Builder for Rust API Documentation: latest release – master branch Homepage Diesel gets rid of the boilerplate for da

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables

XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables XLite is a SQLite extension written in Rust. The main

Comments
  • Build binaries for other platforms than linux-amd64

    Build binaries for other platforms than linux-amd64

    Only linux-amd64 is supported so far.

    Why:

    • Cross-compiling is a little bit hard
      • rustyline depends on cc (transitively through nix)
      • Compilation for macOS fails with: cc: error: unrecognized command line option '-arch'
        • -arch option is only in Apple flavored gcc
      • Possible solutions:
        • Resolve compilation error (seems so hard)
        • Use macos-11 runner (easy but I have no motivation)
          • Your contributions are welcome!
    • gh-sql uses some UNIX commands: column, less
      • Windows does't have these
      • Possible solutions:
        • Re-implement these in Rust (ughhh)
    opened by KOBA789 1
  • Support DraftIssue

    Support DraftIssue

    gh-sql panicked when DraftIssues are in the project (beta). This PR solves it.

    ghsql> select count(*) from items;
    SQL execution error: Storage(Failed to parse response
    
    Caused by:
        missing field `repository` at line 1 column 35805)
    ghsql>
    
    opened by KOBA789 0
  • Create release for macOS

    Create release for macOS

    This PR contains two changes:

    • Deploy binary for macOS on release
    • Add workflow to check commits with cargo clippy

    Here is an example release: https://github.com/rhysd/gh-sql/releases/tag/v0.0.2

    opened by rhysd 0
  • Help writing SQL query that only lists issues that are assigned to a specific user

    Help writing SQL query that only lists issues that are assigned to a specific user

    Firstly, thanks you for this great tool!

    I'm definitely not an SQL master and have spent way too long trying to work this out. Maybe you already have a command to do this already prepared?

    How can you write a query that only shows issues related to a specific user.

    I have tried many variations from this answer for example: https://stackoverflow.com/q/11231544/3103033

    I'm probably missing something stupid.

    Many thanks :pray:

    opened by JasoonS 1
Releases(v0.3.6)
Owner
Hidekazu Kobayashi
Hidekazu Kobayashi
Sled - the champagne of beta embedded databases

key value buy a coffee for us to convert into databases documentation chat about databases with us sled - it's all downhill from here!!! An embedded d

Tyler Neely 6.6k Jan 8, 2023
Query LDAP and AD with SQL

SQLDAP Ever wanted to query AD or LDAP with SQL like queries ? I'm going to answer this question myself: yes ! Why ? Because I never could remember al

null 9 Nov 15, 2022
An object-relational in-memory cache, supports queries with an SQL-like query language.

qlcache An object-relational in-memory cache, supports queries with an SQL-like query language. Warning This is a rather low-level library, and only p

null 3 Nov 14, 2021
Fully typed SQL query builder for Rust [deprecated]

What is Deuterium? Deuterium is a fancy SQL builder for Rust. It's designed to provide a DSL to easily build SQL queries in safe and typed way. Like R

Stanislav Panferov 169 Nov 20, 2022
Rust library to parse, deparse and normalize SQL queries using the PostgreSQL query parser

This Rust library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.

pganalyze 37 Dec 18, 2022
Type-safe SQL query wrappers

fnsql   The fnsql crate provides simple type-safe optional wrappers around SQL queries. Instead of calling type-less .query() and .execute(), you call

Dan Aloni 9 Apr 29, 2022
A Toy Query Engine & SQL interface

Naive Query Engine (Toy for Learning) ?? This is a Query Engine which support SQL interface. And it is only a Toy for learn query engine only. You can

谭巍 45 Dec 21, 2022
Query system statistics with SQL.

pg_stat_sysinfo Collects system statistics. ---- CREATE EXTENSION pg_stat_sysinfo; CREATE EXTENSION ---- SELECT * FROM pg_stat_sysinfo_collect();

PostgresML 12 Jun 14, 2023
ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-text search.

ReefDB ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-

Sacha Arbonel 75 Jun 12, 2023
Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async

CDRS CDRS is looking for maintainers CDRS is Apache Cassandra driver written in pure Rust. ?? Looking for an async version? async-std https://github.c

Alex Pikalov 338 Jan 1, 2023