python - SQLAlchemy printing raw SQL from create() -


I am giving a try with Pylons SQLAlchemy, and I like it, there is only one thing, is it print It is possible to create raw SQL data generated from the table (). Make it () before making it?

  If you are using declarative syntax:  
 < Code> Print (CreateTable (Model___ table___>>  )  

Update:

Since my Approved answer and there is important information in it, I will add it here too.

Print (CreateTable (model.__ table __) .Collection (/)>

By compiling your SQL to your specific database (MySQL, Postgresql, etc.) Engine))

Update 2:

@JakotNei commented on a way to do this without any engine Has added

  print (createTable (model.__ table __). Computer application id (bid = postgrassac LDiact ())  

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -