Top Fields Constructors Methods
com.mysql.cj.protocol.a

public Class NativeServerSession

extends Object
implements ServerSession
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.ServerSession
Imports
java.util.HashMap, .Map, .TimeZone, com.mysql.cj.CharsetSettings, .ServerVersion, com.mysql.cj.conf.PropertyKey, .PropertySet, .RuntimeProperty, com.mysql.cj.exceptions.ExceptionFactory, .WrongArgumentException, com.mysql.cj.protocol.ServerCapabilities, .ServerSession, .ServerSessionStateController, com.mysql.cj.util.TimeUtil

Field Summary

Modifier and TypeField and Description
private boolean
autoCommit

Are we in autoCommit mode?

private RuntimeProperty<Boolean>
private NativeCapabilities
private CharsetSettings
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private long
private TimeZone
private int
private PropertySet
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private NativeServerSessionStateController
private Map<String, String>
serverVariables

The map of server variables that we retrieve at connection init.

private TimeZone
sessionTimeZone

The timezone of the server

private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
cursorExists()

Implements com.mysql.cj.protocol.ServerSession.cursorExists.

Server will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.

public NativeCapabilities
public CharsetSettings
public long
public TimeZone
getDefaultTimeZone()

Implements com.mysql.cj.protocol.ServerSession.getDefaultTimeZone.

The default time zone used to marshal date/time values to/from the server.

public ServerSessionStateController
public String
public int
public Map<String, String>
public final ServerVersion
getServerVersion()

Implements com.mysql.cj.protocol.ServerSession.getServerVersion.

Get the version of the MySQL server we are talking to.

public TimeZone
public int
public int
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isLowerCaseTableNames()

Implements com.mysql.cj.protocol.ServerSession.isLowerCaseTableNames.

Is the server configured to use lower-case table names only?

public boolean

Returns:

Returns the noBackslashEscapes.
isNoBackslashEscapesSet
()

Implements com.mysql.cj.protocol.ServerSession.isNoBackslashEscapesSet.

Is the server in a sql_mode that does not allow us to use \\ to escape things?

public boolean
public boolean
public boolean
public boolean

Returns:

true if SET AUTOCOMMIT to be sent
isSetNeededForAutoCommitMode
(boolean
autocommit status we are going to set in driver
autoCommitFlag
,
boolean
'elideSetAutoCommits' property value
elideSetAutoCommitsFlag
)

Should SET AUTOCOMMIT be sent to server if we are going to set autoCommitFlag in driver

public boolean
isVersion(ServerVersion
the version to check for
version
)

Implements com.mysql.cj.protocol.ServerSession.isVersion.

Is the version of the MySQL server we are connected to the given version?

public boolean
public boolean
public void
public boolean
public void
public void
public void
public void
public void
public void
public void
setStatusFlags(int
server status flags
statusFlags
)

Implements com.mysql.cj.protocol.ServerSession.setStatusFlags.

Sets new server status (from response) without saving it's old state

public void
setStatusFlags(int
new server status flags
statusFlags
,
boolean
true if old server status flags should be preserved
saveOldStatus
)

Implements com.mysql.cj.protocol.ServerSession.setStatusFlags.

Sets new server status (from response)

public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

autoCommitback to summary
private boolean autoCommit

Are we in autoCommit mode?

