Dear SQLAlchemy/database Gurus,
I have a database (PostgreSQL 8.2) function that works --
mydb=# \df function_insert_label_relations
List of functions
Schema | Name | Result data type
| Argument data types
--------+---------------------------------+------------------
+-------------------------------------------------------------------------------------------
public | function_insert_label_relations | void |
parent_label_name character varying, child_label_name character
varying, locale character
(1 row)
mydb=# select function_insert_label_relations( 'operating system',
'Linux', 'en_us' );
function_insert_label_relations
---------------------------------
(1 row)
(data verification outputs skipped)
And is called as --
Session = scoped_session(sessionmaker(...))
...
s = text("select
function_insert_label_relations( ":parent_label_name , :child_label_name ,
:locale)")
result = Session.execute(s, {'parent_label_name':parent_label_name,
'child_label_name':child_label_name, 'locale':'en_us'})
for row in result:
print row
which does produce the logs --
2007-12-30 13:23:21,704 INFO sqlalchemy.engine.base.Engine.0x..6c
select function_insert_label_relations( %(parent_label_name)s , %
(child_label_name)s , %(locale)s)
2007-12-30 13:23:21,704 INFO sqlalchemy.engine.base.Engine.0x..6c
{'locale': 'en_us', 'child_label_name': u'Linux', 'parent_label_name':
u'operating system'}
('',)
but didn't really do anything in the database.
What is missing there? Any tips/pointers would be greatly appreciated!
Sincerely,
Jerry
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---