MySQL Shell API 9.0.0
Unified development interface for MySQL Products
Methods | Properties | List of all members
DatabaseObject Class Reference

Provides base functionality for database objects. More...

Methods

str get_name ()
 Returns the name of this database object.

Returns
The name this database object.

 
object get_session ()
 Returns the Session object of this database object.

Returns
The Session object used to get to this object.
More...
 
object get_schema ()
 Returns the Schema object of this database object.

Returns
The Schema object used to get to this object.
More...
 
bool exists_in_database ()
 Verifies if this object exists in the database.

Returns
A boolean indicating if the object still exists on the database.

 

Properties

str name
 The name of this database object.
 
object session
 The Session object of this database object.
 
object schema
 The Schema object of this database object.
 

Detailed Description

Provides base functionality for database objects.

Member Function Documentation

◆ get_session()

object get_session ( )

Returns the Session object of this database object.

Returns
The Session object used to get to this object.

Note that the returned object can be any of:

  • Session: if the object was created/retrieved using an Session instance.
  • ClassicSession: if the object was created/retrieved using an ClassicSession.

◆ get_schema()

object get_schema ( )

Returns the Schema object of this database object.

Returns
The Schema object used to get to this object.

Note that the returned object can be any of:

  • Schema: if the object was created/retrieved using a Schema instance.
  • ClassicSchema: if the object was created/retrieved using an ClassicSchema.
  • Null: if this database object is a Schema or ClassicSchema.