(self, id_)
| 139 | return None |
| 140 | |
| 141 | def persistent_load(self, id_): |
| 142 | m = our_ids.match(str(id_)) |
| 143 | if not m: |
| 144 | return None |
| 145 | else: |
| 146 | type_, args = m.group(1, 2) |
| 147 | if type_ == "attribute": |
| 148 | key, clsarg = args.split(":") |
| 149 | cls = pickle.loads(b64decode(clsarg)) |
| 150 | return getattr(cls, key) |
| 151 | elif type_ == "mapper": |
| 152 | cls = pickle.loads(b64decode(args)) |
| 153 | return class_mapper(cls) |
| 154 | elif type_ == "mapper_selectable": |
| 155 | cls = pickle.loads(b64decode(args)) |
| 156 | return class_mapper(cls).__clause_element__() |
| 157 | elif type_ == "mapperprop": |
| 158 | mapper, keyname = args.split(":") |
| 159 | cls = pickle.loads(b64decode(mapper)) |
| 160 | return class_mapper(cls).attrs[keyname] |
| 161 | elif type_ == "table": |
| 162 | return self.metadata.tables[args] |
| 163 | elif type_ == "column": |
| 164 | table, colname = args.split(":") |
| 165 | return self.metadata.tables[table].c[colname] |
| 166 | elif type_ == "session": |
| 167 | return self.scoped_session() |
| 168 | elif type_ == "engine": |
| 169 | return self.get_engine() |
| 170 | else: |
| 171 | raise Exception("Unknown token: %s" % type_) |
| 172 | |
| 173 | |
| 174 | def dumps(obj, protocol=pickle.HIGHEST_PROTOCOL): |
nothing calls this directly
no test coverage detected