接口 ServerSession

  • 所有已知实现类:
    NativeServerSession, XServerSession

    public interface ServerSession
    Keeps the effective states of server/session variables, contains methods for initial retrieving of these states and for their actualization.
    • 字段详细资料

      • TRANSACTION_NOT_STARTED

        static final int TRANSACTION_NOT_STARTED
        There was no change between old and current SERVER_STATUS_IN_TRANS state and it is 0.
        另请参阅:
        常量字段值
      • TRANSACTION_IN_PROGRESS

        static final int TRANSACTION_IN_PROGRESS
        There was no change between old and current SERVER_STATUS_IN_TRANS state and it is 1.
        另请参阅:
        常量字段值
      • TRANSACTION_STARTED

        static final int TRANSACTION_STARTED
        Old SERVER_STATUS_IN_TRANS state was 0 and current one is 1.
        另请参阅:
        常量字段值
      • TRANSACTION_COMPLETED

        static final int TRANSACTION_COMPLETED
        Old SERVER_STATUS_IN_TRANS state was 1 and current one is 0.
        另请参阅:
        常量字段值
    • 方法详细资料

      • getStatusFlags

        int getStatusFlags()
      • setStatusFlags

        void setStatusFlags​(int statusFlags)
        Sets new server status (from response) without saving it's old state
        参数:
        statusFlags - server status flags
      • setStatusFlags

        void setStatusFlags​(int statusFlags,
                            boolean saveOldStatusFlags)
        Sets new server status (from response)
        参数:
        statusFlags - new server status flags
        saveOldStatusFlags - true if old server status flags should be preserved
      • getOldStatusFlags

        int getOldStatusFlags()
      • setOldStatusFlags

        void setOldStatusFlags​(int statusFlags)
      • getTransactionState

        int getTransactionState()
        返回:
        TRANSACTION_NOT_STARTED, TRANSACTION_IN_PROGRESS, TRANSACTION_STARTED or TRANSACTION_COMPLETED
      • inTransactionOnServer

        boolean inTransactionOnServer()
      • cursorExists

        boolean 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.
        返回:
        SERVER_STATUS_CURSOR_EXISTS status flag value.
      • isAutocommit

        boolean isAutocommit()
      • hasMoreResults

        boolean hasMoreResults()
      • isLastRowSent

        boolean isLastRowSent()
      • noGoodIndexUsed

        boolean noGoodIndexUsed()
      • noIndexUsed

        boolean noIndexUsed()
      • queryWasSlow

        boolean queryWasSlow()
      • getClientParam

        long getClientParam()
      • setClientParam

        void setClientParam​(long clientParam)
      • hasLongColumnInfo

        boolean hasLongColumnInfo()
      • useMultiResults

        boolean useMultiResults()
      • isEOFDeprecated

        boolean isEOFDeprecated()
      • supportsQueryAttributes

        boolean supportsQueryAttributes()
      • getServerVariable

        String getServerVariable​(String name)
      • getServerVariable

        int getServerVariable​(String variableName,
                              int fallbackValue)
      • setServerVariables

        void setServerVariables​(Map<String,​String> serverVariables)
      • isVersion

        boolean isVersion​(ServerVersion version)
        Is the version of the MySQL server we are connected to the given version?
        参数:
        version - the version to check for
        返回:
        true if the version of the MySQL server we are connected is the given version
      • isLowerCaseTableNames

        boolean isLowerCaseTableNames()
        Is the server configured to use lower-case table names only?
        返回:
        true if lower_case_table_names is 'on'
      • storesLowerCaseTableNames

        boolean storesLowerCaseTableNames()
      • isQueryCacheEnabled

        boolean isQueryCacheEnabled()
      • isNoBackslashEscapesSet

        boolean isNoBackslashEscapesSet()
      • useAnsiQuotedIdentifiers

        boolean useAnsiQuotedIdentifiers()
      • isServerTruncatesFracSecs

        boolean isServerTruncatesFracSecs()
      • isAutoCommit

        boolean isAutoCommit()
      • setAutoCommit

        void setAutoCommit​(boolean autoCommit)
      • getSessionTimeZone

        TimeZone getSessionTimeZone()
      • setSessionTimeZone

        void setSessionTimeZone​(TimeZone sessionTimeZone)
      • getDefaultTimeZone

        TimeZone 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.
        返回:
        The default JVM time zone
      • setCharsetSettings

        void setCharsetSettings​(CharsetSettings charsetSettings)