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

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

?? updatabilitytest.java

?? mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序
?? JAVA
字號(hào):
/* Copyright (C) 2002-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package testsuite.simple;import com.mysql.jdbc.NotUpdatable;import testsuite.BaseTestCase;import java.sql.DatabaseMetaData;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;/** * Tests for updatable result sets *  * @author Mark Matthews * @version $Id: UpdatabilityTest.java,v 1.1.2.1 2005/05/13 18:58:37 mmatthews *          Exp $ */public class UpdatabilityTest extends BaseTestCase {	/**	 * Creates a new UpdatabilityTest object.	 * 	 * @param name	 *            DOCUMENT ME!	 */	public UpdatabilityTest(String name) {		super(name);	}	/**	 * Runs all test cases in this test suite	 * 	 * @param args	 */	public static void main(String[] args) {		junit.textui.TestRunner.run(UpdatabilityTest.class);	}	/**	 * DOCUMENT ME!	 * 	 * @throws Exception	 *             DOCUMENT ME!	 */	public void setUp() throws Exception {		super.setUp();		createTestTable();	}	/**	 * If using MySQL-4.1, tests if aliased tables work as updatable result	 * sets.	 * 	 * @throws Exception	 *             if an error occurs	 */	public void testAliasedTables() throws Exception {		DatabaseMetaData dbmd = this.conn.getMetaData();		if (versionMeetsMinimum(4, 1)) {			Statement scrollableStmt = null;			try {				scrollableStmt = this.conn.createStatement(						ResultSet.TYPE_SCROLL_INSENSITIVE,						ResultSet.CONCUR_UPDATABLE);				this.rs = scrollableStmt						.executeQuery("SELECT pos1 AS p1, pos2 AS P2, char_field AS cf FROM UPDATABLE AS UPD LIMIT 1");				this.rs.next();				this.rs.close();				this.rs = null;				scrollableStmt.close();				scrollableStmt = null;			} finally {				if (this.rs != null) {					try {						this.rs.close();					} catch (SQLException sqlEx) {						; // ignore					}					this.rs = null;				}				if (scrollableStmt != null) {					try {						scrollableStmt.close();					} catch (SQLException sqlEx) {						; // ignore					}					scrollableStmt = null;				}			}		}	}	/**	 * Tests that the driver does not let you update result sets that come from	 * tables that don't have primary keys	 * 	 * @throws SQLException	 *             if an error occurs	 */	public void testBogusTable() throws SQLException {		this.stmt.executeUpdate("DROP TABLE IF EXISTS BOGUS_UPDATABLE");		this.stmt.executeUpdate("CREATE TABLE BOGUS_UPDATABLE (field1 int)");		Statement scrollableStmt = null;		try {			scrollableStmt = this.conn.createStatement(					ResultSet.TYPE_SCROLL_INSENSITIVE,					ResultSet.CONCUR_UPDATABLE);			this.rs = scrollableStmt					.executeQuery("SELECT * FROM BOGUS_UPDATABLE");			try {				this.rs.moveToInsertRow();				fail("ResultSet.moveToInsertRow() should not succeed on non-updatable table");			} catch (NotUpdatable noUpdate) {				// ignore			}		} finally {			if (scrollableStmt != null) {				try {					scrollableStmt.close();				} catch (SQLException sqlEx) {					;				}			}			this.stmt.executeUpdate("DROP TABLE IF EXISTS BOGUS_UPDATABLE");		}	}	/**	 * Tests that the driver does not let you update result sets that come from	 * queries that haven't selected all primary keys	 * 	 * @throws SQLException	 *             if an error occurs	 */	public void testMultiKeyTable() throws SQLException {		this.stmt.executeUpdate("DROP TABLE IF EXISTS MULTI_UPDATABLE");		this.stmt				.executeUpdate("CREATE TABLE MULTI_UPDATABLE (field1 int NOT NULL, field2 int NOT NULL, PRIMARY KEY (field1, field2))");		Statement scrollableStmt = null;		try {			scrollableStmt = this.conn.createStatement(					ResultSet.TYPE_SCROLL_INSENSITIVE,					ResultSet.CONCUR_UPDATABLE);			this.rs = scrollableStmt					.executeQuery("SELECT field1 FROM MULTI_UPDATABLE");			try {				this.rs.moveToInsertRow();				fail("ResultSet.moveToInsertRow() should not succeed on query that does not select all primary keys");			} catch (NotUpdatable noUpdate) {				// ignore			}		} finally {			if (scrollableStmt != null) {				try {					scrollableStmt.close();				} catch (SQLException sqlEx) {					// ignore				}			}			this.stmt.executeUpdate("DROP TABLE IF EXISTS MULTI_UPDATABLE");		}	}	/**	 * DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public void testUpdatability() throws SQLException {		Statement scrollableStmt = null;		try {			scrollableStmt = this.conn.createStatement(					ResultSet.TYPE_SCROLL_INSENSITIVE,					ResultSet.CONCUR_UPDATABLE);			this.rs = scrollableStmt					.executeQuery("SELECT * FROM UPDATABLE ORDER BY pos1");			this.rs.getMetaData().getColumnCount();			while (this.rs.next()) {				int rowPos = this.rs.getInt(1);				this.rs.updateString(3, "New Data" + (100 - rowPos));				this.rs.updateRow();			}			//			// Insert a new row			//			this.rs.moveToInsertRow();			this.rs.updateInt(1, 400);			this.rs.updateInt(2, 400);			this.rs.updateString(3, "New Data" + (100 - 400));			this.rs.insertRow();			// Test moveToCurrentRow			int rememberedPosition = this.rs.getRow();			this.rs.moveToInsertRow();			this.rs.moveToCurrentRow();			assertTrue("ResultSet.moveToCurrentRow() failed",					this.rs.getRow() == rememberedPosition);			this.rs.close();			this.rs = scrollableStmt					.executeQuery("SELECT * FROM UPDATABLE ORDER BY pos1");			boolean dataGood = true;			while (this.rs.next()) {				int rowPos = this.rs.getInt(1);				if (!this.rs.getString(3).equals("New Data" + (100 - rowPos))) {					dataGood = false;				}			}			assertTrue("Updates failed", dataGood);			// move back, and change the primary key			// This should work			int newPrimaryKeyId = 99999;			this.rs.absolute(1);			this.rs.updateInt(1, newPrimaryKeyId);			this.rs.updateRow();			int savedPrimaryKeyId = this.rs.getInt(1);			assertTrue("Updated primary key does not match",					(newPrimaryKeyId == savedPrimaryKeyId));			// Check cancelRowUpdates()			this.rs.absolute(1);			int primaryKey = this.rs.getInt(1);			int originalValue = this.rs.getInt(2);			this.rs.updateInt(2, -3);			this.rs.cancelRowUpdates();			int newValue = this.rs.getInt(2);			assertTrue("ResultSet.cancelRowUpdates() failed",					newValue == originalValue);			// Now check refreshRow()			// Check cancelRowUpdates()			this.rs.absolute(1);			primaryKey = this.rs.getInt(1);			this.stmt					.executeUpdate("UPDATE UPDATABLE SET char_field='foo' WHERE pos1="							+ primaryKey);			this.rs.refreshRow();			assertTrue("ResultSet.refreshRow failed", this.rs.getString(					"char_field").equals("foo"));			// Now check deleteRow()			this.rs.last();			int oldLastRow = this.rs.getRow();			this.rs.deleteRow();			this.rs.last();			assertTrue("ResultSet.deleteRow() failed",					this.rs.getRow() == (oldLastRow - 1));			this.rs.close();			/*			 * FIXME: Move to regression			 * 			 * scrollableStmt.executeUpdate("DROP TABLE IF EXISTS test");			 * scrollableStmt.executeUpdate("CREATE TABLE test (ident INTEGER			 * PRIMARY KEY, name TINYTEXT, expiry DATETIME default null)");			 * scrollableStmt.executeUpdate("INSERT INTO test SET ident=1,			 * name='original'");			 * 			 * //Select to get a resultset to work on ResultSet this.rs =			 * this.stmt.executeQuery("SELECT ident, name, expiry FROM test");			 * 			 * //Check that the expiry field was null before we did our update			 * this.rs.first();			 * 			 * java.sql.Date before = this.rs.getDate("expiry");			 * 			 * if (this.rs.wasNull()) { System.out.println("Expiry was correctly			 * SQL null before update"); }			 * 			 * //Update a different field this.rs.updateString("name",			 * "Updated"); this.rs.updateRow();			 * 			 * //Test to see if field has been altered java.sql.Date after =			 * this.rs.getDate(3);			 * 			 * if (this.rs.wasNull()) System.out.println("Bug disproved - expiry			 * SQL null after update"); else System.out.println("Bug proved -			 * expiry corrupted to '" + after + "'");			 */		} finally {			if (scrollableStmt != null) {				try {					scrollableStmt.close();				} catch (SQLException sqlEx) {					;				}			}		}	}	private void createTestTable() throws SQLException {		//		// Catch the error, the table might exist		//		try {			this.stmt.executeUpdate("DROP TABLE UPDATABLE");		} catch (SQLException SQLE) {			;		}		this.stmt				.executeUpdate("CREATE TABLE UPDATABLE (pos1 int not null, pos2 int not null, char_field VARCHAR(32), PRIMARY KEY (pos1, pos2))");		for (int i = 0; i < 100; i++) {			this.stmt.executeUpdate("INSERT INTO UPDATABLE VALUES (" + i + ", "					+ i + ",'StringData" + i + "')");		}	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美bbbbb| 欧美一区二区视频在线观看2022| 精品久久久久久久人人人人传媒 | 波多野结衣在线aⅴ中文字幕不卡| 26uuu成人网一区二区三区| 国产精品18久久久久久久久 | 国产精品久久久久影视| 91亚洲精品久久久蜜桃网站| 日韩欧美国产午夜精品| 成人激情图片网| 自拍偷拍亚洲综合| 欧美性色欧美a在线播放| 性做久久久久久免费观看欧美| 欧美一二区视频| 国产v综合v亚洲欧| 亚洲精品免费在线播放| 91精品国产手机| 成人午夜伦理影院| 亚洲国产精品久久人人爱蜜臀| 日韩欧美国产精品| av在线不卡电影| 日本不卡高清视频| 国产精品久久久久久妇女6080| 欧美性生活大片视频| 国产麻豆视频精品| 亚洲18女电影在线观看| 亚洲一区二区三区四区的| 国产精品每日更新| 日韩手机在线导航| 国产资源精品在线观看| 亚洲女同一区二区| 精品电影一区二区三区 | 欧美成人激情免费网| 成人av电影免费观看| 日本在线不卡视频| 亚洲欧美一区二区不卡| 2023国产精品自拍| 欧美性色aⅴ视频一区日韩精品| 国产自产高清不卡| 日韩电影在线看| 亚洲欧美另类图片小说| 久久久五月婷婷| 欧美一区二区免费视频| 91免费精品国自产拍在线不卡| 欧美三级乱人伦电影| 国产一区二区在线影院| 亚洲电影一区二区| 中文字幕中文字幕中文字幕亚洲无线| 欧美一区二区三区人| 97se狠狠狠综合亚洲狠狠| 精品写真视频在线观看| 午夜精品久久久久久久蜜桃app| 国产欧美日韩激情| 欧美成人在线直播| 欧美日韩亚洲综合一区| 91免费观看视频| 国产精品亚洲一区二区三区妖精 | 91丝袜美腿高跟国产极品老师| 蜜臀av性久久久久av蜜臀妖精 | 在线观看日韩一区| 成人精品一区二区三区四区| 风间由美性色一区二区三区| 亚洲黄色av一区| 久久久久国产免费免费 | 国产调教视频一区| 久久综合久久久久88| 日韩欧美国产三级电影视频| 7777精品伊人久久久大香线蕉经典版下载| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美日韩一区二区在线视频| 91成人免费网站| 欧洲国内综合视频| 色噜噜狠狠色综合欧洲selulu| 成人性生交大片免费| 成人一区二区三区在线观看| 成人伦理片在线| 丰满少妇久久久久久久| av资源站一区| 一本大道久久精品懂色aⅴ| 一本色道亚洲精品aⅴ| 91麻豆精品秘密| 欧美午夜宅男影院| 欧美美女直播网站| 欧美一区二区国产| 精品噜噜噜噜久久久久久久久试看 | 国产乱国产乱300精品| 日本va欧美va瓶| 久久99国产精品成人| 激情都市一区二区| 国产福利91精品一区| 国产精品996| 99免费精品视频| 欧美日韩在线播| 精品人在线二区三区| 国产校园另类小说区| 综合av第一页| 青椒成人免费视频| 国产不卡高清在线观看视频| 99精品视频在线免费观看| 欧洲一区二区三区在线| 日韩亚洲欧美成人一区| 中文字幕久久午夜不卡| 亚洲欧美偷拍另类a∨色屁股| 亚洲午夜精品在线| 精品一区二区三区在线播放| a亚洲天堂av| 欧美一二三四区在线| 国产女同性恋一区二区| 亚洲综合精品久久| 激情欧美日韩一区二区| 91精品一区二区三区在线观看| 国产激情视频一区二区在线观看| 成人黄色免费短视频| 日本韩国视频一区二区| 日韩欧美的一区| 中文字幕在线一区| 日本免费新一区视频 | 懂色av一区二区三区免费观看| av中文一区二区三区| 欧美精品精品一区| 国产精品久久久99| 精品一区二区av| 欧美在线观看一区| 国产欧美日韩在线看| 肉肉av福利一精品导航| 成人av资源在线观看| 91精品国产91久久综合桃花| 中文字幕永久在线不卡| 久久se这里有精品| 欧美日韩国产精选| 国产精品成人免费| 国产一区二区免费在线| 欧美日韩国产小视频在线观看| 中国色在线观看另类| 久久国产综合精品| 欧美日韩国产片| 亚洲人123区| 亚洲欧美日韩国产一区二区三区| 91免费精品国自产拍在线不卡| 欧美一区中文字幕| 亚洲女人的天堂| 国产成人自拍在线| 精品少妇一区二区三区免费观看 | 亚洲综合清纯丝袜自拍| 成人午夜在线播放| 久久久青草青青国产亚洲免观| 日韩av一区二| 欧美日韩精品二区第二页| 最新国产成人在线观看| 大陆成人av片| 久久久欧美精品sm网站| 国产综合久久久久久鬼色| 欧美一区永久视频免费观看| 亚洲成人午夜电影| 欧美亚洲国产一区二区三区 | 国产suv精品一区二区6| 欧美精品一区二区久久久| 久久精品国产999大香线蕉| 91精品国产综合久久久久久久久久 | 国产精品久久久久久久久快鸭| 亚洲最大成人综合| 成人国产精品免费网站| 久久精品亚洲国产奇米99| 国产一区二三区好的| 精品精品欲导航| 久草热8精品视频在线观看| 欧美蜜桃一区二区三区| 性欧美大战久久久久久久久| 欧美在线视频日韩| 亚洲一区中文日韩| 欧美私模裸体表演在线观看| 一区二区三区免费网站| 91福利在线观看| 亚洲国产精品一区二区www| 欧美视频一区在线观看| 午夜精品久久久久久久久久久 | 欧美一区二区免费视频| 久久疯狂做爰流白浆xx| xnxx国产精品| www.激情成人| 亚洲一区二区三区在线看| 在线成人午夜影院| 精品午夜久久福利影院| 日本一区二区免费在线| 91视频.com| 日本欧美一区二区| 久久久久国产一区二区三区四区 | 国产精品理伦片| 色婷婷综合在线| 日韩电影在线观看网站| 26uuu久久天堂性欧美| 成人在线视频首页| 亚洲国产精品精华液网站| 欧美一区二区福利在线| 成人丝袜18视频在线观看| 亚洲夂夂婷婷色拍ww47| 中文幕一区二区三区久久蜜桃| 亚洲日本在线天堂| 91国偷自产一区二区三区成为亚洲经典 | 7777精品伊人久久久大香线蕉完整版|