Package pysql :: Module pysqloraobjects :: Class OraObject
[hide private]
[frames] | no frames]

Class OraObject

source code

Father of all pysql Oracle objects

Instance Methods [hide private]
 
__init__(self, objectOwner="", objectName="", objectType="", objectStatus="")
Object creation
source code
 
__str__(self)
String representation (mostly used for debug purpose)
source code
 
__eq__(self, other)
Define equal operator.
source code
 
__hash__(self)
Unique hash of object.
source code
 
getCopy(self)
Returns: a deep copy of the current object
source code
 
getName(self)
Returns: object name (str)
source code
 
getFullName(self)
Returns: object name prefixed with owner name (str) Ex.
source code
 
getType(self)
Returns: object type (str)
source code
 
getOwner(self)
Returns: object owner (str)
source code
 
getStatus(self)
Returns: object status (str)
source code
 
setName(self, objectName)
Sets name (and owner if name is given like "user.object")
source code
 
setType(self, objectType)
Sets the object type
source code
 
setOwner(self, objectOwner)
Sets the object owner.
source code
 
setStatus(self, objectStatus) source code
 
guessStatus(self, db)
guess the object status
source code
 
guessInfos(self, db, interactive=False)
Guesses and sets object type, owner and status
source code
 
getCreated(self, db)
Returns: date of creation of the object
source code
 
getLastDDL(self, db)
Returns: date of last DDL modification of the object
source code
 
getDDL(self, db)
Returns: SQL needed to create this object as a str
source code
Method Details [hide private]

__eq__(self, other)
(Equality operator)

source code 

Define equal operator. Object are identical if they have same name, type and owner

__hash__(self)
(Hashing function)

source code 

Unique hash of object. Used to determine if objects are identical and to create set of unique object

getCopy(self)

source code 
Returns:
a deep copy of the current object

getName(self)

source code 
Returns:
object name (str)

getFullName(self)

source code 
Returns:
object name prefixed with owner name (str) Ex. "scott.my_table"

getType(self)

source code 
Returns:
object type (str)

getOwner(self)

source code 
Returns:
object owner (str)

getStatus(self)

source code 
Returns:
object status (str)

setType(self, objectType)

source code 

Sets the object type

Parameters:
  • objectType (str) - Oracle object type as defined in Oracle dynamic views

setOwner(self, objectOwner)

source code 

Sets the object owner. Name is uppercased if quote are not given

guessInfos(self, db, interactive=False)

source code 

Guesses and sets object type, owner and status

Parameters:
  • db (PysqlDb instance) - Connection to Oracle
  • interactive (bool) - should we prompt user if multiple results are found? (default is False)
Returns:
True if type and owner are guessed. In interactive mode, returns list of objects found

getCreated(self, db)

source code 
Returns:
date of creation of the object

getLastDDL(self, db)

source code 
Returns:
date of last DDL modification of the object

getDDL(self, db)

source code 
Returns:
SQL needed to create this object as a str