The Schema
object represents a database
schema. You can obtain an instance of Schema
by calling the Session
object's
getSchema()
method;
you can also obtain a list of all available databases by calling
getSchemas()
.
Schema supports the methods listed here:
existsInDatabase()
: Returnstrue
if the schema exists, otherwisefalse
.getTable(String
: Returns thename
)Table
having the specifiedname
.getTables()
: Returns a a list of tables (Table
objects) existing within thisSchema
.getSession()
: Returns theSession
object corresponding to the current session.
The Schema
object, along with its methods,
was added in MySQL 9.2.0.