亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? driver.java

?? 關(guān)系型數(shù)據(jù)庫 Postgresql 6.5.2
?? JAVA
字號:
package postgresql;import java.sql.*;import java.util.*;import postgresql.util.PSQLException;/** * The Java SQL framework allows for multiple database drivers.  Each * driver should supply a class that implements the Driver interface * * <p>The DriverManager will try to load as many drivers as it can find and * then for any given connection request, it will ask each driver in turn * to try to connect to the target URL. * * <p>It is strongly recommended that each Driver class should be small and * standalone so that the Driver class can be loaded and queried without * bringing in vast quantities of supporting code. * * <p>When a Driver class is loaded, it should create an instance of itself * and register it with the DriverManager.  This means that a user can load * and register a driver by doing Class.forName("foo.bah.Driver") * * @see postgresql.Connection * @see java.sql.Driver */public class Driver implements java.sql.Driver {  // These should be in sync with the backend that the driver was  // distributed with  static final int MAJORVERSION = 6;  static final int MINORVERSION = 5;      // Cache the version of the JDK in use  static String connectClass;      static   {    try {      // moved the registerDriver from the constructor to here      // because some clients call the driver themselves (I know, as      // my early jdbc work did - and that was based on other examples).      // Placing it here, means that the driver is registered once only.      java.sql.DriverManager.registerDriver(new Driver());    } catch (SQLException e) {      e.printStackTrace();    }  }    /**   * Construct a new driver and register it with DriverManager   *   * @exception SQLException for who knows what!   */  public Driver() throws SQLException  {      // Set the connectClass variable so that future calls will handle the correct      // base class      if(System.getProperty("java.version").startsWith("1.1")) {	  connectClass = "postgresql.jdbc1.Connection";      } else {	  connectClass = "postgresql.jdbc2.Connection";      }  }    /**   * Try to make a database connection to the given URL.  The driver   * should return "null" if it realizes it is the wrong kind of   * driver to connect to the given URL.  This will be common, as   * when the JDBC driverManager is asked to connect to a given URL,   * it passes the URL to each loaded driver in turn.   *   * <p>The driver should raise an SQLException if it is the right driver   * to connect to the given URL, but has trouble connecting to the   * database.   *   * <p>The java.util.Properties argument can be used to pass arbitrary   * string tag/value pairs as connection arguments.  Normally, at least   * "user" and "password" properties should be included in the    * properties.   *   * Our protocol takes the forms:   * <PRE>   *	jdbc:postgresql://host:port/database?param1=val1&...   * </PRE>   *   * @param url the URL of the database to connect to   * @param info a list of arbitrary tag/value pairs as connection   *	arguments   * @return a connection to the URL or null if it isnt us   * @exception SQLException if a database access error occurs   * @see java.sql.Driver#connect   */  public java.sql.Connection connect(String url, Properties info) throws SQLException  {    if((props = parseURL(url,info))==null)      return null;        DriverManager.println("Using "+connectClass);        try {	postgresql.Connection con = (postgresql.Connection)(Class.forName(connectClass).newInstance());	con.openConnection (host(), port(), props, database(), url, this);	return (java.sql.Connection)con;    } catch(ClassNotFoundException ex) {	throw new PSQLException("postgresql.jvm.version",ex);    } catch(PSQLException ex1) {	// re-throw the exception, otherwise it will be caught next, and a	// postgresql.unusual error will be returned instead.	throw ex1;    } catch(Exception ex2) {	throw new PSQLException("postgresql.unusual",ex2);    }  }    /**   * Returns true if the driver thinks it can open a connection to the   * given URL.  Typically, drivers will return true if they understand   * the subprotocol specified in the URL and false if they don't.  Our   * protocols start with jdbc:postgresql:   *   * @see java.sql.Driver#acceptsURL   * @param url the URL of the driver   * @return true if this driver accepts the given URL   * @exception SQLException if a database-access error occurs   * 	(Dont know why it would *shrug*)   */  public boolean acceptsURL(String url) throws SQLException  {    if(parseURL(url,null)==null)      return false;    return true;  }    /**   * The getPropertyInfo method is intended to allow a generic GUI   * tool to discover what properties it should prompt a human for   * in order to get enough information to connect to a database.   *   * <p>Note that depending on the values the human has supplied so   * far, additional values may become necessary, so it may be necessary   * to iterate through several calls to getPropertyInfo   *   * @param url the Url of the database to connect to   * @param info a proposed list of tag/value pairs that will be sent on   * 	connect open.   * @return An array of DriverPropertyInfo objects describing   * 	possible properties.  This array may be an empty array if   *	no properties are required   * @exception SQLException if a database-access error occurs   * @see java.sql.Driver#getPropertyInfo   */  public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException  {    Properties p = parseURL(url,info);        // naughty, but its best for speed. If anyone adds a property here, then    // this _MUST_ be increased to accomodate them.    DriverPropertyInfo d,dpi[] = new DriverPropertyInfo[0];    //int i=0;        //dpi[i++] = d = new DriverPropertyInfo("auth",p.getProperty("auth","default"));    //d.description = "determines if password authentication is used";    //d.choices = new String[4];    //d.choices[0]="default";	// Get value from postgresql.auth property, defaults to trust    //d.choices[1]="trust";	// No password authentication    //d.choices[2]="password";	// Password authentication    //d.choices[3]="ident";	// Ident (RFC 1413) protocol        return dpi;  }    /**   * Gets the drivers major version number   *   * @return the drivers major version number   */  public int getMajorVersion()  {    return MAJORVERSION;  }    /**   * Get the drivers minor version number   *   * @return the drivers minor version number   */  public int getMinorVersion()  {    return MINORVERSION;  }    /**   * Report whether the driver is a genuine JDBC compliant driver.  A   * driver may only report "true" here if it passes the JDBC compliance   * tests, otherwise it is required to return false.  JDBC compliance   * requires full support for the JDBC API and full support for SQL 92   * Entry Level.     *   * <p>For PostgreSQL, this is not yet possible, as we are not SQL92   * compliant (yet).   */  public boolean jdbcCompliant()  {    return false;  }    private Properties props;    static private String[] protocols = { "jdbc","postgresql" };    /**   * Constructs a new DriverURL, splitting the specified URL into its   * component parts   * @param url JDBC URL to parse   * @param defaults Default properties   * @return Properties with elements added from the url   * @exception SQLException   */  Properties parseURL(String url,Properties defaults) throws SQLException  {    int state = -1;    Properties urlProps = new Properties(defaults);    String key = new String();    String value = new String();        StringTokenizer st = new StringTokenizer(url, ":/;=&?", true);    for (int count = 0; (st.hasMoreTokens()); count++) {      String token = st.nextToken();            // PM June 29 1997      // Added this, to help me understand how this works.      // Unless you want each token to be processed, leave this commented out      // but don't delete it.      //DriverManager.println("wellFormedURL: state="+state+" count="+count+" token='"+token+"'");            // PM Aug 2 1997 - Modified to allow multiple backends      if (count <= 3) {	if ((count % 2) == 1 && token.equals(":"))	  ;	else if((count % 2) == 0) {	  boolean found=(count==0)?true:false;	  for(int tmp=0;tmp<protocols.length;tmp++) {	    if(token.equals(protocols[tmp])) {	      // PM June 29 1997 Added this property to enable the driver	      // to handle multiple backend protocols.	      if(count == 2 && tmp > 0) {		urlProps.put("Protocol",token);		found=true;	      }	    }	  }	  	  if(found == false)	    return null;	} else return null;      }      else if (count > 3) {	if (count == 4 && token.equals("/")) state = 0;	else if (count == 4) {	  urlProps.put("PGDBNAME", token);	  state = -2;	}	else if (count == 5 && state == 0 && token.equals("/"))	  state = 1;	else if (count == 5 && state == 0)	  return null;	else if (count == 6 && state == 1)	  urlProps.put("PGHOST", token);	else if (count == 7 && token.equals(":")) state = 2;	else if (count == 8 && state == 2) {	  try {	    Integer portNumber = Integer.decode(token);	    urlProps.put("PGPORT", portNumber.toString());	  } catch (Exception e) {	    return null;	  }	}	else if ((count == 7 || count == 9) &&		 (state == 1 || state == 2) && token.equals("/"))	  state = -1;	else if (state == -1) {	  urlProps.put("PGDBNAME", token);	  state = -2;	}	else if (state <= -2 && (count % 2) == 1) {	  // PM Aug 2 1997 - added tests for ? and &	  if (token.equals(";") || token.equals("?") || token.equals("&") ) state = -3;	  else if (token.equals("=")) state = -5;	}	else if (state <= -2 && (count % 2) == 0) {	  if (state == -3) key = token;	  else if (state == -5) {	    value = token;	    //DriverManager.println("put("+key+","+value+")");	    urlProps.put(key, value);	    state = -2;	  }	}      }    }        // PM June 29 1997    // This now outputs the properties only if we are logging    if(DriverManager.getLogStream() != null)      urlProps.list(DriverManager.getLogStream());        return urlProps;      }    /**   * @return the hostname portion of the URL   */  public String host()  {    return props.getProperty("PGHOST","localhost");  }    /**   * @return the port number portion of the URL or -1 if no port was specified   */  public int port()  {    return Integer.parseInt(props.getProperty("PGPORT","5432"));  }    /**   * @return the database name of the URL   */  public String database()  {    return props.getProperty("PGDBNAME");  }    /**   * @return the value of any property specified in the URL or properties   * passed to connect(), or null if not found.   */  public String property(String name)  {    return props.getProperty(name);  }        /**     * This method was added in v6.5, and simply throws an SQLException     * for an unimplemented method. I decided to do it this way while     * implementing the JDBC2 extensions to JDBC, as it should help keep the     * overall driver size down.     */    public static SQLException notImplemented()    {	return new PSQLException("postgresql.unimplemented");    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精子c满五个校花| 自拍偷自拍亚洲精品播放| 99久久精品国产一区| 五月激情六月综合| 中文字幕乱码亚洲精品一区| 6080午夜不卡| 色婷婷精品大在线视频| 国产成人精品一区二区三区四区| 亚洲一级不卡视频| 亚洲婷婷综合色高清在线| 精品欧美一区二区久久| 欧美日韩免费电影| 99免费精品在线观看| 韩国女主播一区| 日韩精品乱码av一区二区| 日韩毛片一二三区| 欧美激情一区二区三区蜜桃视频 | 亚洲色图在线看| 久久精品亚洲麻豆av一区二区 | 日韩精品一区二区三区三区免费 | 亚洲婷婷综合色高清在线| 国产校园另类小说区| 精品久久久久av影院| 91精品国产综合久久香蕉麻豆| 色综合婷婷久久| 91麻豆文化传媒在线观看| 国产成人免费视频网站| 国产在线一区二区综合免费视频| 蜜桃久久久久久久| 日本成人中文字幕| 日本视频免费一区| 日韩福利视频导航| 蜜桃精品在线观看| 久久国产综合精品| 美女视频黄久久| 久久精品国产精品亚洲精品| 日本成人在线不卡视频| 免费在线看成人av| 麻豆成人在线观看| 国内国产精品久久| 国产在线观看免费一区| 国产69精品久久久久777| 国产99精品在线观看| 成人爱爱电影网址| 91亚洲永久精品| 色香蕉成人二区免费| 欧美三级视频在线观看 | 中文字幕在线观看一区| 亚洲天堂av老司机| 伊人色综合久久天天人手人婷| 亚洲欧美福利一区二区| 亚洲综合色丁香婷婷六月图片| 亚洲一区二区四区蜜桃| 日本在线不卡视频一二三区| 老司机一区二区| 国产成人aaa| 91小宝寻花一区二区三区| 欧美综合久久久| 日韩欧美国产一区二区三区| 精品第一国产综合精品aⅴ| 久久蜜桃av一区精品变态类天堂| 国产农村妇女毛片精品久久麻豆| 亚洲欧美偷拍三级| 香蕉成人啪国产精品视频综合网| 午夜国产精品一区| 国产精品 欧美精品| 91欧美激情一区二区三区成人| 欧美系列亚洲系列| 欧美精品一区男女天堂| 椎名由奈av一区二区三区| 日韩综合一区二区| 国产99精品在线观看| 在线免费视频一区二区| 日韩精品一区二区三区在线| 中文字幕制服丝袜成人av| 亚洲国产综合在线| 国产自产2019最新不卡| 在线一区二区三区四区| 欧美α欧美αv大片| 国产精品国产三级国产a| 秋霞电影一区二区| av高清久久久| 欧美精品一区视频| 亚洲影院免费观看| 国产馆精品极品| 欧美日韩一区二区在线视频| 国产欧美精品一区二区色综合| 一区二区三区美女视频| 国产综合久久久久影院| 欧美中文字幕一区| 国产农村妇女毛片精品久久麻豆 | 亚洲一二三区在线观看| 国产成a人亚洲| 91精品国产综合久久精品麻豆| 国产精品区一区二区三区| 日韩高清在线观看| 日本高清不卡一区| 国产精品视频九色porn| 久久精品国产精品亚洲综合| 欧美伊人精品成人久久综合97 | 在线观看日韩高清av| 久久久久国产精品麻豆| 日韩精品午夜视频| 在线观看国产91| 国产精品免费久久久久| 韩国成人在线视频| 91精品国产欧美一区二区成人| 亚洲欧美另类图片小说| 国产成人精品免费一区二区| 精品日韩av一区二区| 亚洲高清在线精品| 欧洲人成人精品| 亚洲色大成网站www久久九九| 国产成人aaa| 久久久99久久| 国产做a爰片久久毛片 | 亚洲午夜精品网| 色综合一区二区| 亚洲免费观看在线视频| 不卡高清视频专区| 国产精品午夜电影| 成人激情免费电影网址| 久久久蜜臀国产一区二区| 久久精品国产久精国产爱| 日韩一级高清毛片| 日本vs亚洲vs韩国一区三区 | 蜜臀久久99精品久久久久久9| 欧美亚洲动漫制服丝袜| 一区二区三区四区av| 91免费小视频| 亚洲免费看黄网站| 在线观看一区不卡| 亚洲国产精品一区二区久久| 欧美视频一区二| 亚洲成人动漫在线观看| 欧美日韩一区不卡| 丝袜美腿亚洲色图| 91精品黄色片免费大全| 日本va欧美va瓶| 久久综合久久99| 懂色av一区二区三区免费观看| 国产欧美一区二区精品性色| 不卡视频一二三| 亚洲精品成a人| 欧美丰满少妇xxxxx高潮对白| 人人爽香蕉精品| 久久新电视剧免费观看| 国产69精品久久久久777| 亚洲欧美怡红院| 欧美日韩一级片网站| 免费一区二区视频| 国产日韩欧美高清在线| av男人天堂一区| 亚洲电影你懂得| 精品国产乱码久久久久久免费 | 亚洲精品一区二区三区福利| 国产精品一级片| 亚洲少妇中出一区| 欧美日韩第一区日日骚| 精品一二三四在线| 国产精品久久久久久久浪潮网站 | 亚洲午夜在线观看视频在线| 欧美精品在线一区二区三区| 美女诱惑一区二区| 日本一区二区不卡视频| 欧美手机在线视频| 国内精品伊人久久久久av一坑| 国产精品美女久久久久久久久| 在线看一区二区| 激情久久五月天| 亚洲女与黑人做爰| 91精品中文字幕一区二区三区| 国产成人综合自拍| 一区二区三国产精华液| 日韩欧美国产精品| 91丨porny丨蝌蚪视频| 美日韩黄色大片| 亚洲免费观看高清在线观看| 日韩天堂在线观看| 91亚洲资源网| 国产一区二区三区精品欧美日韩一区二区三区 | 91福利在线观看| 在线精品视频一区二区三四| 精品一区二区三区久久| 亚洲男同性视频| 精品99999| 欧美性大战xxxxx久久久| 国产成人在线视频网址| 午夜影视日本亚洲欧洲精品| 国产精品视频麻豆| 欧美成人精品3d动漫h| 日本道在线观看一区二区| 国产真实乱对白精彩久久| 五月婷婷另类国产| 日韩久久一区二区| 久久久午夜精品理论片中文字幕| 欧美精品乱人伦久久久久久| 91亚洲精品久久久蜜桃网站| 国产一区二区三区免费看| 日韩激情在线观看|