コード例 #1
0
    def save(self, advertised_property: AdvertisedProperty):
        self._last_id = self._last_id + 1

        advertised_property.property_id = self._last_id
        self._repo[self._last_id] = self._property_to_dict(advertised_property)
コード例 #2
0
 def save(self, advertised_property: AdvertisedProperty):
     insert = self.properties.insert().values(
         **self._property_to_dict(advertised_property), )
     result = self.session.execute(insert)
     advertised_property.property_id = result.inserted_primary_key[0]