On Tue, Dec 04, 2007 at 03:15:12PM -0800, Frank Conradie wrote:
> * postgresql: does not even have any sort of REPLACE at all (AFAICT)
It doesn't.
> * sqlite: REPLACE works like its INSERT: /"The REPLACE command is an
> alias for the "INSERT OR REPLACE" variant of the INSERT command. This
>
Oleg
I see your point - I am using MySQL and didn't think about the other DB's.
Looking more closely at the postgresql and sqlite docs, plus the fact
that REPLACE is not standard SQL at all, I see that it will be quite a
job to implement a more flexible Replace expression that supports all
th
On Tue, Dec 04, 2007 at 02:29:10PM -0800, Frank Conradie wrote:
> I don't want to fight with you, but INSERT also supports SET:
No, it doesn't (meaning "standard" SQL).
http://www.postgresql.org/docs/7.3/static/sql-insert.html :
INSERT INTO table [ ( column [, ...] ) ]
{ DEFAULT VALUES |
Hi Oleg
I don't want to fight with you, but INSERT also supports SET:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
SET col_name={expr | DEFAULT}, ...
And here is the REPLACE syntax:
REPLACE [LOW_PRIORITY | DELAYED]
[INTO] tbl_name
SET col_name={expr | DE
On Tue, Dec 04, 2007 at 02:19:31PM -0800, Frank Conradie wrote:
> I will have to disagree again - please read the page that you link to
> below carefully: "|REPLACE| works exactly like |INSERT|
SQLObject is more interested in syntax. SET and name/value pairs make it
much more like UPDATE than
Hi Oleg
I will have to disagree again - please read the page that you link to
below carefully: "|REPLACE| works exactly like |INSERT|, except that if
an old row in the table has the same value as a new row for a |PRIMARY
KEY| or a |UNIQUE| index, the old row is deleted before the new row is
i
On Fri, Nov 30, 2007 at 08:44:18PM -0800, Frank Conradie wrote:
> In sqlbuilder the "Replace" expression currently inherits from "Update",
> but in MySQL, according to their official docs, "REPLACE works exactly
> like INSERT", i.e. "REPLACE INTO ...". Thus it looks like it should
> rather inher
Forgive me if this has been discussed before, but I searched the
archives without any success.
In sqlbuilder the "Replace" expression currently inherits from "Update",
but in MySQL, according to their official docs, "REPLACE works exactly
like INSERT", i.e. "REPLACE INTO ...". Thus it looks lik