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

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

?? preparedstatement.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* Copyright (C) 2002-2007 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 com.mysql.jdbc;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.ObjectOutputStream;import java.io.Reader;import java.io.StringReader;import java.io.UnsupportedEncodingException;import java.lang.reflect.Constructor;import java.lang.reflect.InvocationTargetException;import java.math.BigDecimal;import java.math.BigInteger;import java.net.URL;import java.sql.Array;import java.sql.BatchUpdateException;import java.sql.Clob;import java.sql.Date;import java.sql.ParameterMetaData;import java.sql.Ref;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Time;import java.sql.Timestamp;import java.sql.Types;import java.text.ParsePosition;import java.text.SimpleDateFormat;import java.util.ArrayList;import java.util.Calendar;import java.util.List;import java.util.Locale;import java.util.Properties;import java.util.TimeZone;import com.mysql.jdbc.StatementImpl.CancelTask;import com.mysql.jdbc.exceptions.MySQLStatementCancelledException;import com.mysql.jdbc.exceptions.NotYetImplementedException;import com.mysql.jdbc.exceptions.MySQLTimeoutException;import com.mysql.jdbc.profiler.ProfilerEvent;/** * A SQL Statement is pre-compiled and stored in a PreparedStatement object. * This object can then be used to efficiently execute this statement multiple * times. *  * <p> * <B>Note:</B> The setXXX methods for setting IN parameter values must specify * types that are compatible with the defined SQL type of the input parameter. * For instance, if the IN parameter has SQL type Integer, then setInt should be * used. * </p> *  * <p> * If arbitrary parameter type conversions are required, then the setObject * method should be used with a target SQL type. * </p> *  * @author Mark Matthews * @version $Id: PreparedStatement.java,v 1.1.2.1 2005/05/13 18:58:38 mmatthews *          Exp $ *  * @see java.sql.ResultSet * @see java.sql.PreparedStatement */public class PreparedStatement extends com.mysql.jdbc.StatementImpl implements		java.sql.PreparedStatement {	private static final Constructor JDBC_4_PSTMT_2_ARG_CTOR;	private static final Constructor JDBC_4_PSTMT_3_ARG_CTOR;	private static final Constructor JDBC_4_PSTMT_4_ARG_CTOR;		static {		if (Util.isJdbc4()) {			try {				JDBC_4_PSTMT_2_ARG_CTOR = Class.forName(						"com.mysql.jdbc.JDBC4PreparedStatement")						.getConstructor(								new Class[] { ConnectionImpl.class, String.class });				JDBC_4_PSTMT_3_ARG_CTOR = Class.forName(						"com.mysql.jdbc.JDBC4PreparedStatement")						.getConstructor(								new Class[] { ConnectionImpl.class, String.class,										String.class });				JDBC_4_PSTMT_4_ARG_CTOR = Class.forName(						"com.mysql.jdbc.JDBC4PreparedStatement")						.getConstructor(								new Class[] { ConnectionImpl.class, String.class,										String.class, ParseInfo.class });			} catch (SecurityException e) {				throw new RuntimeException(e);			} catch (NoSuchMethodException e) {				throw new RuntimeException(e);			} catch (ClassNotFoundException e) {				throw new RuntimeException(e);			}		} else {			JDBC_4_PSTMT_2_ARG_CTOR = null;			JDBC_4_PSTMT_3_ARG_CTOR = null;			JDBC_4_PSTMT_4_ARG_CTOR = null;		}	}		class BatchParams {		boolean[] isNull = null;		boolean[] isStream = null;		InputStream[] parameterStreams = null;		byte[][] parameterStrings = null;		int[] streamLengths = null;		BatchParams(byte[][] strings, InputStream[] streams,				boolean[] isStreamFlags, int[] lengths, boolean[] isNullFlags) {			//			// Make copies			//			this.parameterStrings = new byte[strings.length][];			this.parameterStreams = new InputStream[streams.length];			this.isStream = new boolean[isStreamFlags.length];			this.streamLengths = new int[lengths.length];			this.isNull = new boolean[isNullFlags.length];			System.arraycopy(strings, 0, this.parameterStrings, 0,					strings.length);			System.arraycopy(streams, 0, this.parameterStreams, 0,					streams.length);			System.arraycopy(isStreamFlags, 0, this.isStream, 0,					isStreamFlags.length);			System.arraycopy(lengths, 0, this.streamLengths, 0, lengths.length);			System					.arraycopy(isNullFlags, 0, this.isNull, 0,							isNullFlags.length);		}	}	class EndPoint {		int begin;		int end;		EndPoint(int b, int e) {			this.begin = b;			this.end = e;		}	}	class ParseInfo {		char firstStmtChar = 0;		boolean foundLimitClause = false;		boolean foundLoadData = false;		long lastUsed = 0;		int statementLength = 0;		int statementStartPos = 0;		byte[][] staticSql = null;		/**		 * Represents the "parsed" state of a client-side		 * prepared statement, with the statement broken up into		 * it's static and dynamic (where parameters are bound) 		 * parts.		 */		public ParseInfo(String sql, ConnectionImpl conn,				java.sql.DatabaseMetaData dbmd, String encoding,				SingleByteCharsetConverter converter) throws SQLException {			try {				if (sql == null) {					throw SQLError.createSQLException(Messages							.getString("PreparedStatement.61"), //$NON-NLS-1$							SQLError.SQL_STATE_ILLEGAL_ARGUMENT);				}				this.lastUsed = System.currentTimeMillis();				String quotedIdentifierString = dbmd.getIdentifierQuoteString();				char quotedIdentifierChar = 0;				if ((quotedIdentifierString != null)						&& !quotedIdentifierString.equals(" ") //$NON-NLS-1$						&& (quotedIdentifierString.length() > 0)) {					quotedIdentifierChar = quotedIdentifierString.charAt(0);				}				this.statementLength = sql.length();				ArrayList endpointList = new ArrayList();				boolean inQuotes = false;				char quoteChar = 0;				boolean inQuotedId = false;				int lastParmEnd = 0;				int i;				int stopLookingForLimitClause = this.statementLength - 5;				this.foundLimitClause = false;				boolean noBackslashEscapes = connection.isNoBackslashEscapesSet();				// we're not trying to be real pedantic here, but we'd like to 				// skip comments at the beginning of statements, as frameworks				// such as Hibernate use them to aid in debugging				statementStartPos = findStartOfStatement(sql);				for (i = statementStartPos; i < this.statementLength; ++i) {					char c = sql.charAt(i);					if ((this.firstStmtChar == 0) && Character.isLetter(c)) {						// Determine what kind of statement we're doing (_S_elect,						// _I_nsert, etc.)						this.firstStmtChar = Character.toUpperCase(c);					}					if (!noBackslashEscapes &&							c == '\\' && i < (this.statementLength - 1)) {						i++;						continue; // next character is escaped					}					// are we in a quoted identifier?					// (only valid when the id is not inside a 'string')					if (!inQuotes && (quotedIdentifierChar != 0)							&& (c == quotedIdentifierChar)) {						inQuotedId = !inQuotedId;					} else if (!inQuotedId) {						//	only respect quotes when not in a quoted identifier						if (inQuotes) {							if (((c == '\'') || (c == '"')) && c == quoteChar) {								if (i < (this.statementLength - 1) && sql.charAt(i + 1) == quoteChar) {									i++; 									continue; // inline quote escape								}								inQuotes = !inQuotes;								quoteChar = 0;							} else if (((c == '\'') || (c == '"')) && c == quoteChar) {								inQuotes = !inQuotes;								quoteChar = 0;							}						} else {							if (c == '#'								|| (c == '-' && (i + 1) < this.statementLength && sql										.charAt(i + 1) == '-')) {								// run out to end of statement, or newline,								// whichever comes first								int endOfStmt = this.statementLength - 1;								for (; i < endOfStmt; i++) {									c = sql.charAt(i);									if (c == '\r' || c == '\n') {										break;									}								}								continue;							} else if (c == '/' && (i + 1) < this.statementLength) {								// Comment?								char cNext = sql.charAt(i + 1);								if (cNext == '*') {									i+= 2;									for (int j = i; j < this.statementLength; j++) {										i++;										cNext = sql.charAt(j);										if (cNext == '*' && (j + 1) < this.statementLength) {											if (sql.charAt(j + 1) == '/') {												i++;												if (i < this.statementLength) {													c = sql.charAt(i);												}												break; // comment done											}										}									}								}							} else if ((c == '\'') || (c == '"')) {								inQuotes = true;								quoteChar = c;							}						}					}					if ((c == '?') && !inQuotes && !inQuotedId) {						endpointList.add(new int[] { lastParmEnd, i });						lastParmEnd = i + 1;					}					if (!inQuotes && (i < stopLookingForLimitClause)) {						if ((c == 'L') || (c == 'l')) {							char posI1 = sql.charAt(i + 1);							if ((posI1 == 'I') || (posI1 == 'i')) {								char posM = sql.charAt(i + 2);								if ((posM == 'M') || (posM == 'm')) {									char posI2 = sql.charAt(i + 3);									if ((posI2 == 'I') || (posI2 == 'i')) {										char posT = sql.charAt(i + 4);										if ((posT == 'T') || (posT == 't')) {											foundLimitClause = true;										}									}								}							}						}					}				}				if (this.firstStmtChar == 'L') {					if (StringUtils.startsWithIgnoreCaseAndWs(sql, "LOAD DATA")) { //$NON-NLS-1$						this.foundLoadData = true;					} else {						this.foundLoadData = false;					}				} else {					this.foundLoadData = false;				}				endpointList.add(new int[] { lastParmEnd, this.statementLength });				this.staticSql = new byte[endpointList.size()][];				char[] asCharArray = sql.toCharArray();				for (i = 0; i < this.staticSql.length; i++) {					int[] ep = (int[]) endpointList.get(i);					int end = ep[1];					int begin = ep[0];					int len = end - begin;					if (this.foundLoadData) {						String temp = new String(asCharArray, begin, len);						this.staticSql[i] = temp.getBytes();					} else if (encoding == null) {						byte[] buf = new byte[len];						for (int j = 0; j < len; j++) {							buf[j] = (byte) sql.charAt(begin + j);						}						this.staticSql[i] = buf;					} else {						if (converter != null) {							this.staticSql[i] = StringUtils.getBytes(sql,									converter, encoding, connection									.getServerCharacterEncoding(), begin,									len, connection.parserKnowsUnicode());						} else {							String temp = new String(asCharArray, begin, len);							this.staticSql[i] = StringUtils.getBytes(temp,									encoding, connection									.getServerCharacterEncoding(),									connection.parserKnowsUnicode(), conn);						}					}				}			} catch (StringIndexOutOfBoundsException oobEx) {				SQLException sqlEx = new SQLException("Parse error for " + sql);				sqlEx.initCause(oobEx);				throw sqlEx;			}		}	}	private final static byte[] HEX_DIGITS = new byte[] { (byte) '0',			(byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5',			(byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'A',			(byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F' };	/**	 * Reads length bytes from reader into buf. Blocks until enough input is	 * available	 * 	 * @param reader	 *            DOCUMENT ME!	 * @param buf	 *            DOCUMENT ME!	 * @param length	 *            DOCUMENT ME!	 * 	 * @return DOCUMENT ME!	 * 	 * @throws IOException	 *             DOCUMENT ME!	 */	protected static int readFully(Reader reader, char[] buf, int length)			throws IOException {		int numCharsRead = 0;		while (numCharsRead < length) {			int count = reader.read(buf, numCharsRead, length - numCharsRead);			if (count < 0) {				break;			}			numCharsRead += count;		}		return numCharsRead;	}	/**	 * Does the batch (if any) contain "plain" statements added by	 * Statement.addBatch(String)?	 * 	 * If so, we can't re-write it to use multi-value or multi-queries.	 */	protected boolean batchHasPlainStatements = false;	private java.sql.DatabaseMetaData dbmd = null;	/**	 * What is the first character of the prepared statement (used to check for	 * SELECT vs. INSERT/UPDATE/DELETE)	 */	protected char firstCharOfStmt = 0;	/** Does the SQL for this statement contain a 'limit' clause? */	protected boolean hasLimitClause = false;		/** Is this query a LOAD DATA query? */	protected boolean isLoadDataQuery = false;	private boolean[] isNull = null;	private boolean[] isStream = null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产成人精品影院 | 亚洲综合色婷婷| 成人app软件下载大全免费| 日韩欧美一区二区三区在线| 日韩在线卡一卡二| 欧美一区欧美二区| 久久99精品久久久久久| 91免费视频观看| 午夜精品久久久久久久99水蜜桃| 精品一区二区免费视频| 久久午夜电影网| 成人国产精品视频| 亚洲精品日韩专区silk| 欧美日韩国产系列| 激情综合五月天| 国产精品伦理在线| 欧美亚洲国产一区在线观看网站| 亚洲6080在线| 久久精品人人爽人人爽| 91女厕偷拍女厕偷拍高清| 日韩综合在线视频| 国产日韩欧美激情| 欧美日韩三级在线| 国产在线视频精品一区| 亚洲精品自拍动漫在线| 日韩免费看的电影| 97se亚洲国产综合在线| 日韩在线a电影| 国产精品美女视频| 91精品国产综合久久蜜臀| 高清在线不卡av| 亚洲大片在线观看| 国产欧美日韩综合精品一区二区| 在线观看一区日韩| 国产精品99久久久久久宅男| 亚洲午夜电影在线观看| 久久久精品影视| 欧美精品 日韩| 99久久er热在这里只有精品15| 日韩中文字幕不卡| 日本一区二区三区在线观看| 欧美日韩国产综合一区二区三区 | 国产女同性恋一区二区| 欧美日本韩国一区二区三区视频| 国产美女久久久久| 亚洲国产精品久久久久婷婷884 | 免费成人在线视频观看| 亚洲精品欧美激情| 国产亚洲短视频| 3d成人动漫网站| 色综合久久88色综合天天| 国产乱码字幕精品高清av| 亚洲h精品动漫在线观看| 国产精品视频第一区| 欧美成人一区二区三区片免费| 色噜噜狠狠色综合中国| 丰满白嫩尤物一区二区| 日本一区中文字幕| 亚洲精品视频免费观看| 国产精品传媒视频| 久久久www成人免费无遮挡大片| 4438x亚洲最大成人网| 在线观看一区二区精品视频| 97久久超碰国产精品| 国产高清在线精品| 韩国视频一区二区| 日韩精品一级二级| 亚洲国产cao| 亚洲一区二区三区激情| 亚洲欧美日韩一区二区| 国产精品乱码一区二三区小蝌蚪| 久久久亚洲午夜电影| 精品国产乱码久久| 精品美女在线播放| 精品国产免费人成电影在线观看四季 | 国产三区在线成人av| 2021中文字幕一区亚洲| 久久免费看少妇高潮| 久久久综合激的五月天| 久久久午夜精品| 国产亚洲女人久久久久毛片| 国产性天天综合网| 国产精品久久影院| 国产精品久久久久四虎| 最新热久久免费视频| 亚洲色图制服丝袜| 亚洲综合在线电影| 青娱乐精品视频在线| 老色鬼精品视频在线观看播放| 蜜桃av一区二区| 国产精品一二一区| 99视频超级精品| 精品污污网站免费看| 91精品啪在线观看国产60岁| 日韩久久精品一区| 国产日韩综合av| 亚洲欧美日韩在线| 午夜精品久久久| 国产一区在线看| www.亚洲色图| 欧美日韩精品欧美日韩精品| 日韩欧美一区二区视频| 国产网站一区二区三区| 日韩码欧中文字| 日韩激情av在线| 国产成人福利片| 色婷婷久久99综合精品jk白丝 | 国模大尺度一区二区三区| 国产成都精品91一区二区三| 91丨九色丨蝌蚪丨老版| 欧美日韩另类国产亚洲欧美一级| 精品美女一区二区| 亚洲欧美日韩电影| 极品美女销魂一区二区三区| 色综合激情久久| 日韩免费观看高清完整版| 亚洲天堂2014| 蜜桃精品在线观看| 99免费精品视频| 日韩欧美久久一区| 亚洲美女区一区| 精品亚洲成av人在线观看| 91麻豆国产福利精品| 日韩欧美一级片| 一个色在线综合| 国产东北露脸精品视频| 欧美嫩在线观看| 综合激情成人伊人| 国产一二精品视频| 欧美日韩你懂的| 亚洲欧洲日韩综合一区二区| 美国精品在线观看| 欧美无人高清视频在线观看| 国产三级精品在线| 美日韩一区二区三区| 欧美影视一区在线| 中文字幕一区二区不卡| 激情综合五月婷婷| 日韩一二三四区| 午夜精品福利视频网站| 色综合夜色一区| 国产欧美精品区一区二区三区 | 欧美一级在线免费| 樱花草国产18久久久久| 国产成人精品在线看| 日韩欧美在线影院| 五月天视频一区| 欧美性欧美巨大黑白大战| 国产精品国产精品国产专区不片| 国产精品1区2区3区| 日韩免费一区二区三区在线播放| 亚洲444eee在线观看| 欧美视频一区二区三区四区| 亚洲色图丝袜美腿| 色综合婷婷久久| 中文字幕一区二区不卡| 成人免费观看av| 久久久精品黄色| 国产成a人无v码亚洲福利| 欧美va亚洲va香蕉在线| 精一区二区三区| 日韩免费电影网站| 免费观看日韩电影| 精品国产乱码久久| 国内精品久久久久影院色| 日韩久久久精品| 久久www免费人成看片高清| 日韩欧美国产精品一区| 男女男精品网站| 久久亚洲一区二区三区明星换脸| 久久99久久99| www一区二区| 国产高清亚洲一区| 中文字幕一区二区三区蜜月| 99视频一区二区三区| **欧美大码日韩| 欧美写真视频网站| 丝袜美腿亚洲一区| 久久综合九色综合97婷婷女人| 国产高清无密码一区二区三区| 中文字幕精品一区二区三区精品| 成人av资源站| 经典一区二区三区| 久久蜜桃香蕉精品一区二区三区| 国产丶欧美丶日本不卡视频| 中文字幕精品一区二区精品绿巨人| av电影在线观看一区| 一区二区三区av电影 | 色香色香欲天天天影视综合网| 一区二区三区在线视频播放| 欧美四级电影网| 美腿丝袜亚洲一区| 国产精品美女久久久久久2018| 日本精品一区二区三区四区的功能| 亚洲一区二区三区中文字幕| 欧美妇女性影城| 国产精品456露脸| 亚洲一区二区三区国产| 精品人伦一区二区色婷婷| 成a人片国产精品|