Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify query structure #10

Closed
4 tasks done
kashav opened this issue May 15, 2017 · 7 comments
Closed
4 tasks done

Simplify query structure #10

kashav opened this issue May 15, 2017 · 7 comments

Comments

@kashav
Copy link
Owner

kashav commented May 15, 2017

  • Allow SELECT clause to be omitted (attribute should default to all) (14344414, 14345753).

    $ fsql "name, size, ... FROM . WHERE ..."
    $ fsql "FROM . WHERE ..."
  • Make WHERE clause optional (Make where clause optional #8).

  • Quote-less queries:

    $ fsql SELECT \* FROM . WHERE ...
    $ fsql all FROM . WHERE ...
  • Make FROM clause optional, directory should default to the current directory (./).

@kashav
Copy link
Owner Author

kashav commented May 15, 2017

I've started working on this on refactor/query-structure.

@kashav
Copy link
Owner Author

kashav commented May 16, 2017

To test this, you'll have to build manually (since go get doesn't support fetching from a non-master branch).

$ git clone https://github.com/kshvmdn/fsql.git $GOPATH/src/github.com/kshvmdn/fsql
$ cd $_
$ git fetch origin
$ git checkout -b refactor/query-structure origin/refactor/query-structure
$ go install
$ which fsql
$GOPATH/bin/fsql

@cdmckay
Copy link

cdmckay commented May 16, 2017

Won't the shell expand the * in your select example?

@kashav
Copy link
Owner Author

kashav commented May 16, 2017

@cdmckay Hah, you're right. The * would have to be escaped as well, I think I'll add an example to the README for that.

This was referenced May 16, 2017
@kashav
Copy link
Owner Author

kashav commented May 17, 2017

The PR for this is up (#16). Going to test over the next few hours and hopefully merge tonight. If you're interested in testing as well, follow #10 (comment).

@kashav
Copy link
Owner Author

kashav commented May 17, 2017

Merged in a6c3339.

@kashav kashav closed this as completed May 17, 2017
@lorenzhs
Copy link

@cdmckay in zsh you can do alias fsql=noglob fsql to disable globbing, then you could use * without escaping it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants