コード例 #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)
コード例 #2
0
 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)
コード例 #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)
コード例 #4
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)
コード例 #5
0
 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)
コード例 #6
0
 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)