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

Add subqueries, attribute modifiers & interactive mode #27

Merged
merged 42 commits into from
Jun 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
91b7cc1
Add subquery tokenizer
kashav May 17, 2017
cfb7824
Minor tokenizer refactor
kashav May 18, 2017
7437a25
Replace stack implementation with Lane (oleiade/lane)
kashav May 18, 2017
6050e0c
Fix bug with missing ending identifier in parsed subqueries
kashav May 18, 2017
4aa37d3
Add prelim. implementation of subqueries; update package structure
kashav May 20, 2017
f9e8caf
Fix failing tests; track tokens with slice instead of linked list
kashav May 22, 2017
f5fc17b
Add support for attribute transformations in SELECT clause
khageshpatel May 23, 2017
adaa2e7
gofmt
kashav May 24, 2017
6a3ecf0
Misc. edits to transformation implementation
kashav May 24, 2017
bb9efe2
Use regex to detect exclusions instead of string.Contains (#21)
beeceej May 24, 2017
dc730f9
Minor clean-up
kashav May 24, 2017
e5954f2
Merge branch 'feature/subquery' into feature/attribute-modifiers
kashav May 24, 2017
39a87bf
Remove print statements
kashav May 24, 2017
0f882c8
Add format function for `time`
kashav May 24, 2017
8bf9820
Support uppercase modifiers
kashav May 24, 2017
8dc8418
Refactor attribute modifier implementation
kashav May 25, 2017
a2145ac
Add .travis.yml
kashav May 25, 2017
2ee74f8
Return interface{} instead of string in name methods
kashav May 25, 2017
2111283
use filepath.Clean on user inputted paths
beeceej May 25, 2017
7221e38
Merge pull request #25 from jonesbrianc26/bugfix/clean-file-paths
kashav May 25, 2017
e4686b9
Add support for modifiers in subqueries and list values
kashav May 25, 2017
5b56312
Add boilerplate for `!` token
kashav May 25, 2017
5535abe
Fix GB multiplier; add test, remove build/fsql from .PHONY target
kashav May 28, 2017
d5faced
Run tests with verbose flag
kashav May 29, 2017
d301448
Add parser & token unit tests; various structure tweaks
kashav May 29, 2017
4081f98
Update README to reflect structure changes
kashav May 29, 2017
6f4afd7
Fix failing build; add lint, vet, and test cmds to README.
kashav May 29, 2017
04c58df
Change default `name` value to fullpath, add SHORTPATH function
kashav May 29, 2017
11c095d
Fix bug with chained functions in WHERE clause
kashav May 29, 2017
ff97b71
Revert change to default name value
kashav May 29, 2017
0d33a6e
Clean-up test cases; resolve `go vet` issues
kashav May 29, 2017
d4d767a
Add interactive mode with channel-based prompt
kashav May 29, 2017
b4a8d99
Add support for formatting/parsing custom time layouts
kashav May 29, 2017
67a73d7
Add *.go to sources wildcard
kashav Jun 2, 2017
e289fc9
Minor clean-up
kashav Jun 2, 2017
5140c9d
Use new path in build step
kashav Jun 4, 2017
a82df1a
Add support for REGEXP token, allow uppercase `mode` values (DIR/REG)
kashav Jun 4, 2017
c1c6a15
Use buffer to read query
kashav Jun 4, 2017
adc1ed7
Update README to reflect changes
kashav Jun 4, 2017
0783806
Use custom type `state` to choose prompt text
kashav Jun 4, 2017
6056684
Resolve merge conflicts
kashav Jun 4, 2017
5d60e0e
Various tweaks
kashav Jun 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ vendor/
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

# Compiled executables
# Compiled binaries
fsql
debug
main
build/

# Allow cmd/fsql
!cmd/fsql

# Editor workspace directories
.vscode
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: go
go:
- 1.8
os:
- linux
- osx
matrix:
fast_finish: true
install:
- go get -u -v github.com/kshvmdn/fsql/...
before_script:
- go vet -v ./...
script:
- go test -v ./...
48 changes: 29 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
name := fsql
sources := $(wildcard **/*.go)
sources := $(wildcard *.go **/*.go)

build = GOOS=$(1) GOARCH=$(2) go build -o build/$(name)$(3)
build = GOOS=$(1) GOARCH=$(2) go build -o build/$(name)$(3) ./cmd/fsql
tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(name)$(3) && rm $(name)$(3)
zip = cd build && zip $(1)_$(2).zip $(name)$(3) && rm $(name)$(3)

.PHONY: fsql build clean install lint

all: fsql

build: darwin linux windows

fsql: $(sources)
go build -o ./$(name) -v .

.PHONY: clean
clean:
rm -rf ./$(name) build/

lint:
${GOPATH}/bin/golint . query compare
.PHONY: fmt
fmt:
go fmt ./...

fsql: $(sources)
go build -o ./$(name) -v ./cmd/fsql

.PHONY: install
install:
go get -u -v
go get -u -v ./...

test: fsql
go test
.PHONY: lint
lint:
${GOPATH}/bin/golint ./...

.PHONY: test
test:
go test -v ./...

.PHONY: vet
vet:
go vet -v ./...

##### DARWIN BUILDS #####
darwin: build/darwin_amd64.tar.gz

build/darwin_amd64.tar.gz: $(sources)
$(call build,darwin,amd64,)
$(call tar,darwin,amd64)

##### LINUX BUILDS #####
linux: build/linux_arm.tar.gz build/linux_arm64.tar.gz build/linux_386.tar.gz build/linux_amd64.tar.gz
Expand All @@ -45,13 +62,6 @@ build/linux_arm64.tar.gz: $(sources)
$(call build,linux,arm64,)
$(call tar,linux,arm64)

##### DARWIN BUILDS #####
darwin: build/darwin_amd64.tar.gz

build/darwin_amd64.tar.gz: $(sources)
$(call build,darwin,amd64,)
$(call tar,darwin,amd64)

##### WINDOWS BUILDS #####
windows: build/windows_386.zip build/windows_amd64.zip

Expand Down
Loading