69

GitHub - fzerorubigd/goql: A golang source code scanner, this time in sql :)

 6 years ago
source link: https://github.com/fzerorubigd/goql
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

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)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK