Ejemplo n.º 1
0
 def defineDomain(self, name=None, domId=None):
     """Define domain by given name or id."""
     x = None
     if name:
         x =  self.con.lookupByName(name)
     elif domId:
         x = self.con.lookupById(int(domId))
     if x:
         queries.get_or_create(x)
     return x
Ejemplo n.º 2
0
 def defineDomain(self, name=None, domId=None):
     """Define domain by given name or id."""
     x = None
     if name:
         x = self.con.lookupByName(name)
     elif domId:
         x = self.con.lookupById(int(domId))
     if x:
         queries.get_or_create(x)
     return x
Ejemplo n.º 3
0
def defineDomain(name=None, domId=None, con=None):
    """Define domain by given name or id."""
    con = con or getConnection()
    x = None
    if name:
        x = con.lookupByName(name)
    elif domId:
        x = con.lookupById(int(domId))
    if x:
        queries.get_or_create(x)
    return x
Ejemplo n.º 4
0
def defineDomain(name=None, domId=None, con=None):
    """Define domain by given name or id."""
    con = con or getConnection()
    x = None
    if name:
        x = con.lookupByName(name)
    elif domId:
        x = con.lookupById(int(domId))
    if x:
        queries.get_or_create(x)
    return x