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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? metadatatest.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
				assertEquals(asBytesTrue[0], 1);				assertEquals(asBytesFalse[0], 0);				assertEquals(asBytesNull, null);				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBitField");				this.stmt						.executeUpdate("CREATE TABLE testBitField(field1 BIT(9))");				this.rs = this.stmt						.executeQuery("SELECT field1 FROM testBitField");				System.out.println(this.rs.getMetaData().getColumnClassName(1));			} finally {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBitType");			}		}	}	public void testSupportsSelectForUpdate() throws Exception {		boolean supportsForUpdate = this.conn.getMetaData()				.supportsSelectForUpdate();		if (this.versionMeetsMinimum(4, 0)) {			assertTrue(supportsForUpdate);		} else {			assertTrue(!supportsForUpdate);		}	}	public void testTinyint1IsBit() throws Exception {		String tableName = "testTinyint1IsBit";		// Can't use 'BIT' or boolean		createTable(tableName, "(field1 TINYINT(1))");		this.stmt.executeUpdate("INSERT INTO " + tableName + " VALUES (1)");		Properties props = new Properties();		props.setProperty("tinyint1IsBit", "true");		props.setProperty("transformedBitIsBoolean", "true");		Connection boolConn = getConnectionWithProps(props);		this.rs = boolConn.createStatement().executeQuery(				"SELECT field1 FROM " + tableName);		checkBitOrBooleanType(false);		this.rs = boolConn.prepareStatement("SELECT field1 FROM " + tableName)				.executeQuery();		checkBitOrBooleanType(false);		this.rs = boolConn.getMetaData().getColumns(boolConn.getCatalog(),				null, tableName, "field1");		assertTrue(this.rs.next());		if (versionMeetsMinimum(4, 1)) {			assertEquals(Types.BOOLEAN, this.rs.getInt("DATA_TYPE"));		} else {			assertEquals(Types.BIT, this.rs.getInt("DATA_TYPE"));		}		if (versionMeetsMinimum(4, 1)) {			assertEquals("BOOLEAN", this.rs.getString("TYPE_NAME"));		} else {			assertEquals("BIT", this.rs.getString("TYPE_NAME"));		}		props.clear();		props.setProperty("transformedBitIsBoolean", "false");		props.setProperty("tinyint1IsBit", "true");		Connection bitConn = getConnectionWithProps(props);		this.rs = bitConn.createStatement().executeQuery(				"SELECT field1 FROM " + tableName);		checkBitOrBooleanType(true);		this.rs = bitConn.prepareStatement("SELECT field1 FROM " + tableName)				.executeQuery();		checkBitOrBooleanType(true);		this.rs = bitConn.getMetaData().getColumns(boolConn.getCatalog(), null,				tableName, "field1");		assertTrue(this.rs.next());		assertEquals(Types.BIT, this.rs.getInt("DATA_TYPE"));		assertEquals("BIT", this.rs.getString("TYPE_NAME"));	}	private void checkBitOrBooleanType(boolean usingBit) throws SQLException {		assertTrue(this.rs.next());		assertEquals("java.lang.Boolean", this.rs.getObject(1).getClass()				.getName());		if (!usingBit) {			if (versionMeetsMinimum(4, 1)) {				assertEquals(Types.BOOLEAN, this.rs.getMetaData()						.getColumnType(1));			} else {				assertEquals(Types.BIT, this.rs.getMetaData().getColumnType(1));			}		} else {			assertEquals(Types.BIT, this.rs.getMetaData().getColumnType(1));		}		assertEquals("java.lang.Boolean", this.rs.getMetaData()				.getColumnClassName(1));	}        /**     * Tests the implementation of Information Schema for primary keys.     */    public void testGetPrimaryKeysUsingInfoShcema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS t1");            this.stmt.executeUpdate("CREATE TABLE t1 (c1 int(1) primary key)");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getPrimaryKeys(null, null, "t1");                this.rs.next();                assertEquals("t1", this.rs.getString("TABLE_NAME"));                assertEquals("c1", this.rs.getString("COLUMN_NAME"));            } finally {                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for index info.     */    public void testGetIndexInfoUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS t1");            this.stmt.executeUpdate("CREATE TABLE t1 (c1 int(1))");            this.stmt.executeUpdate("CREATE INDEX index1 ON t1 (c1)");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getIndexInfo("test", null, "t1", false, true);                this.rs.next();                assertEquals("t1", this.rs.getString("TABLE_NAME"));                assertEquals("c1", this.rs.getString("COLUMN_NAME"));                assertEquals("1", this.rs.getString("NON_UNIQUE"));                assertEquals("index1", this.rs.getString("INDEX_NAME"));            } finally {                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for columns.     */    public void testGetColumnsUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS t1");            this.stmt.executeUpdate("CREATE TABLE t1 (c1 char(1))");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {            conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getColumns(null, null, "t1", null);                this.rs.next();                assertEquals("t1", this.rs.getString("TABLE_NAME"));                assertEquals("c1", this.rs.getString("COLUMN_NAME"));                assertEquals("char", this.rs.getString("TYPE_NAME"));                assertEquals("1", this.rs.getString("COLUMN_SIZE"));            } finally {                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for tables.     */    public void testGetTablesUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS `t1-1`");            this.stmt.executeUpdate("CREATE TABLE `t1-1` (c1 char(1))");            this.stmt.executeUpdate("DROP TABLE IF EXISTS `t1-2`");            this.stmt.executeUpdate("CREATE TABLE `t1-2` (c1 char(1))");            this.stmt.executeUpdate("DROP TABLE IF EXISTS `t2`");            this.stmt.executeUpdate("CREATE TABLE `t2` (c1 char(1))");            Set tableNames = new HashSet();            tableNames.add("t1-1");            tableNames.add("t1-2");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                // pattern matching for table name                this.rs = metaData.getTables(null, null, "t1-_", null);                while (this.rs.next()) {                    assertTrue(tableNames.remove(this.rs.getString("TABLE_NAME")));                }                assertTrue(tableNames.isEmpty());            } finally {                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for column privileges.     */    public void testGetColumnPrivilegesUsingInfoSchema() throws Exception {    	String dontRunPropertyName = "com.mysql.jdbc.testsuite.cantGrant";    	    	if (!runTestIfSysPropDefined(dontRunPropertyName)) {	        if (versionMeetsMinimum(5, 0, 7)) {	            Properties props = new Properties();	            	            props.put("useInformationSchema", "true");	            Connection conn1 = null;	            Statement stmt1 = null;	            String userHostQuoted = null;	            	            boolean grantFailed = true;	            	            try {	                conn1 = getConnectionWithProps(props);	                stmt1 = conn1.createStatement();	                stmt1.executeUpdate("DROP TABLE IF EXISTS t1");	                stmt1.executeUpdate("CREATE TABLE t1 (c1 int)");	                this.rs = stmt1.executeQuery("SELECT USER()");	                this.rs.next();	                String user = this.rs.getString(1);	                List userHost = StringUtils.split(user, "@", false);	                userHostQuoted = "'" + userHost.get(0) + "'@'" + userHost.get(1) + "'";	                	                try {	                	stmt1.executeUpdate("GRANT update (c1) on t1 to " + userHostQuoted);	                		                	grantFailed = false;	                		                } catch (SQLException sqlEx) {	                	logDebug("This testcase needs to be run with a URL that allows the user to issue GRANTs "	                			+ " in the current database. You can skip this test by setting the system property \""	                			+ dontRunPropertyName + "\".");	                		                	grantFailed = true;	                }	                	                if (!grantFailed) {		                DatabaseMetaData metaData = conn1.getMetaData();		                this.rs = metaData.getColumnPrivileges(null, null, "t1", null);		                this.rs.next();		                assertEquals("t1", this.rs.getString("TABLE_NAME"));		                assertEquals("c1", this.rs.getString("COLUMN_NAME"));		                assertEquals(userHostQuoted, this.rs.getString("GRANTEE"));		                assertEquals("UPDATE", this.rs.getString("PRIVILEGE"));	                }	            } finally {		            if (stmt1 != null) {		       		            	stmt1.executeUpdate("DROP TABLE IF EXISTS t1");		            			            	if (!grantFailed) {		            		stmt1.executeUpdate("REVOKE UPDATE (c1) ON t1 FROM " + userHostQuoted);		            	}		            			            	stmt1.close();	            	}	            		            	if (conn1 != null) {	            		conn1.close();	            	}	            }	        }    	}    }        /**     * Tests the implementation of Information Schema for description     * of stored procedures available in a catalog.     */    public void testGetProceduresUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS sp1");            this.stmt.executeUpdate("CREATE PROCEDURE sp1()\n BEGIN\n" + "SELECT 1;" + "end\n");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getProcedures(null, null, "sp1");                this.rs.next();                assertEquals("sp1", this.rs.getString("PROCEDURE_NAME"));                assertEquals("1", this.rs.getString("PROCEDURE_TYPE"));            } finally {                if (conn1 != null) {					conn1.close();				}                this.stmt.executeUpdate("DROP PROCEDURE sp1");            }        }    }        /**     * Tests the implementation of Information Schema for foreign key.     */    public void testGetCrossReferenceUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS child");            this.stmt.executeUpdate("DROP TABLE If EXISTS parent");            this.stmt.executeUpdate("CREATE TABLE parent(id INT NOT NULL, "                + "PRIMARY KEY (id)) ENGINE=INNODB");            this.stmt.executeUpdate("CREATE TABLE child(id INT, parent_id INT, "                + "FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE SET NULL) ENGINE=INNODB");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getCrossReference(null, null, "parent", null, null, "child");                this.rs.next();                assertEquals("parent", this.rs.getString("PKTABLE_NAME"));                assertEquals("id", this.rs.getString("PKCOLUMN_NAME"));                assertEquals("child", this.rs.getString("FKTABLE_NAME"));                assertEquals("parent_id", this.rs.getString("FKCOLUMN_NAME"));            } finally {                this.stmt.executeUpdate("DROP TABLE IF EXISTS child");                this.stmt.executeUpdate("DROP TABLE If EXISTS parent");                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for foreign key.     */    public void testGetExportedKeysUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS child");            this.stmt.executeUpdate("DROP TABLE If EXISTS parent");            this.stmt.executeUpdate("CREATE TABLE parent(id INT NOT NULL, "                + "PRIMARY KEY (id)) ENGINE=INNODB");            this.stmt.executeUpdate("CREATE TABLE child(id INT, parent_id INT, "                + "FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE SET NULL) ENGINE=INNODB");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getExportedKeys(null, null, "parent");                this.rs.next();                assertEquals("parent", this.rs.getString("PKTABLE_NAME"));                assertEquals("id", this.rs.getString("PKCOLUMN_NAME"));                assertEquals("child", this.rs.getString("FKTABLE_NAME"));                assertEquals("parent_id", this.rs.getString("FKCOLUMN_NAME"));            } finally {                this.stmt.executeUpdate("DROP TABLE IF EXISTS child");                this.stmt.executeUpdate("DROP TABLE If EXISTS parent");                if (conn1 != null) {					conn1.close();				}            }        }    }        /**     * Tests the implementation of Information Schema for foreign key.     */    public void testGetImportedKeysUsingInfoSchema() throws Exception {        if (versionMeetsMinimum(5, 0, 7)) {            this.stmt.executeUpdate("DROP TABLE IF EXISTS child");            this.stmt.executeUpdate("DROP TABLE If EXISTS parent");            this.stmt.executeUpdate("CREATE TABLE parent(id INT NOT NULL, "                + "PRIMARY KEY (id)) ENGINE=INNODB");            this.stmt.executeUpdate("CREATE TABLE child(id INT, parent_id INT, "                + "FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE SET NULL) ENGINE=INNODB");            Properties props = new Properties();            props.put("useInformationSchema", "true");            Connection conn1 = null;            try {                conn1 = getConnectionWithProps(props);                DatabaseMetaData metaData = conn1.getMetaData();                this.rs = metaData.getImportedKeys(null, null, "child");                this.rs.next();                assertEquals("parent", this.rs.getString("PKTABLE_NAME"));                assertEquals("id", this.rs.getString("PKCOLUMN_NAME"));                assertEquals("child", this.rs.getString("FKTABLE_NAME"));                assertEquals("parent_id", this.rs.getString("FKCOLUMN_NAME"));            } finally {                this.stmt.executeUpdate("DROP TABLE IF EXISTS child");                this.stmt.executeUpdate("DROP TABLE If EXISTS parent");                if (conn1 != null) {					conn1.close();				}            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜天堂影视香蕉久久| 国产精品欧美经典| 久久久亚洲高清| 亚洲欧美日韩国产综合| 精品av久久707| 色偷偷成人一区二区三区91| 欧美国产精品中文字幕| 欧美精品国产精品| 91免费看`日韩一区二区| 久久99精品久久久久久| 亚洲国产综合91精品麻豆| 亚洲国产精品二十页| 欧美一区二区二区| 丁香激情综合国产| 欧美二区三区的天堂| 手机精品视频在线观看| 不卡在线观看av| 国产精品久久久久久久久免费丝袜 | 欧美精品一区二区三| 日韩一区精品视频| 欧美精品亚洲一区二区在线播放| 亚洲综合色区另类av| 91丝袜国产在线播放| 亚洲第一久久影院| 日韩欧美在线一区二区三区| 国产不卡视频在线观看| 中文字幕亚洲电影| 欧美裸体bbwbbwbbw| 精品一区二区在线看| 亚洲人成在线观看一区二区| 51久久夜色精品国产麻豆| 韩国成人福利片在线播放| 一区二区三区在线观看国产| 欧美日高清视频| 欧美怡红院视频| 欧美日韩精品高清| 久久久精品2019中文字幕之3| 欧美一区二区大片| 精品福利av导航| 欧美日韩亚洲综合在线 | 欧美国产日本韩| 日韩亚洲欧美综合| 在线视频国内一区二区| 91免费观看在线| 91在线小视频| 色婷婷综合激情| 欧美亚洲尤物久久| 欧美色综合网站| 91精品在线观看入口| 91精品国产综合久久国产大片| 一区二区三区中文字幕电影| 欧美色大人视频| 精品一区二区三区免费毛片爱| 亚洲精品久久久蜜桃| 国产精品蜜臀在线观看| 久久综合久久综合久久| 欧洲精品视频在线观看| 成人一级视频在线观看| 精品在线一区二区| 蜜桃av噜噜一区| 天天综合色天天综合色h| 亚洲精品免费一二三区| 国产精品对白交换视频| 国产欧美日韩一区二区三区在线观看| 欧美一区二区三区四区五区| 日韩精品一区二区三区视频| 91精品婷婷国产综合久久性色| 欧美日韩综合不卡| 欧美探花视频资源| 4438x成人网最大色成网站| 91精品国产一区二区三区| 7777精品伊人久久久大香线蕉的 | 亚洲欧洲精品天堂一级| 中文字幕一区二区三区在线播放| 亚洲精选视频免费看| 精品一区二区三区免费观看| 91精品国产91久久综合桃花| 一卡二卡欧美日韩| 欧美日韩一区久久| 亚洲主播在线播放| 久久成人久久爱| 亚洲精品日日夜夜| 香蕉成人啪国产精品视频综合网| 不卡av在线网| 亚洲国产日产av| 久久精品久久精品| 国产成人精品午夜视频免费| 精东粉嫩av免费一区二区三区| 日韩一区二区三区四区五区六区| 亚洲精品免费在线播放| 理论片日本一区| 色综合欧美在线视频区| 色悠悠久久综合| 欧美性猛片xxxx免费看久爱| 91丨九色丨黑人外教| 91国模大尺度私拍在线视频| 日韩视频免费直播| 综合网在线视频| 亚洲高清不卡在线| 色中色一区二区| 中国色在线观看另类| 一区二区欧美精品| 成人app软件下载大全免费| 欧美午夜片在线观看| 久久精品视频在线免费观看| 日韩国产欧美在线观看| 日本道色综合久久| 中文字幕一区二区三区不卡在线| 热久久国产精品| 欧美三级电影精品| 亚洲精品综合在线| 成人av在线资源| 国产日产欧美一区二区视频| 秋霞电影一区二区| 欧美日韩你懂得| 亚洲黄色av一区| 99精品在线免费| 亚洲日本一区二区三区| av一本久道久久综合久久鬼色| 欧美一区二区精品在线| 日韩va亚洲va欧美va久久| 欧美视频一区二区| 国产一区二区三区精品视频 | 欧美v日韩v国产v| 色偷偷成人一区二区三区91 | 精品黑人一区二区三区久久| 欧美亚洲高清一区二区三区不卡| 国产精品一区二区在线观看不卡 | 国产精品夜夜爽| 久久日一线二线三线suv| 成人精品视频一区二区三区尤物| 国产高清视频一区| eeuss鲁一区二区三区| 99久久久国产精品| 欧美一区二区久久| 免费在线观看日韩欧美| 欧美日韩综合在线免费观看| 亚洲线精品一区二区三区八戒| 色综合久久99| 中文字幕人成不卡一区| 99国产欧美久久久精品| 成人免费在线视频观看| 精品区一区二区| 欧美日韩一区久久| 成人精品小蝌蚪| 亚洲v精品v日韩v欧美v专区| 国产日韩欧美精品电影三级在线| 94-欧美-setu| 日本美女一区二区| 亚洲人成人一区二区在线观看| 欧美久久久久久久久久| 91精品国产一区二区三区| 精品在线播放午夜| 午夜久久久久久| 亚洲夂夂婷婷色拍ww47 | 国产亲近乱来精品视频| 欧美日韩高清在线| 成人福利视频在线看| 久久99精品国产.久久久久久| 国产精品全国免费观看高清| 激情深爱一区二区| 亚洲男人天堂av网| 久久女同性恋中文字幕| 日韩欧美的一区二区| 国产99久久久国产精品免费看| 在线欧美小视频| 久久综合九色综合欧美亚洲| 精品免费日韩av| 国产精品毛片久久久久久| 亚洲一区二区视频在线| 国产精品自拍网站| 欧美日韩久久久一区| 69p69国产精品| 北条麻妃国产九九精品视频| 欧美xxxxx牲另类人与| 欧美亚洲综合色| jlzzjlzz国产精品久久| 久久国产日韩欧美精品| 91精品国产91久久综合桃花 | 国产精品香蕉一区二区三区| 欧美日韩一区国产| 污片在线观看一区二区| 久久综合久久综合亚洲| 不卡av在线免费观看| 激情六月婷婷久久| av电影一区二区| 一级日本不卡的影视| 亚洲一区二区三区四区在线| 亚洲视频免费在线观看| 欧美撒尿777hd撒尿| 日韩国产欧美在线播放| 精品国产髙清在线看国产毛片| 91小宝寻花一区二区三区| 天天色综合天天| 久久久久久久久久看片| 波多野结衣中文字幕一区二区三区| 国产精品的网站| 欧美视频在线播放| 国产99精品国产| 亚洲成人av免费|