cacheDefaultTimeZoneback to summary
private RuntimeProperty<Boolean> cacheDefaultTimeZone
capabilitiesback to summary
private NativeCapabilities capabilities
charsetSettingsback to summary
private CharsetSettings charsetSettings
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDback to summary
public static final int CLIENT_CAN_HANDLE_EXPIRED_PASSWORD
CLIENT_COMPRESSback to summary
public static final int CLIENT_COMPRESS
CLIENT_CONNECT_ATTRSback to summary
public static final int CLIENT_CONNECT_ATTRS
CLIENT_CONNECT_WITH_DBback to summary
public static final int CLIENT_CONNECT_WITH_DB
CLIENT_DEPRECATE_EOFback to summary
public static final int CLIENT_DEPRECATE_EOF
CLIENT_FOUND_ROWSback to summary
public static final int CLIENT_FOUND_ROWS
CLIENT_INTERACTIVEback to summary
public static final int CLIENT_INTERACTIVE
CLIENT_LOCAL_FILESback to summary
public static final int CLIENT_LOCAL_FILES
CLIENT_LONG_FLAGback to summary
public static final int CLIENT_LONG_FLAG
CLIENT_LONG_PASSWORDback to summary
public static final int CLIENT_LONG_PASSWORD
CLIENT_MULTI_FACTOR_AUTHENTICATIONback to summary
public static final int CLIENT_MULTI_FACTOR_AUTHENTICATION
CLIENT_MULTI_RESULTSback to summary
public static final int CLIENT_MULTI_RESULTS
CLIENT_MULTI_STATEMENTSback to summary
public static final int CLIENT_MULTI_STATEMENTS
CLIENT_PLUGIN_AUTHback to summary
public static final int CLIENT_PLUGIN_AUTH
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATAback to summary
public static final int CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA
CLIENT_PROTOCOL_41back to summary
public static final int CLIENT_PROTOCOL_41
CLIENT_PS_MULTI_RESULTSback to summary
public static final int CLIENT_PS_MULTI_RESULTS
CLIENT_QUERY_ATTRIBUTESback to summary
public static final int CLIENT_QUERY_ATTRIBUTES
CLIENT_RESERVEDback to summary
public static final int CLIENT_RESERVED
CLIENT_SECURE_CONNECTIONback to summary
public static final int CLIENT_SECURE_CONNECTION
CLIENT_SESSION_TRACKback to summary
public static final int CLIENT_SESSION_TRACK
CLIENT_SSLback to summary
public static final int CLIENT_SSL
CLIENT_TRANSACTIONSback to summary
public static final int CLIENT_TRANSACTIONS
clientParamback to summary
private long clientParam
defaultTimeZoneback to summary
private TimeZone defaultTimeZone
oldStatusFlagsback to summary
private int oldStatusFlags
propertySetback to summary
private PropertySet propertySet
SERVER_MORE_RESULTS_EXISTSback to summary
public static final int SERVER_MORE_RESULTS_EXISTS
SERVER_QUERY_NO_GOOD_INDEX_USEDback to summary
public static final int SERVER_QUERY_NO_GOOD_INDEX_USED
SERVER_QUERY_NO_INDEX_USEDback to summary
public static final int SERVER_QUERY_NO_INDEX_USED
SERVER_QUERY_WAS_SLOWback to summary
public static final int SERVER_QUERY_WAS_SLOW
SERVER_SESSION_STATE_CHANGEDback to summary
public static final int SERVER_SESSION_STATE_CHANGED
SERVER_STATUS_AUTOCOMMITback to summary
public static final int SERVER_STATUS_AUTOCOMMIT
SERVER_STATUS_CURSOR_EXISTSback to summary
public static final int SERVER_STATUS_CURSOR_EXISTS
SERVER_STATUS_IN_TRANSback to summary
public static final int SERVER_STATUS_IN_TRANS
SERVER_STATUS_LAST_ROW_SENTback to summary
public static final int SERVER_STATUS_LAST_ROW_SENT
serverSessionStateControllerback to summary
private NativeServerSessionStateController serverSessionStateController
serverVariablesback to summary
private Map<String, String> serverVariables

The map of server variables that we retrieve at connection init.

sessionTimeZoneback to summary
private TimeZone sessionTimeZone

The timezone of the server

statusFlagsback to summary
private int statusFlags

Constructor Detail

NativeServerSessionback to summary
public NativeServerSession(PropertySet propertySet)

Method Detail

cursorExistsback to summary
public boolean cursorExists()

Implements com.mysql.cj.protocol.ServerSession.cursorExists.

Doc from com.mysql.cj.protocol.ServerSession.cursorExists.

Server will only open a cursor and set this flag if it can, otherwise it punts and goes back to mysql_store_results() behavior.

Returns:boolean

SERVER_STATUS_CURSOR_EXISTS status flag value.

Annotations
@Override
getCapabilitiesback to summary
public NativeCapabilities getCapabilities()

Implements com.mysql.cj.protocol.ServerSession.getCapabilities.

Annotations
@Override
getCharsetSettingsback to summary
public CharsetSettings getCharsetSettings()

Implements com.mysql.cj.protocol.ServerSession.getCharsetSettings.

Annotations
@Override
getClientParamback to summary
public long getClientParam()

Implements com.mysql.cj.protocol.ServerSession.getClientParam.

Annotations
@Override
getDefaultTimeZoneback to summary
public TimeZone getDefaultTimeZone()

Implements com.mysql.cj.protocol.ServerSession.getDefaultTimeZone.

Doc from com.mysql.cj.protocol.ServerSession.getDefaultTimeZone.

The 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.

Returns:TimeZone

The default JVM time zone

Annotations
@Override
getServerSessionStateControllerback to summary
public ServerSessionStateController getServerSessionStateController()

Overrides default com.mysql.cj.protocol.ServerSession.getServerSessionStateController.

Annotations
@Override
getServerVariableback to summary
public String getServerVariable(String name)

Implements com.mysql.cj.protocol.ServerSession.getServerVariable.

Annotations
@Override
getServerVariableback to summary
public int getServerVariable(String variableName, int fallbackValue)

Implements com.mysql.cj.protocol.ServerSession.getServerVariable.

Annotations
@Override
getServerVariablesback to summary
public Map<String, String> getServerVariables()

Implements com.mysql.cj.protocol.ServerSession.getServerVariables.

Annotations
@Override
getServerVersionback to summary
public final ServerVersion getServerVersion()

Implements com.mysql.cj.protocol.ServerSession.getServerVersion.

Doc from com.mysql.cj.protocol.ServerSession.getServerVersion.

Get the version of the MySQL server we are talking to.

Returns:ServerVersion

ServerVersion

Annotations
@Override
getSessionTimeZoneback to summary
public TimeZone getSessionTimeZone()

Implements com.mysql.cj.protocol.ServerSession.getSessionTimeZone.

Annotations
@Override
getStatusFlagsback to summary
public int getStatusFlags()

Implements com.mysql.cj.protocol.ServerSession.getStatusFlags.

Annotations
@Override
getTransactionStateback to summary
public int getTransactionState()

Implements com.mysql.cj.protocol.ServerSession.getTransactionState.

Returns:int

Doc from com.mysql.cj.protocol.ServerSession.getTransactionState.

TRANSACTION_NOT_STARTED, TRANSACTION_IN_PROGRESS, TRANSACTION_STARTED or TRANSACTION_COMPLETED

Annotations
@Override
hasLongColumnInfoback to summary
public boolean hasLongColumnInfo()

Implements com.mysql.cj.protocol.ServerSession.hasLongColumnInfo.

Annotations
@Override
hasMoreResultsback to summary
public boolean hasMoreResults()

Implements com.mysql.cj.protocol.ServerSession.hasMoreResults.

Annotations
@Override
inTransactionOnServerback to summary
public boolean inTransactionOnServer()

Implements com.mysql.cj.protocol.ServerSession.inTransactionOnServer.

Annotations
@Override
isAutocommitback to summary
public boolean isAutocommit()

Implements com.mysql.cj.protocol.ServerSession.isAutocommit.

Annotations
@Override
isAutoCommitback to summary
public boolean isAutoCommit()

Implements com.mysql.cj.protocol.ServerSession.isAutoCommit.

Annotations
@Override
isEOFDeprecatedback to summary
public boolean isEOFDeprecated()

Implements com.mysql.cj.protocol.ServerSession.isEOFDeprecated.

Annotations
@Override
isLastRowSentback to summary
public boolean isLastRowSent()

Implements com.mysql.cj.protocol.ServerSession.isLastRowSent.

Annotations
@Override
isLowerCaseTableNamesback to summary
public boolean isLowerCaseTableNames()

Implements com.mysql.cj.protocol.ServerSession.isLowerCaseTableNames.

Doc from com.mysql.cj.protocol.ServerSession.isLowerCaseTableNames.

Is the server configured to use lower-case table names only?

Returns:boolean

true if lower_case_table_names is 'on'

Annotations
@Override
isNoBackslashEscapesSetback to summary
public boolean isNoBackslashEscapesSet()

Implements com.mysql.cj.protocol.ServerSession.isNoBackslashEscapesSet.

Is the server in a sql_mode that does not allow us to use \\ to escape things?

Returns:boolean

Returns the noBackslashEscapes.

Annotations
@Override
isQueryCacheEnabledback to summary
public boolean isQueryCacheEnabled()

Implements com.mysql.cj.protocol.ServerSession.isQueryCacheEnabled.

Annotations
@Override
isServerTruncatesFracSecsback to summary
public boolean isServerTruncatesFracSecs()

Implements com.mysql.cj.protocol.ServerSession.isServerTruncatesFracSecs.

Annotations
@Override
isSessionStateTrackingEnabledback to summary
public boolean isSessionStateTrackingEnabled()

Implements com.mysql.cj.protocol.ServerSession.isSessionStateTrackingEnabled.

Annotations
@Override
isSetNeededForAutoCommitModeback to summary
public boolean isSetNeededForAutoCommitMode(boolean autoCommitFlag, boolean elideSetAutoCommitsFlag)

Should SET AUTOCOMMIT be sent to server if we are going to set autoCommitFlag in driver

Parameters
autoCommitFlag:boolean

autocommit status we are going to set in driver

elideSetAutoCommitsFlag:boolean

'elideSetAutoCommits' property value

Returns:boolean

true if SET AUTOCOMMIT to be sent

isVersionback to summary
public boolean isVersion(ServerVersion version)

Implements com.mysql.cj.protocol.ServerSession.isVersion.

Doc from com.mysql.cj.protocol.ServerSession.isVersion.

Is the version of the MySQL server we are connected to the given version?

Parameters
version:ServerVersion

the version to check for

Returns:boolean

true if the version of the MySQL server we are connected is the given version

Annotations
@Override
noGoodIndexUsedback to summary
public boolean noGoodIndexUsed()

Implements com.mysql.cj.protocol.ServerSession.noGoodIndexUsed.

Annotations
@Override
noIndexUsedback to summary
public boolean noIndexUsed()

Implements com.mysql.cj.protocol.ServerSession.noIndexUsed.

Annotations
@Override
preserveOldTransactionStateback to summary
public void preserveOldTransactionState()
queryWasSlowback to summary
public boolean queryWasSlow()

Implements com.mysql.cj.protocol.ServerSession.queryWasSlow.

Annotations
@Override
setAutoCommitback to summary
public void setAutoCommit(boolean autoCommit)

Implements com.mysql.cj.protocol.ServerSession.setAutoCommit.

Annotations
@Override
setCapabilitiesback to summary
public void setCapabilities(ServerCapabilities capabilities)

Implements com.mysql.cj.protocol.ServerSession.setCapabilities.

Annotations
@Override
setCharsetSettingsback to summary
public void setCharsetSettings(CharsetSettings charsetSettings)

Implements com.mysql.cj.protocol.ServerSession.setCharsetSettings.

Annotations
@Override
setClientParamback to summary
public void setClientParam(long clientParam)

Implements com.mysql.cj.protocol.ServerSession.setClientParam.

Annotations
@Override
setServerVariablesback to summary
public void setServerVariables(Map<String, String> serverVariables)

Implements com.mysql.cj.protocol.ServerSession.setServerVariables.

Annotations
@Override
setSessionTimeZoneback to summary
public void setSessionTimeZone(TimeZone sessionTimeZone)

Implements com.mysql.cj.protocol.ServerSession.setSessionTimeZone.

Annotations
@Override
setStatusFlagsback to summary
public void setStatusFlags(int statusFlags)

Implements com.mysql.cj.protocol.ServerSession.setStatusFlags.

Doc from com.mysql.cj.protocol.ServerSession.setStatusFlags.

Sets new server status (from response) without saving it's old state

Parameters
statusFlags:int

server status flags

Annotations
@Override
setStatusFlagsback to summary
public void setStatusFlags(int statusFlags, boolean saveOldStatus)

Implements com.mysql.cj.protocol.ServerSession.setStatusFlags.

Doc from com.mysql.cj.protocol.ServerSession.setStatusFlags.

Sets new server status (from response)

Parameters
statusFlags:int

new server status flags

saveOldStatus:boolean

true if old server status flags should be preserved

Annotations
@Override
storesLowerCaseTableNamesback to summary
public boolean storesLowerCaseTableNames()

Implements com.mysql.cj.protocol.ServerSession.storesLowerCaseTableNames.

Annotations
@Override
supportsQueryAttributesback to summary
public boolean supportsQueryAttributes()

Implements com.mysql.cj.protocol.ServerSession.supportsQueryAttributes.

Annotations
@Override
useAnsiQuotedIdentifiersback to summary
public boolean useAnsiQuotedIdentifiers()

Implements com.mysql.cj.protocol.ServerSession.useAnsiQuotedIdentifiers.

Annotations
@Override
useMultiResultsback to summary
public boolean useMultiResults()

Implements com.mysql.cj.protocol.ServerSession.useMultiResults.

Annotations
@Override