Ting Zhou wrote:
> Dear All,
> 
> I would like to lock a table like "LOCK TABLES table_name" in mysql 
> command. How can I do that with SqlAlchemy.
> I have defined a class
> 
> |//|//|class Pointer(Entity):
>   using_options(tablename='Pointer',autosetup=True)
>   id=Field(MSInteger,primary_key=True)
> 
> |////|I need to lock table |////|'Pointer'.|//

You can lock the tables by executing the SQL directly.  I'm not sure 
what that looks like in Elixir, but in plain SA it'd be something like:

   conn = engine.connect()
   conn.execute("LOCK TABLES Pointer WRITE")
   ... do stuff with conn
   conn.execute("UNLOCK TABLES")


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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