List Info

Thread: SQLAlchemy defining tables in conf, orm mappying?




SQLAlchemy defining tables in conf, orm mappying?
user name
2008-01-22 01:15:02
I am setting up the table definition and ORM mapping in my
model and  
wondering what it is doing exactly.

Is the table definition there to manually define data-types
for SA, so  
that it can generate valid SQL with the SQL abstraction
syntax? or  
does it do more.

I am open to ORM, have used it various ORM concepts all over
Java apps  
in the past... however there are some cases where I would
rather have  
a more direct approach.

Would it be wrong for me to execute SQL statement directly
at times,  
even going so far as to not use SA's abstraction layer..?
what would  
be the disadvantages of this, other than the fact that
Alchemy can not  
apply its SQL database implementation changes to it?

Something like:

<code python>
	result = engine.execute("SELECT name, hair_color FROM
animals WHERE  
type='monkey'")
	for row in result:
	    print "username:", row['username']
	result.close()
</code>


Thanks.. .just trying to get my head around all this ;)

- Kevin



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )