Fix bug related to 'anon' role prepared statements

This commit is contained in:
Vikram Rangnekar
2020-03-06 15:38:54 +05:30
parent 7930719eaa
commit 6c240e21b4
5 changed files with 21 additions and 4 deletions

View File

@ -17,6 +17,10 @@ const (
closeBlock = 500
)
var (
ErrAllTablesSkipped = errors.New("all tables skipped. cannot render query")
)
type Variables map[string]json.RawMessage
type Config struct {
@ -107,7 +111,7 @@ func (co *Compiler) compileQuery(qc *qcode.QCode, w io.Writer, vars Variables) (
io.WriteString(c.w, `) as "__root" FROM `)
if i == 0 {
return 0, errors.New("all tables skipped. cannot render query")
return 0, ErrAllTablesSkipped
}
var ignored uint32