Hi Mark,

I think I badly described what I'm doing. My problem is that I need to
update some columns atomically and I'm using stored procedures for
that. I'm still learning the postgres so maybe I'm doing so complex
things for so simple tasks.

As a very short and simple example:

RecordTable:
  id INT (primary)
  idx INT
  message STRING

RecordClass:
  ...

index ix index of message in the message list. Now I can fetch all
messages from the database in correct order. Then I have some methods
in mapped class, for example

def moveUp(self):
  ...

Here I'm calling stored procedure record_move_up() and I know that
index will be changed to index - 1 (in the most cases) so I'd like to
change the idx property in mapped class too without making the change
to the database again.

And now I wonder how to do it. I used sqlalchemy from 0.3-0.4 and I
noticed that SqlAlchemy is updating always everything. Now I noticed
that this is probably no longer true so if I do not touch the 'idx'
everything should be fine.

I'd like to post working example to my blog, but this will take some
time to finish.

Best regards
Petr

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to