类 NativeServerSession
- java.lang.Object
-
- com.mysql.cj.protocol.a.NativeServerSession
-
- 所有已实现的接口:
ServerSession
public class NativeServerSession extends Object implements ServerSession
-
-
字段概要
-
从接口继承的字段 com.mysql.cj.protocol.ServerSession
LOCAL_CHARACTER_SET_RESULTS, TRANSACTION_COMPLETED, TRANSACTION_IN_PROGRESS, TRANSACTION_NOT_STARTED, TRANSACTION_STARTED
-
-
构造器概要
构造器 构造器 说明 NativeServerSession(PropertySet propertySet)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancharacterSetNamesMatches(String mysqlEncodingName)voidconfigureCharacterSets()booleancursorExists()Server will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.NativeCapabilitiesgetCapabilities()StringgetCharacterSetMetadata()StringgetCharacterSetResultsOnServer()longgetClientParam()TimeZonegetDefaultTimeZone()The default time zone used to marshall date/time values to/from the server.StringgetEncodingForIndex(int charsetIndex)Returns the Java character encoding name for the given MySQL server collation indexStringgetErrorMessageEncoding()intgetMaxBytesPerChar(Integer charsetIndex, String javaCharsetName)intgetMaxBytesPerChar(String javaCharsetName)intgetMetadataCollationIndex()intgetOldStatusFlags()StringgetServerDefaultCharset()intgetServerDefaultCollationIndex()TimeZonegetServerTimeZone()StringgetServerVariable(String name)intgetServerVariable(String variableName, int fallbackValue)Map<String,String>getServerVariables()ServerVersiongetServerVersion()Get the version of the MySQL server we are talking to.intgetStatusFlags()longgetThreadId()intgetTransactionState()booleanhasLongColumnInfo()booleanhasMoreResults()booleaninTransactionOnServer()booleanisAutocommit()booleanisAutoCommit()booleanisEOFDeprecated()booleanisLastRowSent()booleanisLowerCaseTableNames()Is the server configured to use lower-case table names only?booleanisNoBackslashEscapesSet()Is the server in a sql_mode that does not allow us to use \\ to escape things?booleanisQueryCacheEnabled()booleanisServerTruncatesFracSecs()booleanisSetNeededForAutoCommitMode(boolean autoCommitFlag, boolean elideSetAutoCommitsFlag)Should SET AUTOCOMMIT be sent to server if we are going to set autoCommitFlag in driverbooleanisVersion(ServerVersion version)Is the version of the MySQL server we are connected to the given version?booleannoGoodIndexUsed()booleannoIndexUsed()voidpreserveOldTransactionState()booleanqueryWasSlow()voidsetAutoCommit(boolean autoCommit)voidsetCapabilities(ServerCapabilities capabilities)voidsetCharacterSetMetadata(String characterSetMetadata)voidsetCharacterSetResultsOnServer(String characterSetResultsOnServer)voidsetClientParam(long clientParam)voidsetDefaultTimeZone(TimeZone defaultTimeZone)voidsetErrorMessageEncoding(String errorMessageEncoding)voidsetHasLongColumnInfo(boolean hasLongColumnInfo)Does the server send back extra column info?voidsetMetadataCollationIndex(int metadataCollationIndex)voidsetOldStatusFlags(int oldStatusFlags)voidsetServerDefaultCollationIndex(int serverDefaultCollationIndex)Stores collation index which server provided in handshake greeting packet.voidsetServerTimeZone(TimeZone serverTimeZone)voidsetServerVariables(Map<String,String> serverVariables)voidsetStatusFlags(int statusFlags)Sets new server status (from response) without saving it's old statevoidsetStatusFlags(int statusFlags, boolean saveOldStatus)Sets new server status (from response)voidsetThreadId(long threadId)booleanstoresLowerCaseTableNames()booleanuseAnsiQuotedIdentifiers()booleanuseMultiResults()
-
-
-
字段详细资料
-
SERVER_STATUS_IN_TRANS
public static final int SERVER_STATUS_IN_TRANS
- 另请参阅:
- 常量字段值
-
SERVER_STATUS_AUTOCOMMIT
public static final int SERVER_STATUS_AUTOCOMMIT
- 另请参阅:
- 常量字段值
-
SERVER_MORE_RESULTS_EXISTS
public static final int SERVER_MORE_RESULTS_EXISTS
- 另请参阅:
- 常量字段值
-
SERVER_QUERY_NO_GOOD_INDEX_USED
public static final int SERVER_QUERY_NO_GOOD_INDEX_USED
- 另请参阅:
- 常量字段值
-
SERVER_QUERY_NO_INDEX_USED
public static final int SERVER_QUERY_NO_INDEX_USED
- 另请参阅:
- 常量字段值
-
SERVER_STATUS_CURSOR_EXISTS
public static final int SERVER_STATUS_CURSOR_EXISTS
- 另请参阅:
- 常量字段值
-
SERVER_STATUS_LAST_ROW_SENT
public static final int SERVER_STATUS_LAST_ROW_SENT
- 另请参阅:
- 常量字段值
-
SERVER_QUERY_WAS_SLOW
public static final int SERVER_QUERY_WAS_SLOW
- 另请参阅:
- 常量字段值
-
CLIENT_LONG_PASSWORD
public static final int CLIENT_LONG_PASSWORD
- 另请参阅:
- 常量字段值
-
CLIENT_FOUND_ROWS
public static final int CLIENT_FOUND_ROWS
- 另请参阅:
- 常量字段值
-
CLIENT_LONG_FLAG
public static final int CLIENT_LONG_FLAG
- 另请参阅:
- 常量字段值
-
CLIENT_CONNECT_WITH_DB
public static final int CLIENT_CONNECT_WITH_DB
- 另请参阅:
- 常量字段值
-
CLIENT_COMPRESS
public static final int CLIENT_COMPRESS
- 另请参阅:
- 常量字段值
-
CLIENT_LOCAL_FILES
public static final int CLIENT_LOCAL_FILES
- 另请参阅:
- 常量字段值
-
CLIENT_PROTOCOL_41
public static final int CLIENT_PROTOCOL_41
- 另请参阅:
- 常量字段值
-
CLIENT_INTERACTIVE
public static final int CLIENT_INTERACTIVE
- 另请参阅:
- 常量字段值
-
CLIENT_SSL
public static final int CLIENT_SSL
- 另请参阅:
- 常量字段值
-
CLIENT_TRANSACTIONS
public static final int CLIENT_TRANSACTIONS
- 另请参阅:
- 常量字段值
-
CLIENT_RESERVED
public static final int CLIENT_RESERVED
- 另请参阅:
- 常量字段值
-
CLIENT_SECURE_CONNECTION
public static final int CLIENT_SECURE_CONNECTION
- 另请参阅:
- 常量字段值
-
CLIENT_MULTI_STATEMENTS
public static final int CLIENT_MULTI_STATEMENTS
- 另请参阅:
- 常量字段值
-
CLIENT_MULTI_RESULTS
public static final int CLIENT_MULTI_RESULTS
- 另请参阅:
- 常量字段值
-
CLIENT_PS_MULTI_RESULTS
public static final int CLIENT_PS_MULTI_RESULTS
- 另请参阅:
- 常量字段值
-
CLIENT_PLUGIN_AUTH
public static final int CLIENT_PLUGIN_AUTH
- 另请参阅:
- 常量字段值
-
CLIENT_CONNECT_ATTRS
public static final int CLIENT_CONNECT_ATTRS
- 另请参阅:
- 常量字段值
-
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
public static final int CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
- 另请参阅:
- 常量字段值
-
CLIENT_CAN_HANDLE_EXPIRED_PASSWORD
public static final int CLIENT_CAN_HANDLE_EXPIRED_PASSWORD
- 另请参阅:
- 常量字段值
-
CLIENT_SESSION_TRACK
public static final int CLIENT_SESSION_TRACK
- 另请参阅:
- 常量字段值
-
CLIENT_DEPRECATE_EOF
public static final int CLIENT_DEPRECATE_EOF
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
NativeServerSession
public NativeServerSession(PropertySet propertySet)
-
-
方法详细资料
-
getCapabilities
public NativeCapabilities getCapabilities()
- 指定者:
getCapabilities在接口中ServerSession
-
setCapabilities
public void setCapabilities(ServerCapabilities capabilities)
- 指定者:
setCapabilities在接口中ServerSession
-
getStatusFlags
public int getStatusFlags()
- 指定者:
getStatusFlags在接口中ServerSession
-
setStatusFlags
public void setStatusFlags(int statusFlags)
从接口复制的说明:ServerSessionSets new server status (from response) without saving it's old state- 指定者:
setStatusFlags在接口中ServerSession- 参数:
statusFlags- server status flags
-
setStatusFlags
public void setStatusFlags(int statusFlags, boolean saveOldStatus)从接口复制的说明:ServerSessionSets new server status (from response)- 指定者:
setStatusFlags在接口中ServerSession- 参数:
statusFlags- new server status flagssaveOldStatus- true if old server status flags should be preserved
-
getOldStatusFlags
public int getOldStatusFlags()
- 指定者:
getOldStatusFlags在接口中ServerSession
-
setOldStatusFlags
public void setOldStatusFlags(int oldStatusFlags)
- 指定者:
setOldStatusFlags在接口中ServerSession
-
getTransactionState
public int getTransactionState()
- 指定者:
getTransactionState在接口中ServerSession- 返回:
- TRANSACTION_NOT_STARTED, TRANSACTION_IN_PROGRESS, TRANSACTION_STARTED or TRANSACTION_COMPLETED
-
inTransactionOnServer
public boolean inTransactionOnServer()
- 指定者:
inTransactionOnServer在接口中ServerSession
-
cursorExists
public boolean cursorExists()
从接口复制的说明:ServerSessionServer will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.- 指定者:
cursorExists在接口中ServerSession- 返回:
- SERVER_STATUS_CURSOR_EXISTS status flag value.
-
isAutocommit
public boolean isAutocommit()
- 指定者:
isAutocommit在接口中ServerSession
-
hasMoreResults
public boolean hasMoreResults()
- 指定者:
hasMoreResults在接口中ServerSession
-
noGoodIndexUsed
public boolean noGoodIndexUsed()
- 指定者:
noGoodIndexUsed在接口中ServerSession
-
noIndexUsed
public boolean noIndexUsed()
- 指定者:
noIndexUsed在接口中ServerSession
-
queryWasSlow
public boolean queryWasSlow()
- 指定者:
queryWasSlow在接口中ServerSession
-
isLastRowSent
public boolean isLastRowSent()
- 指定者:
isLastRowSent在接口中ServerSession
-
getClientParam
public long getClientParam()
- 指定者:
getClientParam在接口中ServerSession
-
setClientParam
public void setClientParam(long clientParam)
- 指定者:
setClientParam在接口中ServerSession
-
useMultiResults
public boolean useMultiResults()
- 指定者:
useMultiResults在接口中ServerSession
-
isEOFDeprecated
public boolean isEOFDeprecated()
- 指定者:
isEOFDeprecated在接口中ServerSession
-
getServerDefaultCollationIndex
public int getServerDefaultCollationIndex()
- 指定者:
getServerDefaultCollationIndex在接口中ServerSession- 返回:
- Collation index which server provided in handshake greeting packet
-
setServerDefaultCollationIndex
public void setServerDefaultCollationIndex(int serverDefaultCollationIndex)
从接口复制的说明:ServerSessionStores collation index which server provided in handshake greeting packet.- 指定者:
setServerDefaultCollationIndex在接口中ServerSession- 参数:
serverDefaultCollationIndex- collation index
-
hasLongColumnInfo
public boolean hasLongColumnInfo()
- 指定者:
hasLongColumnInfo在接口中ServerSession
-
setHasLongColumnInfo
public void setHasLongColumnInfo(boolean hasLongColumnInfo)
从接口复制的说明:ServerSessionDoes the server send back extra column info?- 指定者:
setHasLongColumnInfo在接口中ServerSession- 参数:
hasLongColumnInfo- flag
-
getServerVariables
public Map<String,String> getServerVariables()
- 指定者:
getServerVariables在接口中ServerSession
-
getServerVariable
public String getServerVariable(String name)
- 指定者:
getServerVariable在接口中ServerSession
-
getServerVariable
public int getServerVariable(String variableName, int fallbackValue)
- 指定者:
getServerVariable在接口中ServerSession
-
setServerVariables
public void setServerVariables(Map<String,String> serverVariables)
- 指定者:
setServerVariables在接口中ServerSession
-
characterSetNamesMatches
public boolean characterSetNamesMatches(String mysqlEncodingName)
- 指定者:
characterSetNamesMatches在接口中ServerSession
-
getServerVersion
public final ServerVersion getServerVersion()
从接口复制的说明:ServerSessionGet the version of the MySQL server we are talking to.- 指定者:
getServerVersion在接口中ServerSession- 返回:
ServerVersion
-
isVersion
public boolean isVersion(ServerVersion version)
从接口复制的说明:ServerSessionIs the version of the MySQL server we are connected to the given version?- 指定者:
isVersion在接口中ServerSession- 参数:
version- the version to check for- 返回:
- true if the version of the MySQL server we are connected is the given version
-
isSetNeededForAutoCommitMode
public boolean isSetNeededForAutoCommitMode(boolean autoCommitFlag, boolean elideSetAutoCommitsFlag)Should SET AUTOCOMMIT be sent to server if we are going to set autoCommitFlag in driver- 参数:
autoCommitFlag- autocommit status we are going to set in driverelideSetAutoCommitsFlag- 'elideSetAutoCommits' property value- 返回:
- true if SET AUTOCOMMIT to be sent
-
getErrorMessageEncoding
public String getErrorMessageEncoding()
- 指定者:
getErrorMessageEncoding在接口中ServerSession
-
setErrorMessageEncoding
public void setErrorMessageEncoding(String errorMessageEncoding)
- 指定者:
setErrorMessageEncoding在接口中ServerSession
-
getServerDefaultCharset
public String getServerDefaultCharset()
- 指定者:
getServerDefaultCharset在接口中ServerSession- 返回:
- the server's default character set name according to collation index from server greeting, or value of 'character_set_server' variable if there is no mapping for that index
-
getMaxBytesPerChar
public int getMaxBytesPerChar(String javaCharsetName)
- 指定者:
getMaxBytesPerChar在接口中ServerSession
-
getMaxBytesPerChar
public int getMaxBytesPerChar(Integer charsetIndex, String javaCharsetName)
- 指定者:
getMaxBytesPerChar在接口中ServerSession
-
getEncodingForIndex
public String getEncodingForIndex(int charsetIndex)
从接口复制的说明:ServerSessionReturns the Java character encoding name for the given MySQL server collation index- 指定者:
getEncodingForIndex在接口中ServerSession- 参数:
charsetIndex- collation index- 返回:
- the Java character encoding name for the given MySQL server collation index
-
configureCharacterSets
public void configureCharacterSets()
- 指定者:
configureCharacterSets在接口中ServerSession
-
getCharacterSetMetadata
public String getCharacterSetMetadata()
- 指定者:
getCharacterSetMetadata在接口中ServerSession
-
setCharacterSetMetadata
public void setCharacterSetMetadata(String characterSetMetadata)
- 指定者:
setCharacterSetMetadata在接口中ServerSession
-
getMetadataCollationIndex
public int getMetadataCollationIndex()
- 指定者:
getMetadataCollationIndex在接口中ServerSession
-
setMetadataCollationIndex
public void setMetadataCollationIndex(int metadataCollationIndex)
- 指定者:
setMetadataCollationIndex在接口中ServerSession
-
getCharacterSetResultsOnServer
public String getCharacterSetResultsOnServer()
- 指定者:
getCharacterSetResultsOnServer在接口中ServerSession
-
setCharacterSetResultsOnServer
public void setCharacterSetResultsOnServer(String characterSetResultsOnServer)
- 指定者:
setCharacterSetResultsOnServer在接口中ServerSession
-
preserveOldTransactionState
public void preserveOldTransactionState()
-
isLowerCaseTableNames
public boolean isLowerCaseTableNames()
从接口复制的说明:ServerSessionIs the server configured to use lower-case table names only?- 指定者:
isLowerCaseTableNames在接口中ServerSession- 返回:
- true if lower_case_table_names is 'on'
-
storesLowerCaseTableNames
public boolean storesLowerCaseTableNames()
- 指定者:
storesLowerCaseTableNames在接口中ServerSession
-
isQueryCacheEnabled
public boolean isQueryCacheEnabled()
- 指定者:
isQueryCacheEnabled在接口中ServerSession
-
isNoBackslashEscapesSet
public boolean isNoBackslashEscapesSet()
Is the server in a sql_mode that does not allow us to use \\ to escape things?- 指定者:
isNoBackslashEscapesSet在接口中ServerSession- 返回:
- Returns the noBackslashEscapes.
-
useAnsiQuotedIdentifiers
public boolean useAnsiQuotedIdentifiers()
- 指定者:
useAnsiQuotedIdentifiers在接口中ServerSession
-
isServerTruncatesFracSecs
public boolean isServerTruncatesFracSecs()
- 指定者:
isServerTruncatesFracSecs在接口中ServerSession
-
getThreadId
public long getThreadId()
- 指定者:
getThreadId在接口中ServerSession
-
setThreadId
public void setThreadId(long threadId)
- 指定者:
setThreadId在接口中ServerSession
-
isAutoCommit
public boolean isAutoCommit()
- 指定者:
isAutoCommit在接口中ServerSession
-
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- 指定者:
setAutoCommit在接口中ServerSession
-
getServerTimeZone
public TimeZone getServerTimeZone()
- 指定者:
getServerTimeZone在接口中ServerSession
-
setServerTimeZone
public void setServerTimeZone(TimeZone serverTimeZone)
- 指定者:
setServerTimeZone在接口中ServerSession
-
getDefaultTimeZone
public TimeZone getDefaultTimeZone()
从接口复制的说明:ServerSessionThe default time zone used to marshall date/time values to/from the server. This is used when getDate(), etc methods are called without a calendar argument.- 指定者:
getDefaultTimeZone在接口中ServerSession- 返回:
- The server time zone (which may be user overridden in a connection property)
-
setDefaultTimeZone
public void setDefaultTimeZone(TimeZone defaultTimeZone)
- 指定者:
setDefaultTimeZone在接口中ServerSession
-
-