mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 23:31:03 +00:00
fix linter warnings
This commit is contained in:
parent
cbf80370cb
commit
3b676a7cbd
2 changed files with 9 additions and 3 deletions
|
|
@ -59,7 +59,9 @@ func (p *parser) Parse() (*Query, error) {
|
|||
p.PQL = PQL{
|
||||
Buffer: string(buf),
|
||||
}
|
||||
p.Init()
|
||||
if err := p.Init(); err != nil {
|
||||
return nil, errors.Wrap(err, "initializing")
|
||||
}
|
||||
err = p.PQL.Parse()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "parsing")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ import (
|
|||
func TestPEG(t *testing.T) {
|
||||
p := PQL{Buffer: `
|
||||
SetBit(Union(Zitmap(row==4), Intersect(Qitmap(blah>4), Ritmap(field="http://zoo9.com=\\'hello' and \"hello\"")), Hitmap(row=ag-bee)), a="4z", b=5) Count(Union(Witmap(row=5.73, frame=.10), Row(zztop><[2, 9]))) TopN(blah, fields=["hello", "goodbye", "zero"])`[1:]}
|
||||
p.Init()
|
||||
if err := p.Init(); err != nil {
|
||||
t.Fatalf("initialization error: %v", err)
|
||||
}
|
||||
err := p.Parse()
|
||||
if err != nil {
|
||||
t.Fatalf("parse error: %v", err)
|
||||
|
|
@ -32,7 +34,9 @@ SetBit(Union(Zitmap(row==4), Intersect(Qitmap(blah>4), Ritmap(field="http://zoo9
|
|||
p.Execute()
|
||||
|
||||
p = PQL{Buffer: `SetRowAttrs(attr="http://zoo9.com=\\'hello' "and \"hello\"")`}
|
||||
p.Init()
|
||||
if err := p.Init(); err != nil {
|
||||
t.Fatalf("initialization error: %v", err)
|
||||
}
|
||||
err = p.Parse()
|
||||
if err == nil {
|
||||
t.Fatalf("should have been an error because of the interior unescaped double quote")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue