public class AltibaseStatement
extends java.lang.Object
implements java.sql.Statement
| Modifier and Type | Class and Description |
|---|---|
protected class |
AltibaseStatement.ExecuteResultManager |
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES_PER_CHAR |
static int |
DEFAULT_UPDATE_COUNT |
protected static int[] |
EMPTY_BATCH_RESULT |
protected static long[] |
EMPTY_LARGE_BATCH_RESULT |
protected boolean |
mBatchSetBytesUseLob |
protected AltibaseConnection |
mConnection |
protected short |
mCurrentResultIndex |
protected AltibaseResultSet |
mCurrentResultSet |
protected boolean |
mEscapeProcessing |
protected AltibaseStatement.ExecuteResultManager |
mExecuteResultMgr |
protected CmExecutionResult |
mExecutionResult |
protected CmFetchResult |
mFetchResult |
protected int |
mFetchSize |
protected boolean |
mForceClobBind |
protected boolean |
mIsClosed |
protected boolean |
mIsDeferred |
protected int |
mMaxFieldSize |
protected long |
mMaxRows |
protected CmPrepareResult |
mPrepareResult |
protected java.util.List<Column> |
mPrepareResultColumns |
protected java.lang.String |
mQstr |
protected java.util.List<java.sql.ResultSet> |
mResultSetList |
protected boolean |
mResultSetReturned |
protected boolean |
mReUseResultSet |
protected int |
mStmtCID |
protected int |
mTargetResultSetConcurrency |
protected int |
mTargetResultSetType |
protected java.sql.SQLWarning |
mWarning |
| Constructor and Description |
|---|
AltibaseStatement(AltibaseConnection aCon,
int aResultSetType,
int aResultSetConcurrency,
int aResultSetHoldability) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(java.lang.String aSql) |
protected void |
afterExecution() |
void |
cancel() |
static void |
checkAutoGeneratedKeys(int aAutoGeneratedKeys) |
protected void |
clearAllResults() |
void |
clearBatch() |
void |
clearForGeneratedKeys() |
void |
clearWarnings() |
void |
close() |
void |
closeOnCompletion() |
protected static AltibaseStatement |
createInternalStatement(AltibaseConnection sConnection)
Internal statement »ý¼ºÇÑ´Ù.
|
protected void |
createProtocolContext() |
boolean |
cursorhasNoData()
¼¹ö Ä¿¼°¡ ¿·ÁÀÖ´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏÇÑ´Ù.
|
protected int |
downgradeFetchSize(int aRows)
Dynamic Array¿¡¼ Çã¿ëÇÒ ¼ö ÀÖ´Â ÃÖ´ë ¹üÀ§·Î fetchSize¸¦ º¸Á¤ÇÑ´Ù.
|
boolean |
execute(java.lang.String aSql) |
boolean |
execute(java.lang.String aSql,
int aAutoGeneratedKeys) |
boolean |
execute(java.lang.String aSql,
int[] aColumnIndexes) |
boolean |
execute(java.lang.String aSql,
java.lang.String[] aColumnNames) |
int[] |
executeBatch() |
long[] |
executeLargeBatch() |
long |
executeLargeUpdate(java.lang.String aSql) |
java.sql.ResultSet |
executeQuery(java.lang.String aSql) |
int |
executeUpdate(java.lang.String aSql) |
int |
executeUpdate(java.lang.String aSql,
int aAutoGeneratedKeys) |
int |
executeUpdate(java.lang.String aSql,
int[] aColumnIndexes) |
int |
executeUpdate(java.lang.String aSql,
java.lang.String[] aColumnNames) |
java.sql.Connection |
getConnection() |
java.lang.String |
getExplainPlan()
Plan text¸¦ ¾ò´Â´Ù.
|
int |
getFetchDirection() |
int |
getFetchSize() |
java.sql.ResultSet |
getGeneratedKeys() |
int |
getID() |
long |
getLargeMaxRows() |
long |
getLargeUpdateCount() |
protected static int |
getMaxFetchSize()
ÃÖ´ë fetch size ¸¦ ¹ÝȯÇÑ´Ù.
|
int |
getMaxFieldSize() |
int |
getMaxRows() |
AltibaseShardingConnection |
getMetaConn() |
boolean |
getMoreResults() |
boolean |
getMoreResults(int current) |
protected CmProtocolContextDirExec |
getProtocolContext() |
int |
getQueryTimeout() |
java.sql.ResultSet |
getResultSet() |
int |
getResultSetConcurrency() |
int |
getResultSetHoldability() |
int |
getResultSetType() |
java.lang.String |
getSql() |
int |
getUpdateCount() |
java.sql.SQLWarning |
getWarnings() |
protected void |
incCurrentResultSetIndex() |
protected boolean |
isAsyncPrefetch()
ºñµ¿±âÀûÀ¸·Î fetch ¸¦ ¼öÇàÇϰí ÀÖ´Â statement ¿©ºÎÀÎÁö È®ÀÎÇÑ´Ù.
|
boolean |
isClosed()
Statement°¡ ´ÝÇû´ÂÁö È®ÀÎÇÑ´Ù.
|
boolean |
isCloseOnCompletion() |
protected boolean |
isInternalStatement()
Internal statement ¿©ºÎ¸¦ È®ÀÎÇÏ´Ù.
|
protected boolean |
isPingSQL(java.lang.String aSql)
sqlÀÌ validation check¿ë ping Äõ¸®ÀÎÁö ¿©ºÎ¸¦ Á¤±Ô Ç¥Çö½ÄÀ» ÀÌ¿ëÇØ ÆÇº°ÇÑ´Ù.
|
boolean |
isPoolable() |
boolean |
isPrepared()
Prepared ¿©ºÎ¸¦ ¸®ÅÏÇÑ´Ù.
|
boolean |
isWrapperFor(java.lang.Class<?> aIface) |
void |
makeQstrForGeneratedKeys(java.lang.String aSql,
int[] aColumnIndexes,
java.lang.String[] aColumnNames)
Generated Keys¸¦ ¾ò±âÀ§ÇÑ Äõ¸®¹®À» ¸¸µç´Ù.
|
protected void |
pingAndCreateLightweightResultSet()
³»ºÎÀûÀ¸·Î ping¸Þ¼Òµå¸¦ È£ÃâÇÑ ´ÙÀ½ Á¤»óÀûÀÏ °æ¿ì SELECT 1ÀÇ °á°ú¿¡ ÇØ´çÇÏ´Â row¸¦ ¼öµ¿À¸·Î »ý¼ºÇÑ ÈÄ ¹ÝȯÇÑ´Ù.
|
protected java.lang.String |
procDowngradeAndGetTargetSql(java.lang.String aOrgQstr)
Downgrade°¡ ÇÊ¿äÇϸé ó¸®Çϰí, ½ÇÁ¦ »ç¿ëÇÒ º¯È¯µÈ Äõ¸®¹®À» ¾ò´Â´Ù.
|
protected java.sql.ResultSet |
processExecutionQueryResult(java.lang.String aSql) |
protected boolean |
processExecutionResult() |
void |
setCursorName(java.lang.String aName) |
void |
setEscapeProcessing(boolean aEnable) |
void |
setFetchDirection(int aDirection) |
void |
setFetchSize(int aRows) |
void |
setLargeMaxRows(long aMax) |
void |
setMaxFieldSize(int aMax) |
void |
setMaxRows(int aMax) |
void |
setMetaConnection(AltibaseShardingConnection aMetaConn) |
void |
setPoolable(boolean aPoolable) |
void |
setPrepareResult(CmPrepareResult aPrepareResult) |
void |
setQueryTimeout(int aSeconds) |
void |
setSql(java.lang.String aSql) |
protected int |
toInt(long aUpdateCount) |
protected int[] |
toIntBatchUpdateCounts(long[] aLongUpdateCounts) |
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> aIface) |
public static final int DEFAULT_UPDATE_COUNT
public static final int BYTES_PER_CHAR
protected AltibaseConnection mConnection
protected boolean mEscapeProcessing
protected AltibaseStatement.ExecuteResultManager mExecuteResultMgr
protected short mCurrentResultIndex
protected AltibaseResultSet mCurrentResultSet
protected java.util.List<java.sql.ResultSet> mResultSetList
protected boolean mIsClosed
protected java.sql.SQLWarning mWarning
protected int mFetchSize
protected int mMaxFieldSize
protected long mMaxRows
protected CmPrepareResult mPrepareResult
protected java.util.List<Column> mPrepareResultColumns
protected CmExecutionResult mExecutionResult
protected CmFetchResult mFetchResult
protected int mStmtCID
protected boolean mIsDeferred
protected boolean mForceClobBind
protected boolean mBatchSetBytesUseLob
protected java.lang.String mQstr
protected static final long[] EMPTY_LARGE_BATCH_RESULT
protected boolean mReUseResultSet
protected boolean mResultSetReturned
protected int mTargetResultSetType
protected int mTargetResultSetConcurrency
protected static final int[] EMPTY_BATCH_RESULT
public AltibaseStatement(AltibaseConnection aCon, int aResultSetType, int aResultSetConcurrency, int aResultSetHoldability) throws java.sql.SQLException
java.sql.SQLExceptionpublic int getID()
public java.lang.String getSql()
public void setSql(java.lang.String aSql)
protected void createProtocolContext()
protected CmProtocolContextDirExec getProtocolContext()
protected void afterExecution()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void clearAllResults()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void makeQstrForGeneratedKeys(java.lang.String aSql,
int[] aColumnIndexes,
java.lang.String[] aColumnNames)
throws java.sql.SQLException
column indexes¿Í column names´Â µ¿½Ã¿¡ »ç¿ëÇÏÁö ¾Ê´Â´Ù. ¸¸¾à, µÑÀ» ¸ðµÎ ³Ñ°å´Ù¸é column indexes¸¸ »ç¿ëÇϰí column names °ªÀº ¹«½ÃÇÑ´Ù.
¸¸¾à ¿øº» Äõ¸®°¡ Generated Keys¸¦ ¾ò±â¿¡ ÀûÇÕÇÏÁö ¾Ê´Ù¸é, Á¶¿ëÈ÷ ³Ñ¾î°£´Ù.
aSql - ¿øº» Äõ¸®¹®. ¹Ýµå½Ã INSERT ±¸¹®À̾î¾ß ÇÑ´Ù.aColumnIndexes - an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys()aColumnNames - an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys()java.sql.SQLExceptionpublic void clearForGeneratedKeys()
protected boolean processExecutionResult()
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.ResultSet processExecutionQueryResult(java.lang.String aSql)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void addBatch(java.lang.String aSql)
throws java.sql.SQLException
addBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic void cancel()
throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLExceptionpublic void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Statementjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
int aAutoGeneratedKeys)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
int[] aColumnIndexes)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
java.lang.String[] aColumnNames)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic int[] executeBatch()
throws java.sql.SQLException
executeBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic long[] executeLargeBatch()
throws java.sql.SQLException
executeLargeBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(java.lang.String aSql)
throws java.sql.SQLException
executeQuery in interface java.sql.Statementjava.sql.SQLExceptionprotected void pingAndCreateLightweightResultSet()
throws java.sql.SQLException
java.sql.SQLException - Column°´Ã¼¿¡ setValue¸¦ ¼öÇàÇßÀ»¶§ ¿¡·¯°¡ ¹ß»ýÇÑ °æ¿ì.protected boolean isPingSQL(java.lang.String aSql)
aSql - Äõ¸® ½ºÆ®¸µpublic int executeUpdate(java.lang.String aSql,
int aAutoGeneratedKeys)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql,
int[] aColumnIndexes)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql,
java.lang.String[] aColumnNames)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface java.sql.Statementjava.sql.SQLExceptionpublic int getFetchDirection()
throws java.sql.SQLException
getFetchDirection in interface java.sql.Statementjava.sql.SQLExceptionpublic int getFetchSize()
throws java.sql.SQLException
getFetchSize in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet getGeneratedKeys()
throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLExceptionpublic int getMaxFieldSize()
throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLExceptionpublic int getMaxRows()
throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean getMoreResults()
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLExceptionprotected void incCurrentResultSetIndex()
public boolean getMoreResults(int current)
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLExceptionpublic int getQueryTimeout()
throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetConcurrency()
throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetHoldability()
throws java.sql.SQLException
getResultSetHoldability in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetType()
throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLExceptionpublic int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Statementjava.sql.SQLExceptionpublic void setCursorName(java.lang.String aName)
throws java.sql.SQLException
setCursorName in interface java.sql.Statementjava.sql.SQLExceptionpublic void setEscapeProcessing(boolean aEnable)
throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementjava.sql.SQLExceptionpublic void setFetchDirection(int aDirection)
throws java.sql.SQLException
setFetchDirection in interface java.sql.Statementjava.sql.SQLExceptionpublic void setFetchSize(int aRows)
throws java.sql.SQLException
setFetchSize in interface java.sql.Statementjava.sql.SQLExceptionprotected int downgradeFetchSize(int aRows)
aRows - fetchSizeprotected static int getMaxFetchSize()
public void setMaxFieldSize(int aMax)
throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementjava.sql.SQLExceptionpublic void setMaxRows(int aMax)
throws java.sql.SQLException
setMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setQueryTimeout(int aSeconds)
throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementjava.sql.SQLExceptionpublic java.lang.String getExplainPlan()
throws java.sql.SQLException
java.sql.SQLException - Plan text ¿äûÀ̳ª °á°ú¸¦ ¾ò´Âµ¥ ½ÇÆÐÇßÀ» ¶§protected final java.lang.String procDowngradeAndGetTargetSql(java.lang.String aOrgQstr)
throws java.sql.SQLException
¸¸¾à Downgrade³ª Äõ¸® º¯È¯ÀÌ ÇÊ¿ä ¾ø´Ù¸é Á¶¿ëÈ÷ ³Ñ¾î°¡°í ¿øº» Äõ¸®¹®À» ¹ÝȯÇÑ´Ù.
aOrgQstr - ¿øº» Äõ¸®¹®java.sql.SQLException - Downgrade ¿©ºÎ È®ÀÎ ¶Ç´Â Downgrade¿¡ ½ÇÆÐÇÑ °æ¿ìpublic static void checkAutoGeneratedKeys(int aAutoGeneratedKeys)
throws java.sql.SQLException
java.sql.SQLExceptionprotected boolean isAsyncPrefetch()
protected static AltibaseStatement createInternalStatement(AltibaseConnection sConnection) throws java.sql.SQLException
java.sql.SQLExceptionprotected boolean isInternalStatement()
public boolean isPrepared()
public boolean cursorhasNoData()
public void setMetaConnection(AltibaseShardingConnection aMetaConn)
public AltibaseShardingConnection getMetaConn()
public void setPrepareResult(CmPrepareResult aPrepareResult)
public java.lang.String toString()
toString in class java.lang.Objectpublic void closeOnCompletion()
closeOnCompletion in interface java.sql.Statementpublic boolean isCloseOnCompletion()
isCloseOnCompletion in interface java.sql.Statementpublic long executeLargeUpdate(java.lang.String aSql)
throws java.sql.SQLException
executeLargeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic long getLargeUpdateCount()
throws java.sql.SQLException
getLargeUpdateCount in interface java.sql.Statementjava.sql.SQLExceptionpublic long getLargeMaxRows()
throws java.sql.SQLException
getLargeMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setLargeMaxRows(long aMax)
throws java.sql.SQLException
setLargeMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setPoolable(boolean aPoolable)
setPoolable in interface java.sql.Statementpublic boolean isPoolable()
isPoolable in interface java.sql.Statementpublic <T> T unwrap(java.lang.Class<T> aIface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> aIface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionprotected int[] toIntBatchUpdateCounts(long[] aLongUpdateCounts)
protected int toInt(long aUpdateCount)