GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add '<>' as not equal to in where clause · filhodanuvem/gitql@f0d7b3b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lexical
    • lexical.go
  • runtime
    • commits_test.go
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lexical/lexical.go‎

Copy file name to clipboardExpand all lines: lexical/lexical.go
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ func Token() (uint8, *TokenError) {
142142
if lexeme == "=" {
143143
state = S_SMALLER_OR_EQUAL
144144
break
145+
} else if lexeme == ">" {
146+
char = nextChar()
147+
return T_NOT_EQUAL, nil
145148
}
146149
return T_SMALLER, nil
147150
case S_SMALLER_OR_EQUAL:
Collapse file

‎runtime/commits_test.go‎

Copy file name to clipboardExpand all lines: runtime/commits_test.go
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,23 @@ func TestSelectedFieldsCount(t *testing.T) {
8484
}
8585
}
8686

87+
func TestNotEqualsInWhereLTGT(t *testing.T) {
88+
queryData := "select committer, hash from commits limit 1"
89+
table := getTableForQuery(queryData, "../", t)
90+
firstCommitter := table.rows[0]["committer"].(string)
91+
query := fmt.Sprintf("select committer, hash from commits where committer <> '%s' limit 1", firstCommitter)
92+
table = getTableForQuery(query, "../", t)
93+
if firstCommitter == table.rows[0]["committer"].(string) {
94+
t.Errorf("Still got the same committer as the first one. - %s", firstCommitter)
95+
}
96+
}
8797
func TestNotEqualsInWhere(t *testing.T) {
8898
queryData := "select committer, hash from commits limit 1"
8999
table := getTableForQuery(queryData, "../", t)
90100
firstCommitter := table.rows[0]["committer"].(string)
91101
query := fmt.Sprintf("select committer, hash from commits where committer != '%s' limit 1", firstCommitter)
92102
table = getTableForQuery(query, "../", t)
93103
if firstCommitter == table.rows[0]["committer"].(string) {
94-
t.Errorf("Strill got the same committer as the first one. - %s", firstCommitter)
104+
t.Errorf("Still got the same committer as the first one. - %s", firstCommitter)
95105
}
96106
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.