FileDocCategorySizeDatePackage
ParsingSimpleCheckerImpl.javaAPI DocExample1648Fri Oct 01 15:08:44 BST 1999None

ParsingSimpleCheckerImpl

public class ParsingSimpleCheckerImpl extends sqlj.semantics.sql.SimpleCheckerImpl

Fields Summary
private sqlj.semantics.sql.CheckerOptions
m_opt
Constructors Summary
Methods Summary
public voidparse(sqlj.framework.error.ErrorLog errlog, java.sql.Connection conn, sqlj.framework.checker.SQLOperation op, short[] sql_types)

     String stmt = op.getSQLString();
     SQLUtil su = new SQLUtil(stmt);

     if (m_opt.getVerbose())
     {
       su.enable_tracing();
     }
     else
     {
       su.disable_tracing();
     }

     try
     {
       if (op.getOperationCode() == SQLOperation.CALL
           || op.getOperationCode() == SQLOperation.VALUES)
       {
         su.call_expr();
       }
       else
       {
         su.sql_statement();
       }
     }
     catch (ParseException exn)
     {
        CustomParseException cpe = new CustomParseException(exn);

        if (m_opt.getPortable())
        {
          errlog.addEntry(new JSError(cpe.getMessage(stmt)));
        }
        else
        {
          errlog.addEntry(new Warning(cpe.getMessage(stmt)));
        }
     }  
     catch (TokenMgrError exn)
     {
        if (m_opt.getPortable())
        {
          errlog.addEntry(new JSError(exn.getMessage()));
        }
        else
        {
          errlog.addEntry(new Warning(exn.getMessage()));
        }
     }
  
public voidsetCheckerOptions(sqlj.semantics.sql.CheckerOptions opt)

 m_opt = opt; super.setCheckerOptions(opt);