diff --git a/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java b/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java new file mode 100644 index 0000000..dc5b324 --- /dev/null +++ b/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java @@ -0,0 +1,111 @@ +package org.panda.jdbc.pool; + +import javax.sql.DataSource; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.logging.Logger; + +/** + * @Author: qi + * @Description:自定义数据库连接池 + * @Date: Create in 9:54 AM 2019/8/14 + */ +public class JdbcPool implements DataSource { + + /** + * 获取连接 + * @return + * @throws SQLException + */ + @Override + public Connection getConnection() throws SQLException { + return null; + } + + /** + * 获取连接 + * @param username + * @param password + * @return + * @throws SQLException + */ + @Override + public Connection getConnection(String username, String password) throws SQLException { + return null; + } + + /** + * 拆开 + * @param iface + * @param + * @return + * @throws SQLException + */ + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + /** + * 是否包装 + * @param iface + * @return + * @throws SQLException + */ + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + /** + * 获取日志编写器 + * @return + * @throws SQLException + */ + @Override + public PrintWriter getLogWriter() throws SQLException { + return null; + } + + /** + * 设置日志编写器 + * @param out + * @throws SQLException + */ + @Override + public void setLogWriter(PrintWriter out) throws SQLException { + + } + + /** + * 设置逻辑超时 + * @param seconds + * @throws SQLException + */ + @Override + public void setLoginTimeout(int seconds) throws SQLException { + + } + + /** + * 获取登录超时 + * @return + * @throws SQLException + */ + @Override + public int getLoginTimeout() throws SQLException { + return 0; + } + + /** + * 获取父记录器 + * @return + * @throws SQLFeatureNotSupportedException + */ + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + return null; + } +}