类 SessionImpl
- java.lang.Object
-
- com.mysql.cj.xdevapi.SessionImpl
-
-
字段概要
字段 修饰符和类型 字段 说明 protected StringdefaultSchemaNameprotected MysqlxSessionsession
-
构造器概要
构造器 限定符 构造器 说明 protectedSessionImpl()SessionImpl(HostInfo hostInfo)Constructor.SessionImpl(XProtocol prot)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Close this session.voidcommit()Commit the transaction.SchemacreateSchema(String schemaName)Create and return a new schema with the name given by name.SchemacreateSchema(String schemaName, boolean reuseExistingObject)Create and return a new schema with the name given by name.voiddropSchema(String schemaName)Drop the existing schema with the name given by name.SchemagetDefaultSchema()Retrieve the default schema which may be configured at connect time.StringgetDefaultSchemaName()Retrieve the default schema name which may be configured at connect time.SchemagetSchema(String schemaName)Retrieve the Schema corresponding to name.List<Schema>getSchemas()Retrieve the list of Schema objects for which the current user has access.MysqlxSessiongetSession()StringgetUri()Get the URL used to create this session.booleanisOpen()Is this session open?voidreleaseSavepoint(String name)Releases the named savepoint.voidrollback()Rollback the transaction.voidrollbackTo(String name)Rolls back the transaction to the named savepoint.StringsetSavepoint()Creates a transaction savepoint with an implementation-defined generated name and returns its name, which can be used inSession.rollbackTo(String)orSession.releaseSavepoint(String).StringsetSavepoint(String name)Creates or replaces a transaction savepoint with the given name.SqlStatementImplsql(String sql)Create a native SQL command.voidstartTransaction()Start a new transaction.
-
-
-
字段详细资料
-
session
protected MysqlxSession session
-
defaultSchemaName
protected String defaultSchemaName
-
-
方法详细资料
-
getSchemas
public List<Schema> getSchemas()
从接口复制的说明:SessionRetrieve the list of Schema objects for which the current user has access.- 指定者:
getSchemas在接口中Session- 返回:
- list of Schema objects
-
getSchema
public Schema getSchema(String schemaName)
从接口复制的说明:SessionRetrieve the Schema corresponding to name.
-
getDefaultSchemaName
public String getDefaultSchemaName()
从接口复制的说明:SessionRetrieve the default schema name which may be configured at connect time.- 指定者:
getDefaultSchemaName在接口中Session- 返回:
- default schema name
-
getDefaultSchema
public Schema getDefaultSchema()
从接口复制的说明:SessionRetrieve the default schema which may be configured at connect time.- 指定者:
getDefaultSchema在接口中Session- 返回:
- default
Schema
-
createSchema
public Schema createSchema(String schemaName)
从接口复制的说明:SessionCreate and return a new schema with the name given by name.- 指定者:
createSchema在接口中Session- 参数:
schemaName- name of schema to create- 返回:
Schemacreated
-
createSchema
public Schema createSchema(String schemaName, boolean reuseExistingObject)
从接口复制的说明:SessionCreate and return a new schema with the name given by name. If the schema already exists, a reference to it is returned.- 指定者:
createSchema在接口中Session- 参数:
schemaName- name of schema to createreuseExistingObject- true to reuse- 返回:
Schemacreated
-
dropSchema
public void dropSchema(String schemaName)
从接口复制的说明:SessionDrop the existing schema with the name given by name.- 指定者:
dropSchema在接口中Session- 参数:
schemaName- name of schema to drop
-
startTransaction
public void startTransaction()
从接口复制的说明:SessionStart a new transaction.- 指定者:
startTransaction在接口中Session
-
rollback
public void rollback()
从接口复制的说明:SessionRollback the transaction.
-
setSavepoint
public String setSavepoint()
从接口复制的说明:SessionCreates a transaction savepoint with an implementation-defined generated name and returns its name, which can be used inSession.rollbackTo(String)orSession.releaseSavepoint(String). Calling this method more than once should always work. The generated name shall be unique per session.- 指定者:
setSavepoint在接口中Session- 返回:
- savepoint name
-
setSavepoint
public String setSavepoint(String name)
从接口复制的说明:SessionCreates or replaces a transaction savepoint with the given name. Calling this method more than once should always work.- 指定者:
setSavepoint在接口中Session- 参数:
name- savepoint name- 返回:
- savepoint name
-
rollbackTo
public void rollbackTo(String name)
从接口复制的说明:SessionRolls back the transaction to the named savepoint. This method will succeed as long as the given save point has not been already rolled back or released. Rolling back to a savepoint prior to the one named will release or rollback any that came after.- 指定者:
rollbackTo在接口中Session- 参数:
name- savepoint name
-
releaseSavepoint
public void releaseSavepoint(String name)
从接口复制的说明:SessionReleases the named savepoint. This method will succeed as long as the given save point has not been already rolled back or released. Rolling back to a savepoint prior to the one named will release or rollback any that came after.- 指定者:
releaseSavepoint在接口中Session- 参数:
name- savepoint name
-
isOpen
public boolean isOpen()
从接口复制的说明:SessionIs this session open?
-
sql
public SqlStatementImpl sql(String sql)
从接口复制的说明:SessionCreate a native SQL command. Placeholders are supported using the native "?" syntax.- 指定者:
sql在接口中Session- 参数:
sql- native SQL statement- 返回:
SqlStatement
-
getSession
public MysqlxSession getSession()
-
-