func (service *Service) DeleteOldEvents(maxAge time.Time) error {
	deleteOldEvents := `DELETE FROM events WHERE createdAt < "` + maxAge.Format(time.RFC3339) + `";`
	_, err := service.eventsDB.Exec(deleteOldEvents)
	return err
}
// DeleteOldEvents removes events older than a specified datetime.
DeleteOldEvents removes events older than a specified datetime.
// DeleteOldEvents removes events older than a specified datetime .
func (service *Service) DeleteOldEvents(maxAge time.Time) error {
	deleteOldEvents := `DELETE FROM events WHERE createdAt < "` + maxAge.Format(time.RFC3339) + `";`
	_, err := service.eventsDB.Exec(deleteOldEvents)
	return err
}
func ( service * Service ) DeleteOldEvents ( maxAge time . Time ) error { deleteOldEvents := `DELETE FROM events WHERE createdAt < "` + maxAge . Format ( time . RFC3339 ) + `";` _ , err := service . eventsDB . Exec ( deleteOldEvents ) return err }
DeleteOldEvents removes events older than a specified datetime.
DeleteOldEvents removes events older than a specified datetime .