diff --git a/sql/data.go b/sql/data.go index abc63b54..fc16d2ea 100644 --- a/sql/data.go +++ b/sql/data.go @@ -105,13 +105,11 @@ func (p *parser) parseDiff() (exp []Expr, err error) { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - val, err := p.declare(tok, lit) + one.JSON, err = p.declare(tok, lit) if err != nil { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - one.JSON = val - exp = append(exp, one) return @@ -127,13 +125,11 @@ func (p *parser) parseMerge() (exp []Expr, err error) { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - val, err := p.declare(tok, lit) + one.JSON, err = p.declare(tok, lit) if err != nil { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - one.JSON = val - exp = append(exp, one) return @@ -149,13 +145,11 @@ func (p *parser) parseContent() (exp []Expr, err error) { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - val, err := p.declare(tok, lit) + one.JSON, err = p.declare(tok, lit) if err != nil { return nil, &ParseError{Found: lit, Expected: []string{"json"}} } - one.JSON = val - exp = append(exp, one) return