| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
defaultSchemaName |
protected MysqlxSession |
session |
| Modifier | Constructor and Description |
|---|---|
protected |
SessionImpl() |
|
SessionImpl(HostInfo hostInfo)
Constructor.
|
|
SessionImpl(XProtocol prot) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this session.
|
void |
commit()
Commit the transaction.
|
Schema |
createSchema(java.lang.String schemaName)
Create and return a new schema with the name given by name.
|
Schema |
createSchema(java.lang.String schemaName,
boolean reuseExistingObject)
Create and return a new schema with the name given by name.
|
void |
dropSchema(java.lang.String schemaName)
Drop the existing schema with the name given by name.
|
Schema |
getDefaultSchema()
Retrieve the default schema which may be configured at connect time.
|
java.lang.String |
getDefaultSchemaName()
Retrieve the default schema name which may be configured at connect time.
|
Schema |
getSchema(java.lang.String schemaName)
Retrieve the Schema corresponding to name.
|
java.util.List<Schema> |
getSchemas()
Retrieve the list of Schema objects for which the current user has access.
|
MysqlxSession |
getSession() |
java.lang.String |
getUri()
Get the URL used to create this session.
|
boolean |
isOpen()
Is this session open?
|
void |
releaseSavepoint(java.lang.String name)
Releases the named savepoint.
|
void |
rollback()
Rollback the transaction.
|
void |
rollbackTo(java.lang.String name)
Rolls back the transaction to the named savepoint.
|
java.lang.String |
setSavepoint()
Creates a transaction savepoint with an implementation-defined generated name and returns its name, which can be used in
Session.rollbackTo(String) or
Session.releaseSavepoint(String). |
java.lang.String |
setSavepoint(java.lang.String name)
Creates or replaces a transaction savepoint with the given name.
|
SqlStatementImpl |
sql(java.lang.String sql)
Create a native SQL command.
|
void |
startTransaction()
Start a new transaction.
|
protected MysqlxSession session
protected java.lang.String defaultSchemaName
public SessionImpl(HostInfo hostInfo)
hostInfo - HostInfo instancepublic SessionImpl(XProtocol prot)
protected SessionImpl()
public java.util.List<Schema> getSchemas()
SessiongetSchemas in interface Sessionpublic Schema getSchema(java.lang.String schemaName)
Sessionpublic java.lang.String getDefaultSchemaName()
SessiongetDefaultSchemaName in interface Sessionpublic Schema getDefaultSchema()
SessiongetDefaultSchema in interface SessionSchemapublic Schema createSchema(java.lang.String schemaName)
SessioncreateSchema in interface SessionschemaName - name of schema to createSchema createdpublic Schema createSchema(java.lang.String schemaName, boolean reuseExistingObject)
SessioncreateSchema in interface SessionschemaName - name of schema to createreuseExistingObject - true to reuseSchema createdpublic void dropSchema(java.lang.String schemaName)
SessiondropSchema in interface SessionschemaName - name of schema to droppublic void startTransaction()
SessionstartTransaction in interface Sessionpublic void commit()
Sessionpublic void rollback()
Sessionpublic java.lang.String setSavepoint()
SessionSession.rollbackTo(String) or
Session.releaseSavepoint(String). Calling this method more than once should always work. The generated name shall be unique per session.setSavepoint in interface Sessionpublic java.lang.String setSavepoint(java.lang.String name)
SessionsetSavepoint in interface Sessionname - savepoint namepublic void rollbackTo(java.lang.String name)
SessionrollbackTo in interface Sessionname - savepoint namepublic void releaseSavepoint(java.lang.String name)
SessionreleaseSavepoint in interface Sessionname - savepoint namepublic java.lang.String getUri()
Sessionpublic boolean isOpen()
Sessionpublic void close()
Sessionpublic SqlStatementImpl sql(java.lang.String sql)
Sessionsql in interface Sessionsql - native SQL statementSqlStatementpublic MysqlxSession getSession()