-
Notifications
You must be signed in to change notification settings - Fork 122
Zend\Db\Sql\Replace? #6
Comments
We've purposely not implemented the feature in the past, as it's not part of any ANSI SQL standards, which means it would require emulation on many platforms. However, it appears that in recent years, most platforms implement it (see http://troels.arvin.dk/db/rdbms/#functions-REPLACE), and do so in essentially the same way. (SQLite even implements it, though that comparison does not include SQLite.) As such, we can potentially add it as a feature at this time. |
@weierophinney the link you have given refers to the REPLACE string function, rather than REPLACE INTO syntax referred to by @Koopzington REPLACE INTO allows one to ask if a matching record exists, and then either INSERT or UPDATE a record depending on the answer, in a single statement. |
Right!
The same applies here:
The problem: every DBMS uses an own implementation outside from any standard. For example:
So the labels for this issue are correct: "help wanted" |
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#147. |
Zend\Db\Sql is missing a way to create a REPLACE INTO table_name VALUES(row_data) statement.
Thought, I'd add this here 'cause apparently noone else was missing that feature.
The text was updated successfully, but these errors were encountered: