Subject | Re: [Firebird-Architect] Replace the statement REPLACE |
---|---|
Author | = m. Th = |
Post date | 2006-11-17T17:04:50Z |
Ann W. Harrison wrote:
m. th.
>IMHO, I prefer _very_ much the Vlad's implementation.
> At the Firebird Conference, Vlad described the implementation of a
> REPLACE statement for Firebird 2.1. It is the short hand equivalent
> for "if you find a record that matches the primary or unique key give
> here, change the fields listed as listed, otherwise store a new
> record with these values."
>
> It was described as being like the MySQL REPLACE statement, and it is
> exactly the same syntax. However, the MySQL REPLACE behaves
> differently from the proposed Firebird statement, and, worse, the
> MySQL behavior is dumb. Their REPLACE deletes the matching record
> rather than updating it.
>
>Agreed.
> The semantics of the statement suggested by Vlad for Firebird are
> much better and the statement is useful. In our case, the ON UPDATE
> actions of constraints would be invoked as appropriate, and update
> triggers will fire. I suggest we use a different keyword so
> developers who have been exposed to MySQL don't assume we use their
> semantics.
>
> Here are some possibilities....For me: ENSURE, SUBSTITUTE,SUPERSEDE
>
> SUPPLANT, SUBSTITUTE, SUPERSEDE, USURP, RECONSTRUCT, REBUILD, REDO,
> reconstitute; reconvert; renew, renovate; regenerate; rejuvenate,
> reestablish, restore, recreate...
>
> Regards,hth,
>
> Ann
>
m. th.