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

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

?? preparedstatement.java

?? 用于JAVA數(shù)據(jù)庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
			String oldCatalog = null;			if (!locallyScopedConn.getCatalog().equals(this.currentCatalog)) {				oldCatalog = locallyScopedConn.getCatalog();				locallyScopedConn.setCatalog(this.currentCatalog);			}			//			// Check if we have cached metadata for this query...			//			if (locallyScopedConn.getCacheResultSetMetadata()) {				cachedMetadata = locallyScopedConn.getCachedMetaData(this.originalSql);			}			Field[] metadataFromCache = null;						if (cachedMetadata != null) {				metadataFromCache = cachedMetadata.fields;			}						boolean oldInfoMsgState = false;			if (this.retrieveGeneratedKeys) {				oldInfoMsgState = locallyScopedConn.isReadInfoMsgEnabled();				locallyScopedConn.setReadInfoMsgEnabled(true);			}			// If there isn't a limit clause in the SQL			// then limit the number of rows to return in			// an efficient manner. Only do this if			// setMaxRows() hasn't been used on any Statements			// generated from the current Connection (saves			// a query, and network traffic).			//			// Only apply max_rows to selects			//			if (locallyScopedConn.useMaxRows()) {				int rowLimit = -1;				if (this.firstCharOfStmt == 'S') {					if (this.hasLimitClause) {						rowLimit = this.maxRows;					} else {						if (this.maxRows <= 0) {							executeSimpleNonQuery(locallyScopedConn,									"SET OPTION SQL_SELECT_LIMIT=DEFAULT");						} else {							executeSimpleNonQuery(locallyScopedConn,									"SET OPTION SQL_SELECT_LIMIT="											+ this.maxRows);						}					}				} else {					executeSimpleNonQuery(locallyScopedConn,							"SET OPTION SQL_SELECT_LIMIT=DEFAULT");				}				// Finally, execute the query				rs = executeInternal(rowLimit, sendPacket,						doStreaming,						(this.firstCharOfStmt == 'S'), metadataFromCache, false);			} else {				rs = executeInternal(-1, sendPacket,						doStreaming,						(this.firstCharOfStmt == 'S'), metadataFromCache, false);			}			if (cachedMetadata != null) {				locallyScopedConn.initializeResultsMetadataFromCache(this.originalSql,						cachedMetadata, this.results);			} else {				if (rs.reallyResult() && locallyScopedConn.getCacheResultSetMetadata()) {					locallyScopedConn.initializeResultsMetadataFromCache(this.originalSql,							null /* will be created */, rs);				}			}						if (this.retrieveGeneratedKeys) {				locallyScopedConn.setReadInfoMsgEnabled(oldInfoMsgState);				rs.setFirstCharOfQuery(this.firstCharOfStmt);			}			if (oldCatalog != null) {				locallyScopedConn.setCatalog(oldCatalog);			}			if (rs != null) {				this.lastInsertId = rs.getUpdateID();								this.results = rs;			}		}		return ((rs != null) && rs.reallyResult());	}	/**	 * JDBC 2.0 Submit a batch of commands to the database for execution. This	 * method is optional.	 * 	 * @return an array of update counts containing one element for each command	 *         in the batch. The array is ordered according to the order in	 *         which commands were inserted into the batch	 * 	 * @exception SQLException	 *                if a database-access error occurs, or the driver does not	 *                support batch statements	 * @throws java.sql.BatchUpdateException	 *             DOCUMENT ME!	 */	public int[] executeBatch() throws SQLException {		checkClosed();				if (this.connection.isReadOnly()) {			throw new SQLException(Messages.getString("PreparedStatement.25") //$NON-NLS-1$					+ Messages.getString("PreparedStatement.26"), //$NON-NLS-1$					SQLError.SQL_STATE_ILLEGAL_ARGUMENT);		}		synchronized (this.connection.getMutex()) {			if (this.batchedArgs == null || this.batchedArgs.size() == 0) {                return new int[0];            }			// we timeout the entire batch, not individual statements			int batchTimeout = this.timeoutInMillis;			this.timeoutInMillis = 0;					resetCancelledState();						try {				clearWarnings();				if (!this.batchHasPlainStatements						&& this.connection.getRewriteBatchedStatements()) {															if (canRewriteAsMultivalueInsertStatement()) {						return executeBatchedInserts(batchTimeout);					}										if (this.connection.versionMeetsMinimum(4, 1, 0) 							&& !this.batchHasPlainStatements							&& this.batchedArgs != null 							&& this.batchedArgs.size() > 3 /* cost of option setting rt-wise */) {						return executePreparedBatchAsMultiStatement(batchTimeout);					}				}				return executeBatchSerially(batchTimeout);			} finally {				clearBatch();			}		}	}	public synchronized boolean canRewriteAsMultivalueInsertStatement() {		if (!this.hasCheckedForRewrite) {			// Needs to be INSERT, can't have INSERT ... SELECT or			// INSERT ... ON DUPLICATE KEY UPDATE			//			// We're not smart enough to re-write to			//			//    INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)			//    ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);			//			// (yet)			this.canRewrite = StringUtils.startsWithIgnoreCaseAndWs(					this.originalSql, "INSERT", this.statementAfterCommentsPos) 			&& StringUtils.indexOfIgnoreCaseRespectMarker(this.statementAfterCommentsPos, this.originalSql, "SELECT", "\"'`", "\"'`", false) == -1 			&& StringUtils.indexOfIgnoreCaseRespectMarker(this.statementAfterCommentsPos, this.originalSql, "UPDATE", "\"'`", "\"'`", false) == -1;						this.hasCheckedForRewrite = true;		}		return this.canRewrite;	}	/**	 * Rewrites the already prepared statement into a multi-statement	 * query of 'statementsPerBatch' values and executes the entire batch	 * using this new statement.	 * 	 * @return update counts in the same fashion as executeBatch()	 * 	 * @throws SQLException	 */		protected int[] executePreparedBatchAsMultiStatement(int batchTimeout) throws SQLException {		synchronized (this.connection.getMutex()) {			// This is kind of an abuse, but it gets the job done			if (this.batchedValuesClause == null) {				this.batchedValuesClause = this.originalSql + ";";			}						ConnectionImpl locallyScopedConn = this.connection;						boolean multiQueriesEnabled = locallyScopedConn.getAllowMultiQueries();			CancelTask timeoutTask = null;						try {				clearWarnings();								int numBatchedArgs = this.batchedArgs.size();								if (this.retrieveGeneratedKeys) {					this.batchedGeneratedKeys = new ArrayList(numBatchedArgs);				}				int numValuesPerBatch = computeBatchSize(numBatchedArgs);				if (numBatchedArgs < numValuesPerBatch) {					numValuesPerBatch = numBatchedArgs;				}				java.sql.PreparedStatement batchedStatement = null;				int batchedParamIndex = 1;				int numberToExecuteAsMultiValue = 0;				int batchCounter = 0;				int updateCountCounter = 0;				int[] updateCounts = new int[numBatchedArgs];				SQLException sqlEx = null;								try {					if (!multiQueriesEnabled) {						locallyScopedConn.getIO().enableMultiQueries();					}										if (this.retrieveGeneratedKeys) {						batchedStatement = locallyScopedConn.prepareStatement(								generateMultiStatementForBatch(numValuesPerBatch),								RETURN_GENERATED_KEYS);					} else {						batchedStatement = locallyScopedConn								.prepareStatement(generateMultiStatementForBatch(numValuesPerBatch));					}					if (locallyScopedConn.getEnableQueryTimeouts() &&							batchTimeout != 0							&& locallyScopedConn.versionMeetsMinimum(5, 0, 0)) {						timeoutTask = new CancelTask((StatementImpl)batchedStatement);						ConnectionImpl.getCancelTimer().schedule(timeoutTask,								batchTimeout);					}										if (numBatchedArgs < numValuesPerBatch) {						numberToExecuteAsMultiValue = numBatchedArgs;					} else {						numberToExecuteAsMultiValue = numBatchedArgs / numValuesPerBatch;					}								int numberArgsToExecute = numberToExecuteAsMultiValue * numValuesPerBatch;								for (int i = 0; i < numberArgsToExecute; i++) {						if (i != 0 && i % numValuesPerBatch == 0) {							try {								batchedStatement.execute();							} catch (SQLException ex) {								sqlEx = handleExceptionForBatch(batchCounter, numValuesPerBatch, 										updateCounts, ex);							}														updateCountCounter = processMultiCountsAndKeys(									(StatementImpl)batchedStatement, updateCountCounter,									updateCounts);														batchedStatement.clearParameters();							batchedParamIndex = 1;						}									batchedParamIndex = setOneBatchedParameterSet(batchedStatement,								batchedParamIndex, this.batchedArgs								.get(batchCounter++));					}								try {						batchedStatement.execute();					} catch (SQLException ex) {						sqlEx = handleExceptionForBatch(batchCounter - 1, numValuesPerBatch, 								updateCounts, ex);					}										updateCountCounter = processMultiCountsAndKeys(							(StatementImpl)batchedStatement, updateCountCounter,							updateCounts);										batchedStatement.clearParameters();								numValuesPerBatch = numBatchedArgs - batchCounter;				} finally {					if (batchedStatement != null) {						batchedStatement.close();					}				}								try {					if (numValuesPerBatch > 0) {									if (this.retrieveGeneratedKeys) {							batchedStatement = locallyScopedConn.prepareStatement(									generateMultiStatementForBatch(numValuesPerBatch),								RETURN_GENERATED_KEYS);						} else {							batchedStatement = locallyScopedConn.prepareStatement(									generateMultiStatementForBatch(numValuesPerBatch));						}												if (timeoutTask != null) {							timeoutTask.toCancel = (StatementImpl)batchedStatement;						}												batchedParamIndex = 1;									while (batchCounter < numBatchedArgs) {							batchedParamIndex = setOneBatchedParameterSet(batchedStatement,									batchedParamIndex, this.batchedArgs									.get(batchCounter++));						}									try {							batchedStatement.execute();						} catch (SQLException ex) {							sqlEx = handleExceptionForBatch(batchCounter - 1, numValuesPerBatch, 									updateCounts, ex);						}												updateCountCounter = processMultiCountsAndKeys(								(StatementImpl)batchedStatement, updateCountCounter,								updateCounts);												batchedStatement.clearParameters();					}								if (timeoutTask != null) {						if (timeoutTask.caughtWhileCancelling != null) {							throw timeoutTask.caughtWhileCancelling;						}						timeoutTask.cancel();						timeoutTask = null;					}										if (sqlEx != null) {						throw new java.sql.BatchUpdateException(sqlEx								.getMessage(), sqlEx.getSQLState(), sqlEx								.getErrorCode(), updateCounts);					}										return updateCounts;				} finally {					if (batchedStatement != null) {						batchedStatement.close();					}				}			} finally {				if (timeoutTask != null) {					timeoutTask.cancel();				}								resetCancelledState();								if (!multiQueriesEnabled) {					locallyScopedConn.getIO().disableMultiQueries();				}								clearBatch();			}		}	}		private String generateMultiStatementForBatch(int numBatches) {		StringBuffer newStatementSql = new StringBuffer((this.originalSql				.length() + 1) * numBatches);						newStatementSql.append(this.originalSql);		for (int i = 0; i < numBatches - 1; i++) {			newStatementSql.append(';');			newStatementSql.append(this.originalSql);		}		return newStatementSql.toString();	}		/**	 * Rewrites the already prepared statement into a multi-value insert	 * statement of 'statementsPerBatch' values and executes the entire batch	 * using this new statement.	 * 	 * @return update counts in the same fashion as executeBatch()	 * 	 * @throws SQLException	 */	protected int[] executeBatchedInserts(int batchTimeout) throws SQLException {		String valuesClause = extractValuesClause();		Connection locallyScopedConn = this.connection;		if (valuesClause == null) {			return executeBatchSerially(batchTimeout);		}		int numBatchedArgs = this.batchedArgs.size();		if (this.retrieveGeneratedKeys) {			this.batchedGeneratedKeys = new ArrayList(numBatchedArgs);		}		int numValuesPerBatch = computeBatchSize(numBatchedArgs);		if (numBatchedArgs < numValuesPerBatch) {			numValuesPerBatch = numBatchedArgs;		}		java.sql.PreparedStatement batchedStatement = null;		int batchedParamIndex = 1;		int updateCountRunningTotal = 0;		int numberToExecuteAsMultiValue = 0;		int batchCounter = 0;		CancelTask timeoutTask = null;		SQLException sqlEx = null;				int[] updateCounts = new int[numBatchedArgs];		for (int i = 0; i < this.batchedArgs.size(); i++) {			updateCounts[i] = 1;		}				try {			try {				if (this.retrieveGeneratedKeys) {					batchedStatement = locallyScopedConn.prepareStatement(							generateBatchedInsertSQL(valuesClause,									numValuesPerBatch), RETURN_GENERATED_KEYS);				} else {					batchedStatement = locallyScopedConn							.prepareStatement(generateBatchedInsertSQL(									valuesClause, numValuesPerBatch));				}				if (this.connection.getEnableQueryTimeouts()						&& batchTimeout != 0						&& this.connection.versionMeetsMinimum(5, 0, 0)) {					timeoutTask = new CancelTask(							(StatementImpl) batchedStatement);					ConnectionImpl.getCancelTimer().schedule(timeoutTask,							batchTimeout);				}				if (numBatchedArgs < numValuesPerBatch) {					numberToExecuteAsMultiValue = numBatchedArgs;				} else {					numberToExecuteAsMultiValue = numBatchedArgs							/ numValuesPerBatch;				}				int numberArgsToExecute = numberToExecuteAsMultiValue						* numValuesPerBatch;				for (int i = 0; i < numberArgsToExecute; i++) {					if (i != 0 && i % numValuesPerBatch == 0) {						try {							updateCountRunningTotal += batchedStatement

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性生活影院| 欧美大片在线观看一区二区| 国产精品一级片| 国产精品综合二区| 国产亚洲一区二区三区四区 | 午夜欧美2019年伦理| ...中文天堂在线一区| 国产精品二三区| 亚洲黄色免费网站| 久久综合狠狠综合久久激情| 色一情一乱一乱一91av| 国产在线精品一区二区| 国内精品久久久久影院薰衣草| 免费成人小视频| 亚洲一区二区三区精品在线| 亚洲成人激情自拍| 美国十次综合导航| 国产91富婆露脸刺激对白 | 国产欧美一区二区精品久导航| 在线观看日韩电影| 91麻豆精品91久久久久同性| 精品欧美一区二区久久| 亚洲精品在线一区二区| 日本一区二区三区高清不卡| 国产免费久久精品| 亚洲精品v日韩精品| 国产亚洲欧美日韩在线一区| 久久综合九色欧美综合狠狠| 国产精品久久久久婷婷二区次| 欧美日韩国产高清一区二区| 欧美xxxxxxxx| 国产精品久久久久9999吃药| 国产盗摄视频一区二区三区| 久久国产精品第一页| 亚洲激情男女视频| 亚洲国产日日夜夜| 午夜精品久久久久久不卡8050| 亚洲福中文字幕伊人影院| 亚洲影视在线观看| 欧洲一区二区av| 91精品国产综合久久久久久漫画| 欧美专区亚洲专区| 欧美夫妻性生活| 欧美精品一卡两卡| 亚洲成av人片一区二区梦乃| 亚洲综合图片区| 亚洲欧洲无码一区二区三区| 亚洲精品视频在线观看免费| 99国产精品久| 成人sese在线| 欧美视频三区在线播放| 99久久婷婷国产综合精品| 日本aⅴ亚洲精品中文乱码| 亚洲精品乱码久久久久久黑人| 尤物av一区二区| 久久综合九色综合97婷婷女人| 国产农村妇女毛片精品久久麻豆| 夜夜精品视频一区二区| 视频一区二区三区中文字幕| 一区二区三区在线观看国产| 精品国精品国产尤物美女| 欧美成人一区二区| 精品久久久久香蕉网| 亚洲日本va午夜在线影院| 免费日本视频一区| 成人av影院在线| 99久久精品免费看国产| 成人的网站免费观看| 99视频热这里只有精品免费| 欧美成人精品高清在线播放| 中文字幕一区二区三中文字幕| 一卡二卡三卡日韩欧美| 国产69精品一区二区亚洲孕妇| 亚洲自拍偷拍九九九| 国产欧美日本一区视频| 亚洲一区免费在线观看| 91丨九色丨黑人外教| 久久久国产综合精品女国产盗摄| 国产成人免费视频一区| 91精品91久久久中77777| 国产河南妇女毛片精品久久久| 一本久久a久久精品亚洲| 国产精品美女久久久久高潮| 日韩精品中午字幕| 亚洲柠檬福利资源导航| 亚洲欧美另类小说| 91麻豆免费看片| ...av二区三区久久精品| 久久97超碰色| 欧美蜜桃一区二区三区| 一本色道久久综合狠狠躁的推荐| 日韩美女主播在线视频一区二区三区| 欧美性一区二区| 国产精品视频一二| 久久精品国产精品亚洲精品| 在线播放日韩导航| 日韩精品乱码免费| 在线日韩av片| 亚洲成人手机在线| 欧美一区二区二区| 亚洲成a人片综合在线| 在线视频欧美区| 一区二区在线观看视频| 91蝌蚪porny九色| 亚洲欧美在线视频| 亚洲高清在线视频| 欧美日韩综合色| 亚洲一区免费视频| 国产成人午夜精品影院观看视频| 99久久久免费精品国产一区二区| 欧美电影在线免费观看| 久久精品亚洲精品国产欧美| 亚洲国产精品久久久男人的天堂| 国产麻豆精品theporn| 26uuu久久天堂性欧美| 国产一区二区久久| 亚洲国产精品激情在线观看| 丰满岳乱妇一区二区三区| 久久精品视频一区| 亚洲精品国产a久久久久久| 色猫猫国产区一区二在线视频| 一区二区三区电影在线播| 久久国产福利国产秒拍| 精品久久久影院| 亚洲成人在线网站| 精品少妇一区二区三区日产乱码 | 欧美一级搡bbbb搡bbbb| 六月丁香综合在线视频| 亚洲码国产岛国毛片在线| 欧美午夜电影一区| 国产精品日韩精品欧美在线| 91啦中文在线观看| 国产精品国产自产拍高清av| 在线免费观看日韩欧美| 日本在线播放一区二区三区| 欧美精品一区二区精品网| 日日夜夜免费精品| 国产偷国产偷精品高清尤物| 色悠悠久久综合| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美性猛交xxxxxx富婆| 亚洲蜜桃精久久久久久久| 在线不卡一区二区| 午夜伊人狠狠久久| 精品国产百合女同互慰| 免费看日韩精品| 国产精品久久久久久久裸模| 欧美日韩一二三| 午夜精品久久久久久久| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲国产视频网站| 欧洲激情一区二区| 亚洲影视在线播放| 欧美日韩免费观看一区三区| 亚洲午夜激情网站| 国产日韩欧美精品在线| 欧美唯美清纯偷拍| 国产在线视频精品一区| 国产午夜精品一区二区三区四区| 91视频国产资源| 亚洲欧美乱综合| 欧美中文字幕一区二区三区亚洲 | 在线看国产日韩| 亚洲自拍偷拍九九九| 久久久久久电影| 欧美另类一区二区三区| 99久久婷婷国产综合精品电影| 日韩1区2区3区| 久久综合资源网| 福利电影一区二区三区| 日本欧美久久久久免费播放网| 中文字幕亚洲一区二区va在线| eeuss鲁片一区二区三区| 狠狠色丁香婷婷综合| 午夜天堂影视香蕉久久| 亚洲手机成人高清视频| 色综合久久中文字幕| 午夜精品aaa| 亚洲国产成人一区二区三区| 国产成人夜色高潮福利影视| 免费观看在线色综合| 精品久久免费看| 日韩丝袜情趣美女图片| 欧美色图在线观看| av动漫一区二区| 激情欧美一区二区| 久久综合国产精品| 日韩欧美国产午夜精品| 国产精品91xxx| 亚洲精品乱码久久久久久久久| 欧美高清在线精品一区| 久久网站最新地址| 久久综合久久综合久久| 99国内精品久久| 日韩精品色哟哟| 日韩国产高清影视| 午夜国产不卡在线观看视频| 国产色产综合色产在线视频| 亚洲精品一区二区三区99 | 日韩电影免费在线观看网站|