类 NativeServerSession
- java.lang.Object
-
- com.mysql.cj.protocol.a.NativeServerSession
-
- 所有已实现的接口:
ServerSession
public class NativeServerSession extends Object implements ServerSession
-
-
字段概要
-
从接口继承的字段 com.mysql.cj.protocol.ServerSession
TRANSACTION_COMPLETED, TRANSACTION_IN_PROGRESS, TRANSACTION_NOT_STARTED, TRANSACTION_STARTED
-
-
构造器概要
构造器 构造器 说明 NativeServerSession(PropertySet propertySet)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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()CharsetSettingsgetCharsetSettings()longgetClientParam()TimeZonegetDefaultTimeZone()The default time zone used to marshal date/time values to/from the server.intgetOldStatusFlags()ServerSessionStateControllergetServerSessionStateController()StringgetServerVariable(String name)intgetServerVariable(String variableName, int fallbackValue)Map<String,String>getServerVariables()ServerVersiongetServerVersion()Get the version of the MySQL server we are talking to.TimeZonegetSessionTimeZone()intgetStatusFlags()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)voidsetCharsetSettings(CharsetSettings charsetSettings)voidsetClientParam(long clientParam)voidsetOldStatusFlags(int oldStatusFlags)voidsetServerVariables(Map<String,String> serverVariables)voidsetSessionTimeZone(TimeZone sessionTimeZone)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)booleanstoresLowerCaseTableNames()booleansupportsQueryAttributes()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
- 另请参阅:
- 常量字段值
-
SERVER_SESSION_STATE_CHANGED
public static final int SERVER_SESSION_STATE_CHANGED
- 另请参阅:
- 常量字段值
-
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
- 另请参阅:
- 常量字段值
-
CLIENT_QUERY_ATTRIBUTES
public static final int CLIENT_QUERY_ATTRIBUTES
- 另请参阅:
- 常量字段值
-
CLIENT_MULTI_FACTOR_AUTHENTICATION
public static final int CLIENT_MULTI_FACTOR_AUTHENTICATION
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
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
-
hasLongColumnInfo
public boolean hasLongColumnInfo()
- 指定者:
hasLongColumnInfo在接口中ServerSession
-
useMultiResults
public boolean useMultiResults()
- 指定者:
useMultiResults在接口中ServerSession
-
isEOFDeprecated
public boolean isEOFDeprecated()
- 指定者:
isEOFDeprecated在接口中ServerSession
-
supportsQueryAttributes
public boolean supportsQueryAttributes()
- 指定者:
supportsQueryAttributes在接口中ServerSession
-
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
-
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
-
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
-
isAutoCommit
public boolean isAutoCommit()
- 指定者:
isAutoCommit在接口中ServerSession
-
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- 指定者:
setAutoCommit在接口中ServerSession
-
getSessionTimeZone
public TimeZone getSessionTimeZone()
- 指定者:
getSessionTimeZone在接口中ServerSession
-
setSessionTimeZone
public void setSessionTimeZone(TimeZone sessionTimeZone)
- 指定者:
setSessionTimeZone在接口中ServerSession
-
getDefaultTimeZone
public TimeZone getDefaultTimeZone()
从接口复制的说明:ServerSessionThe default time zone used to marshal date/time values to/from the server. This is used when methods like getDate() are called without a calendar argument.- 指定者:
getDefaultTimeZone在接口中ServerSession- 返回:
- The default JVM time zone
-
getServerSessionStateController
public ServerSessionStateController getServerSessionStateController()
- 指定者:
getServerSessionStateController在接口中ServerSession
-
getCharsetSettings
public CharsetSettings getCharsetSettings()
- 指定者:
getCharsetSettings在接口中ServerSession
-
setCharsetSettings
public void setCharsetSettings(CharsetSettings charsetSettings)
- 指定者:
setCharsetSettings在接口中ServerSession
-
-