On 10 Mar 2011, at 7:57am, Mohd Radzi Ibrahim wrote:
> So, that's explain why my column ID INTEGER PRIMARY KEY, changes when I use
> REPLACE. I could not rely on the ID with this command.
Yes. You explicitly said 'REPLACE' so that's what it's doing. If you want to
modify an existing
On 10-Mar-2011, at 6:52 AM, Jay A. Kreibich wrote:
> On Wed, Mar 09, 2011 at 11:37:46PM +0100, Armin Kunaschik scratched on the
> wall:
>> On Wed, Mar 9, 2011 at 11:28 PM, Igor Tandetnik wrote:
>
>>> INSERT OR REPLACE is indistinguishable from a DELETE followed by INSERT.
On Wed, Mar 09, 2011 at 11:37:46PM +0100, Armin Kunaschik scratched on the wall:
> On Wed, Mar 9, 2011 at 11:28 PM, Igor Tandetnik wrote:
> > INSERT OR REPLACE is indistinguishable from a DELETE followed by INSERT.
> Is it really DELETE and INSERT internally?
Yes and no.
On Wed, Mar 9, 2011 at 11:44 PM, Simon Slavin wrote:
>
> On 9 Mar 2011, at 10:37pm, Armin Kunaschik wrote:
>
>> Is it really DELETE and INSERT internally?
>
> As far as you can tell when how SQLite behaves, yes it is.
>
>> This would explain, why ctime is "invisible" inside
On 9 Mar 2011, at 10:37pm, Armin Kunaschik wrote:
> Is it really DELETE and INSERT internally?
As far as you can tell when how SQLite behaves, yes it is.
> This would explain, why ctime is "invisible" inside the trigger...
> it's simply not there
> when replace is used.
>
> Maybe I should
On Wed, Mar 09, 2011 at 11:19:51PM +0100, Armin Kunaschik scratched on the wall:
> Important: I also want to be able to "insert or replace" rows and keep ctime.
> The update trigger works fine, but the insert trigger ALWAYS updates ctime.
As Igor pointed out, "INSERT OR REPLACE" is called
On Wed, Mar 9, 2011 at 11:28 PM, Igor Tandetnik wrote:
> On 3/9/2011 5:19 PM, Armin Kunaschik wrote:
>> I'm trying this for quite some time... and I'm totally stuck.
>>
>> I have the following table:
>>
>> CREATE TABLE example(
>> date integer primary key not null,
>>
On 3/9/2011 5:19 PM, Armin Kunaschik wrote:
> I'm trying this for quite some time... and I'm totally stuck.
>
> I have the following table:
>
> CREATE TABLE example(
> date integer primary key not null,
> text text,
> ctime TIMESTAMP,
> mtime TIMESTAMP);
>
> ctime=creation time (should be
On Wed, Mar 9, 2011 at 11:21 PM, Mr. Puneet Kishor wrote:
>
> On Mar 9, 2011, at 5:19 PM, Armin Kunaschik wrote:
>
>> Hi there,
>>
>> I'm trying this for quite some time... and I'm totally stuck.
>>
>> I have the following table:
>>
>> CREATE TABLE example(
>> date integer
On Mar 9, 2011, at 5:19 PM, Armin Kunaschik wrote:
> Hi there,
>
> I'm trying this for quite some time... and I'm totally stuck.
>
> I have the following table:
>
> CREATE TABLE example(
> date integer primary key not null,
> text text,
> ctime TIMESTAMP,
> mtime TIMESTAMP);
>
>
Hi there,
I'm trying this for quite some time... and I'm totally stuck.
I have the following table:
CREATE TABLE example(
date integer primary key not null,
text text,
ctime TIMESTAMP,
mtime TIMESTAMP);
ctime=creation time (should be set only once)
mtime=modification time (should be set
11 matches
Mail list logo