/**
  * Aqui el id es el codigo
  * @see \TSLBasicRecordDAO::getUpdateRecordQuery()
  */
 protected function getUpdateRecordQuery(\TSLDataModel &$record)
 {
     /* @var $record  RecordsModel */
     $sql = 'SELECT * FROM (SELECT sp_records_save_record(' . $record->get_records_id() . '::INTEGER,' . '\'' . $record->get_records_tipo_codigo() . '\'::CHARACTER VARYING,' . $record->get_atletas_resultados_id() . '::INTEGER,' . '\'' . $record->get_categorias_codigo() . '\'::CHARACTER VARYING,' . ($record->get_records_id_origen() ? $record->get_records_id_origen() : 'NULL') . '::INTEGER,' . '\'' . $record->get_records_protected() . '\'::BOOLEAN,' . '\'' . ($record->getActivo() != TRUE ? '0' : '1') . '\'::boolean,' . '\'' . $record->get_Usuario_mod() . '\'::varchar,' . $record->getVersionId() . '::INTEGER,1::BIT) AS insupd) AS ans WHERE insupd IS NOT NULL;';
     return $sql;
 }