471,353 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,353 software developers and data experts.

Locking tables with SQLAlchemy

6
Hi,
I need to lock a table for WRITE.
The scenario is that I have a SELECT followed by an INSERT, where the INSERT depends on the outcome of the SELECT. I have to make sure that no other process is modifying the table after my SELECT but before my INSERT.

1) How do i do it via SQLAlchemy ?
2) Is there any other method (not via locks) to achieve my goal?

TIA
Jun 29 '07 #1
3 5692
bartonc
6,596 Expert 4TB
Hi,
I need to lock a table for WRITE.
The scenario is that I have a SELECT followed by an INSERT, where the INSERT depends on the outcome of the SELECT. I have to make sure that no other process is modifying the table after my SELECT but before my INSERT.

1) How do i do it via SQLAlchemy ?
2) Is there any other method (not via locks) to achieve my goal?

TIA
SQLAlchemy looks like a very interesting and well put-together package.
I curious about what the actual database that you are using is. Am I correct in assuming that SQLAlchemy will connect to an installed database?
Jun 29 '07 #2
mcmc
6
I am using MySQL.
I did not understand the 2nd question.
Jun 30 '07 #3
bartonc
6,596 Expert 4TB
I am using MySQL.
I did not understand the 2nd question.
That answers my question and helps a lot. I'm going to check out this SA thing and see if will be appropriate for my projects. Then, perhaps, we'll be able to help each other.

It looks like a very useful tool.
Jun 30 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by john smile | last post: by
20 posts views Thread by John Salerno | last post: by
1 post views Thread by Karlo Lozovina | last post: by
reply views Thread by Karlo Lozovina | last post: by
6 posts views Thread by Ilias Lazaridis | last post: by
1 post views Thread by gooli | last post: by
3 posts views Thread by Greg Copeland | last post: by
2 posts views Thread by Adam Kubica | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.