bug sql.js: str is undefined

Signed-off-by: Marc Delisle <marc@infomarc.info>