package com.palacesun.engine.test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Test9 {
   public static final String url = "jdbc:masking:mysql://192.168.2.202:3306/test";
   public static final String userName = "root";
   public static final String password = "root";

   public static void main(String[] args) {
      Connection conn = null;
      Statement stmt = null;
      ResultSet rs = null;

      try {
         Class.forName("com.palacesun.engine.spy.MaskingDriver");
         conn = DriverManager.getConnection("jdbc:masking:mysql://192.168.2.202:3306/test", "root", "root");
         stmt = conn.createStatement();
         String sql = "select t.name as aaa from t_user t";
         rs = stmt.executeQuery(sql);

         while(rs.next()) {
         }
      } catch (Exception e) {
         e.printStackTrace();
      } finally {
         try {
            if (null != rs) {
               rs.close();
            }

            if (null != stmt) {
               stmt.close();
            }

            if (null != conn) {
               conn.close();
            }
         } catch (SQLException var12) {
         }

      }

   }
}
