Exemple #1
0
 def update(self, connection):
     self.columns.pop(
         'created_at', None
     )  # So that original timestamp is not overwritten with current one
     update_planet_sql = MySQL.update(self.TABLE, self.columns.keys(),
                                      ['hip', 'name'], ['=', '='], ['AND'])
     return super(Planet, self).update(update_planet_sql, connection)
 def update(self, connection):
     self.columns.pop(
         'created_at', None
     )  # So that original timestamp is not overwritten with current one
     self.columns.pop('id', None)  # ID should not be updated
     update_catalogue = MySQL.update(self.TABLE, self.columns.keys(),
                                     ['author_year'], ['='])
     return super(Catalogue, self).update(update_catalogue, connection)
Exemple #3
0
 def update(self, connection):
     self.columns.pop(
         'created_at', None
     )  # So that original timestamp is not overwritten with current one
     update_composition = MySQL.update(
         self.TABLE, self.columns.keys(),
         ['solarnorm', 'hip', 'cid', 'element'], ['=', '=', '=', '='],
         ['AND', 'AND', 'AND'])
     return super(Composition, self).update(update_composition, connection)
 def update(self, connection):
     self.columns.pop('created_at', None)  # So that original timestamp is not overwritten with current one
     update_composition = MySQL.update(self.TABLE, self.columns.keys(), ['solarnorm', 'hip', 'cid', 'element'],
                                       ['=', '=', '=', '='], ['AND', 'AND', 'AND'])
     return super(Composition, self).update(update_composition, connection)
 def update(self, connection):
     self.columns.pop('created_at', None)  # So that original timestamp is not overwritten with current one
     self.columns.pop('id', None)  # ID should not be updated
     update_catalogue = MySQL.update(self.TABLE, self.columns.keys(), ['author_year'], ['='])
     return super(Catalogue, self).update(update_catalogue, connection)
 def update(self, connection):
     self.columns.pop('created_at', None)  # So that original timestamp is not overwritten with current one
     update_star = MySQL.update(self.TABLE, self.columns.keys(), ['hip'], ['='])
     return super(Star, self).update(update_star, connection)