Author Topic: Updates that set a value to the same new value..  (Read 848 times)

ABlipInContinuity

Updates that set a value to the same new value..
« on: July 15, 2008, 03:53:52 pm »
Badly titled OP.

If you have a statement that gives the same end result no matter how many times it is run, what is it called? (I'm sure there is a word for it).

e.g.

Update fred
set age = 10

This is unlike the following statement which will have a different result dependant on the number of times it is run:

Update fred
set age = age + 10

Thanks

Re: Updates that set a value to the same new value..
« Reply #1 on: July 15, 2008, 03:59:07 pm »
At a guess:-

set age = 10

Absolute, static, literal.

set age = age + 10

self-referential
"Yes please" said Squirrel "biscuits are our favourite things."

Rollo

Re: Updates that set a value to the same new value..
« Reply #2 on: July 15, 2008, 04:09:11 pm »
Idempotent

clicky

ABlipInContinuity

Re: Updates that set a value to the same new value..
« Reply #3 on: July 15, 2008, 04:13:02 pm »
That was quicker than I expected.

Thanks Rollo. :)