Add DB delete (#134)

This commit is contained in:
Asim Aslam
2021-06-02 18:19:09 +01:00
committed by GitHub
parent d49c75bd5c
commit abbb37c592
8 changed files with 57 additions and 33 deletions

View File

@@ -96,7 +96,7 @@ func Parse(q string) ([]Query, error) {
switch current.Op {
case itemEquals, itemNotEquals:
default:
return nil, fmt.Errorf("operator '%v' can't be used with strings", opToString[token.Typ])
return nil, fmt.Errorf("operator '%v' can't be used with strings", opToString[current.Op])
}
if len(token.Text) < 2 {
@@ -107,14 +107,14 @@ func Parse(q string) ([]Query, error) {
switch current.Op {
case itemEquals, itemNotEquals:
default:
return nil, fmt.Errorf("operator '%v' can't be used with bools", opToString[token.Typ])
return nil, fmt.Errorf("operator '%v' can't be used with bools", opToString[current.Op])
}
current.Value = true
case itemBoolFalse:
switch current.Op {
case itemEquals, itemNotEquals:
default:
return nil, fmt.Errorf("operator '%v' can't be used with bools", opToString[token.Typ])
return nil, fmt.Errorf("operator '%v' can't be used with bools", opToString[current.Op])
}
current.Value = false
case itemInt: