@@ -96,6 +96,22 @@ class Series(Base):
9696 def __repr__ (self ):
9797 return "<Series('%s', '%s', '%s', '%s')>" % (self .id , self .site_name , self .variable_code , self .variable_name )
9898
99+ def __eq__ (self , other ) :
100+ # return self.__dict__ == other.__dict__
101+ return [self .id , self .site_id , self .site_code , self .site_name , self .variable_id , self .variable_code ,
102+ self .variable_name , self .speciation , self .variable_units_id , self .variable_units_name ,
103+ self .sample_medium , self .value_type , self .time_support , self .time_units_id , self .time_units_name ,
104+ self .data_type , self .general_category , self .method_id , self .method_description ,
105+ self .source_id , self .source_description , self .organization , self .citation ,
106+ self .quality_control_level_id , self .quality_control_level_code , self .begin_date_time ,
107+ self .end_date_time , self .begin_date_time_utc , self .end_date_time_utc , self .value_count ] == \
108+ [other .id , other .site_id , other .site_code , other .site_name , other .variable_id , other .variable_code ,
109+ other .variable_name , other .speciation , other .variable_units_id , other .variable_units_name ,
110+ other .sample_medium , other .value_type , other .time_support , other .time_units_id , other .time_units_name ,
111+ other .data_type , other .general_category , other .method_id , other .method_description ,
112+ other .source_id , other .source_description , other .organization , other .citation ,
113+ other .quality_control_level_id , other .quality_control_level_code , other .begin_date_time ,
114+ other .end_date_time , other .begin_date_time_utc , other .end_date_time_utc , other .value_count ]
99115
100116 def get_table_columns (self ):
101117 return self .__table__ .columns .keys ()
0 commit comments