GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — document-api-python/tableaudocumentapi/relation.py at master · kgtdbx/document-api-python Expand file tree/ Copy pathrelation.pyMore file actions 45 lines (36 loc) · 1.29 KB / Copy pathrelation.pyFile metadata and controls45 lines (36 loc) · 1.29 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 from tableaudocumentapi import Clause class Relation(object): """A class representing parameters inside Data Sources.""" def __init__(self, relation_xml): """Relation is usually instantiated by passing in relation XML from a Connection. """ self._relationXML = relation_xml self._type = relation_xml.get('type') self._join = relation_xml.get('join') self._name = relation_xml.get('name') self._table = relation_xml.get('table') self._connection = relation_xml.get('connection') self._clause = list(map(Clause, self._relationXML.findall('./clause'))) self._relations = list(map(Relation, self._relationXML.findall('./relation'))) @property def type(self): return self._type @property def join(self): return self._join @property def name(self): return self._name @property def table(self): return self._table @property def connection(self): return self._connection def __str__(self): if self.type == "table": return f'{self.table} "{self.name}"' if self.type == "join": return f"{self._relations[0]} {self.join} {self.type} {self._relations[1]} on ({self._clause[0]})" return "ERROR" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |