Ticket #324 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 4 months ago

Lastupdated attribute: a timestamp that updates itself whenever it's item changes

Reported by: mizzen Assigned to: glyph
Priority: lowest Milestone:
Component: Axiom Severity: trivial
Keywords: Cc:
Author: Branch:

Description

It would be useful to have an attribute that recorded when an Axiom Item was last changed. In MySQl this applies to the first timestamp column in a table. It is only updated if the update query resulted in changed data.

Attachments

lastupdated.py (2.4 kB) - added by exarkun on 12/06/05 11:44:34.
Contents of deadbeefbabe paste

Change History

11/06/05 00:40:39 changed by exarkun

  • owner changed from exarkun to glyph.

This is more your kind of thing, I think.

11/15/05 10:30:58 changed by glyph

  • priority changed from normal to lowest.

A good idea but I will wait for supporting use-cases before doing anything with it.

12/06/05 11:28:08 changed by rwall

I had a go at doing this: http://deadbeefbabe.org/paste/2322

I got it partially working using an SQL trigger, but the main problem is that unless you clean Axiom's cache, it doesn't know about the change made to the lastUpdatedDate in the database.

I suppose that this is related to #450 in that a lastTransactionID table could be maintained by sqlite using triggers.

Another problem is that the time sqlite strftime function doesn't return Unix microseconds and is not therefore as accurate as extime.

-RichardW.

12/06/05 11:37:00 changed by rwall

Also, I talked to exarkun about this on IRC and he suggested that it would also be useful for getSchema to return any triggers associated with an item. I wondered if an ItemSchema? class might be a good idea and that getScema could be changed to return a ItemSchema? instance.

class IAxiomItemSchema:
  def getAttributes(): pass
 
  def getTriggers(): pass

...but that's as far as I got.

12/06/05 11:44:34 changed by exarkun

  • attachment lastupdated.py added.

Contents of deadbeefbabe paste

03/19/08 12:09:17 changed by washort

  • status changed from new to closed.
  • resolution set to wontfix.
  • branch changed.
  • author changed.
jethro@divmod.org