Exemple #1
0
 def setName(self, objectName):
     """ Sets name (and owner if name is given like "user.object")"""
     if objectName == "":
         raise PysqlException("Object name must be defined!")
     if objectName.startswith("/"):
         # This should be a datafile
         #TODO: check if fully compliant with Windows
         self.objectName = objectName
     elif objectName.count(".") == 1:
         (owner, name) = objectName.split(".")
         self.setOwner(owner)
         self.objectName = pysqlhelpers.upperIfNoQuotes(name)
     else:
         # Default to simple setName
         self.objectName = pysqlhelpers.upperIfNoQuotes(objectName)
Exemple #2
0
 def setOwner(self, objectOwner):
     """Sets the object owner. Name is uppercased if quote are not given"""
     self.objectOwner = pysqlhelpers.upperIfNoQuotes(objectOwner)