package org.springblade.sqlfly;

import lombok.extern.slf4j.Slf4j;

/**
 * 测试类
 * 
 * @author William
 * @date 2022年10月28日 上午11:31:56
 */
@Slf4j
public class SqlFlyApp {

	public static void main(String[] args) {
//		DataSourceModel source = new DataSourceModel();
//		source.setDsType(0);
//		source.setDriverClassName("com.mysql.cj.jdbc.Driver");
//		source.setDsDb("sanlitun_thecook");
//		source.setDsIp("121.204.249.165");
//		source.setDsPort(3306);
//		source.setDsUser("sanlitun_thecook");
//		source.setDsPassword("6yWztYSCRFPhAPKs");
//		source.setUrl(
//				"jdbc:mysql://121.204.249.165:3306/sanlitun_thecook?rewriteBatchedStatements=true&serverTimezone=GMT%2B8");
//
//		IFly fly = IFly.get(source);
//		Column col = fly.getPrimaryColumn("test_form");
//		System.out.print("required is " + col.getRequired());
		
		String url = "jdbc:oracle:thin:@114.115.238.246:1521/helowin";
		String dbName = url.split(":")[4].split("/")[1];
		log.info(dbName);

	}

}
