github

fzerorubigd / goql

  • воскресенье, 1 апреля 2018 г. в 00:16:11
https://github.com/fzerorubigd/goql

Go
A golang source code scanner, this time in sql :)



GoQL

A query language, over Go code, in Go!

Build Status Coverage Status GoDoc Go Report Card

This package is under heavy development, anything may change!

This is a subset of sql, over Golang code. the idea is to interact with Go code in sql. the tables are dynamic and adding column/table is possible.

What is this?

go get -u github.com/fzerorubigd/goql/...

A test command line is built in your GOBIN directory

goql --package="fmt" "select * from file"
goql --package="fmt" "select * from funcs"
goql --package="fmt" "select * from consts"
goql --package="fmt" "select * from vars"
goql --package="fmt" "select * from types"
goql --package="fmt" "select * from imports"

also some operators are available:

goql --package="fmt" "select name from funcs where receiver is not null and name like '%print' order by name desc limit 10,1"

Demo

asciicast

its in alpha stage, there is a long todo list :

  • Write documentation
  • Definition type and operator
  • UPDATE/INSERT/DELETE support (Yes, code generation with sql)