Ejemplo n.º 1
0
 private void parseStatement(TCustomSqlStatement stmt)
 {
     if (!stmtList.Contains(stmt.ToString()))
     {
         stmtList.Add(stmt.ToString());
     }
     else
     {
         return;
     }
     if (stmt is TCreateViewSqlStatement)
     {
         TCreateViewSqlStatement createView = ((TCreateViewSqlStatement)stmt);
         parseCreateView(createView);
     }
     else if (stmt is TCreateTableSqlStatement && ((TCreateTableSqlStatement)stmt).SubQuery != null)
     {
         TCreateTableSqlStatement createTable = ((TCreateTableSqlStatement)stmt);
         parseCreateTable(createTable);
     }
     else if (stmt is TInsertSqlStatement && ((TInsertSqlStatement)stmt).SubQuery != null)
     {
         TInsertSqlStatement insert = ((TInsertSqlStatement)stmt);
         parseInsertStmt(insert);
     }
     if (stmt is TUseDatabase)
     {
         TUseDatabase use = (TUseDatabase)stmt;
         database = use.DatabaseName.ToString();
     }
 }
 private void parseStatement(TCustomSqlStatement stmt)
 {
     if (stmt is TUseDatabase)
     {
         TUseDatabase use = (TUseDatabase)stmt;
         database = use.DatabaseName.ToString();
     }
     else if (stmt is TStoredProcedureSqlStatement)
     {
         TStoredProcedureSqlStatement procedureStmt = (TStoredProcedureSqlStatement)stmt;
         parseProcedureStmt(procedureStmt);
     }
 }