Package wsatools :: Package DbConnect :: Module Schema :: Class _Schema
[hide private]

Class _Schema

source code


Abstract base class representing a schema for any generic database object.

Instance Methods [hide private]
 
__cmp__(self, other)
Compare based on name.
source code
str
__str__(self)
Returns: Object's name.
source code
str
createCommand(self)
Returns: Unique beginning of a create statement for this object in an SQL script.
source code
str
createSQL(self)
Returns: Full SQL line to create the object.
source code
str
dropSQL(self)
Returns: Full SQL line to drop the object.
source code
list(str)
parseName(self, line, schemaFileName='')
Sets the _Schema.name and _Schema.releasable variables by parsing the given line.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  identifier = ''
SQL identifier for this type of database object.
  name = ''
The name of the object (case-sensitive - expects mixed case).
  releasable = True
Can this object be released?
  schemaFileName = ''
Name of .sql schema file where this object lies.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: str
Object's name.
Overrides: object.__str__

createCommand(self)

source code 
Returns: str
Unique beginning of a create statement for this object in an SQL script.

createSQL(self)

source code 
Returns: str
Full SQL line to create the object.

dropSQL(self)

source code 
Returns: str
Full SQL line to drop the object.

parseName(self, line, schemaFileName='')

source code 

Sets the _Schema.name and _Schema.releasable variables by parsing the given line.

Parameters:
  • line (str) - Line containing the create command for the schema object.
  • schemaFileName (str) - Optionally set the _Schema.schemaFileName variable too.
Returns: list(str)
The line split into a list words, for optional further processing.