Example #1
0
    def __init__(self, schema_or_value=unspecified, this_side_fields=None, other_side_fields=None):
        self.rendered = False
        from tableau.containers import DatumBase
        self._value = None
        self._value_set = False
        if isinstance(schema_or_value, DatumBase):
            self.schema = schema_or_value._tableau_schema
            self.value = schema_or_value
        elif schema_or_value is None:
            self.schema = schema_or_value
            self.value = None
        elif isinstance(schema_or_value, basestring):
            self.schema = schema_or_value
        elif schema_or_value is not unspecified:
            raise TypeError("schema_or_value must be a DatumBase, None, or Unspecified")

        self.this_side_fields = string_container_from_value(this_side_fields, tuple)
        self.other_side_fields = string_container_from_value(other_side_fields, tuple)
Example #2
0
 def __init__(self, collection, referring_fields=None, referred_fields=None):
     self.collection = collection
     self.referring_fields = string_container_from_value(referring_fields, tuple)
     self.referred_fields = string_container_from_value(referred_fields, tuple)
Example #3
0
 def __init__(self, collection, this_side_fields, other_side_fields, via=None):
     self.collection = collection
     self.this_side_fields = string_container_from_value(this_side_fields, tuple)
     self.other_side_fields = string_container_from_value(other_side_fields, tuple)
     self.via = via