Add RETURN NULL / VOID / EMPTY query functionality

This commit is contained in:
Tobie Morgan Hitchcock 2017-02-20 01:45:09 +00:00
parent 631fd694a8
commit b304c9f3f4

View file

@ -29,6 +29,12 @@ func (e *executor) executeReturnStatement(ast *sql.ReturnStatement) (out []inter
switch what := ast.What.(type) { switch what := ast.What.(type) {
default: default:
out = append(out, what) out = append(out, what)
case *sql.Null:
out = append(out, nil)
case *sql.Void:
// Ignore
case *sql.Empty:
// Ignore
case *sql.Param: case *sql.Param:
out = append(out, e.ctx.Get(what.ID).Data()) out = append(out, e.ctx.Get(what.ID).Data())
} }