HFSQL: re-use automatic id

Startbeitrag von Piet van Zanten am 18.09.2017 09:27

Hi,

I'm implementing an undo function.
Among other things it can restore deleted records from a buffer.
Now I was wondering if it would be safe to re-use the automatic identifier from the original record.
HFSQL never uses the id's of deleted records again, so I'm guessing it would be safe.
No big deal, since we will not likely run out of id's.
I guess I still have an compulsory urge to re-use and optimize. (from my early programming days)

Also, it's not entirely clear to me what exactly is the difference between hSetIdAuto and hForceIdAuto.
If I understand correctly the difference is that hSetIDAuto will always use the highest id+1 an hForceIdAuto will do the same, but ignoring the manually added id.

Kind regards,
Piet

Antworten:

Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.