(self, name, data_type, is_primary_key=False, comment="")
| 104 | self._comment: str = "" |
| 105 | |
| 106 | def add_property(self, name, data_type, is_primary_key=False, comment=""): |
| 107 | self._prop_index[name] = len(self._props) |
| 108 | if isinstance(data_type, str): |
| 109 | data_type = unify_type(data_type) |
| 110 | self._props.append( |
| 111 | Property(name, data_type, is_primary_key, len(self._props), comment) |
| 112 | ) |
| 113 | self._valid_props.append(1) |
| 114 | return self |
| 115 | |
| 116 | def set_comment(self, comment): |
| 117 | self._comment = comment |