def to_query(self, id: int) -> str: user_temp = User(0, 0, 0, 0, 0, 0, 0, 0, 0) query = '{}=FALSE, {}={} WHERE {}={} RETURNING *;'.format( user_temp.validation_name(), user_temp.delete_date_name(), self.conversor.to_entity( user_temp.define_type(user_temp.delete_date_name()), datetime.datetime.now()), user_temp.id_name(), id) return query
def to_query(self, data: User, id: int) -> str: definitions = self.to_entity(data) user_temp = User(0, 0, 0, 0, 0, 0, 0, 0, 0) query = '{} WHERE {}={} RETURNING *;'.format(definitions, user_temp.id_name(), id) return query
def to_query(self, data: int) -> str: user_temp = User(0,0,0,0,0,0,0,0,0) return ' WHERE {} = {} AND {} = TRUE;'.format(user_temp.id_name(), data, user_temp.validation_name())