Skip to content

Commit

Permalink
Enhance spqrparser (#242)
Browse files Browse the repository at this point in the history
* Enhance spqrparser

* Fix tests

* Fix tests

* Add unit test

* Enhance lexel-parser more

* Fix kill client stmt

* Fix

* No lint gen file

* Fix nolint

* no lint yacc/console

---------

Co-authored-by: denchick <[email protected]>
  • Loading branch information
reshke and Denchick authored Jul 24, 2023
1 parent d6b85a5 commit c841ff8
Show file tree
Hide file tree
Showing 13 changed files with 1,547 additions and 723 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=10m --out-format=colored-line-number
args: --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console

goimports:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ feature_test: build_images
(cd test/feature; go test -timeout 150m)

lint:
golangci-lint run --timeout=10m --out-format=colored-line-number
golangci-lint run --timeout=10m --out-format=colored-line-number --skip-dirs=yacc/console

####################### GENERATE #######################

Expand Down
2 changes: 1 addition & 1 deletion pkg/clientinteractor/interactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func MatchRow(row []string, nameToIndex map[string]int, condition spqrparser.Whe
case spqrparser.WhereClauseEmpty:
return true, nil
case spqrparser.WhereClauseOp:
switch where.Op {
switch strings.ToLower(where.Op) {
case "and":
left, err := MatchRow(row, nameToIndex, where.Left)
if err != nil {
Expand Down
7 changes: 7 additions & 0 deletions yacc/console/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lexgen:
ragel -Z -G2 -o lex.go lex.rl

yaccgen:
goyacc -o gram.go -p yy gram.y

gen: lexgen yaccgen
70 changes: 0 additions & 70 deletions yacc/console/console_test.go

This file was deleted.

Loading

0 comments on commit c841ff8

Please sign in to comment.