⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.java

📁 SQL Plus是一款通用数据库操纵、存取程序
💻 JAVA
字号:
package com.ora.db;
import java.sql.*;
/**
 * interface Client <br>
 * 数据库处理接口
 */
public interface Client
{
	/** 连接数据库URL*/
	public final String DB_URL  = "jdbc:mysql://localhost/guestbook"; 
	/** 数据库访问密码*/
	public final String DB_PASS = "root"; 	
	/** 数据库访问用户名*/
	public final String DB_USER = "root";
	/** 数据库JDBC驱动程序*/
	public final String DB_JDBC = "org.gjt.mm.mysql.Driver";
	/**
	 * Method connectDB()
	 * <br>
	 * 采用默认参数连接到数据库。
	 */
	public void connectDB() throws SQLException, ClassNotFoundException;
	/**
	 * Method connectDB(jdbc, url, user, pass) <br>
	 * 根据所给的参数连接到指定的数据库。
	 * <br>
	 * @param jdbc String 驱动程序
	 * @param url String 指定数据库
	 * @param user String 用户名
	 * @param pass String 密码
	 */
	public void connectDB(String jdbc, String url, String user, String pass) throws SQLException, ClassNotFoundException;
	/**
	 * Method closeDB() <br>
	 * 关闭当前打开的数据库  
	 * @throws SQLException
	 */
	public void closeDB() throws SQLException;
	/**
	 * Method execSQL(sql) <br>
	 * 执行所有SQL语句
	 * @param sql String 待处理SQL语句,比如:update, delete etc.
	 * @throws SQLException
	 */
	public void execSQL(String sql);
	/**
	 * Methos version()
	 * 打印版本信息
	 * 
	 */
	public void version();
	/**
	 * Method setAutoCommit()
	 * 设置是否自动提交
	 */
	public void setAutoCommit();
	/**
	 * 导入IP到当前连接的数据库中
	 * @param mdb
	 */
	public void importIPDB(String mdb, String table, String totable, String fin, String tin);
	public void importIPDB(String mdb, String table, String totable, String fin, String tin, int threads);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -