def __init__(self, otype, oid, withChildren): self.withChildren = withChildren self.type = otype self.oid = oid self.childType = config.getCnf().getChildType(self.type) self.childJoin = config.getCnf().getChildJoin(self.type) self.fields = config.getCnf().getFields(self.type) self.modifier = config.getCnf().getModifier(self.type) self.response = []
def __init__(self): self.dbname = config.getCnf().getDB() self.server = config.getCnf().getServer() conn = pymssql.connect(self.server) self.cursor = conn.cursor() self.setDB()
def pack(self): print("Packing " + self.type) queryString = config.getCnf().getQuery(self.type) results = getConn().runQuery(queryString) self.format(results)