[sqlalchemy] obtaining * field when more than 1 table

2011-09-15 Thread RVince
Suppose I wish to do something like: Session.query(Files.original_name, MSPResponse.* because MSPResponse table has so many fields, and I want to get them all. How do I do this given that I am also picking field(s) from other tables ? Thanks RVince -- You received this message because you

[sqlalchemy] Case-insensitive select

2011-08-31 Thread RVince
= 'smith'; Is there a way to do this type of case- insensitive comparison at the SQLAlchemy level? Thanks RVince -- 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

[sqlalchemy] Softcoding .filter(...)

2011-08-12 Thread RVince
this? Thanks, RVince -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit

[sqlalchemy] Re: Softcoding .filter(...)

2011-08-12 Thread RVince
= q.filter(lastname == 'smith') can I? RVince On Aug 12, 10:33 am, Mark Erbaugh m...@microenh.com wrote: On Aug 12, 2011, at 10:21 AM, RVince wrote: I'm trying to discern a means of creating a .filter(A rel B) where the values for A, rel and B come from an parameters passed in to the web

[sqlalchemy] Re: Softcoding .filter(...)

2011-08-12 Thread RVince
Wickert, can you give me an example ? I'm a little confused by this posts of yours. RVince On Aug 12, 12:20 pm, Wichert Akkerman wich...@wiggy.net wrote: On 08/12/2011 05:52 PM, NiL wrote: say you want to filter on the 'field' (field would be a string representing the name of the field

[sqlalchemy] Re: Softcoding .filter(...)

2011-08-12 Thread RVince
Thanks to all you guys. Really. I didn't think I would be able to do this! RVince -- 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

[sqlalchemy] Working with a ResultProxy object

2011-08-02 Thread RVince
. I am quite certain this is becuase I am using a ResultProxy object. How can I output such an object inthe mako files, or alternatively, how might i convert a ResultProxy objectsuch that I can output it in a mako file? Thanks! RVince -- You received this message because you are subscribed

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
with this. RVince On Aug 2, 9:26 am, Tamás Bajusz gbt...@gmail.com wrote: On Tue, Aug 2, 2011 at 3:07 PM, RVince rvinc...@gmail.com wrote: In my controller class, I perform a rather basic, straightforward SQL query:        connection = engine.connect()        trans = connection.begin()        try

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
Michael, Right, thats a better idea -- I am working with snippets of other people's code here. However, I still have the original problem of going from a ResultProxy object to output in a mako file which is a chasm I cannnot seem to bridge! RVInce On Aug 2, 10:06 am, Michael Bayer mike

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
values -- is there something obvious that I am missing here? Thanks so much for your help here. RVince -- 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

[sqlalchemy] Re: Working with a ResultProxy object

2011-08-02 Thread RVince
LOL,I'm going backwards here, and taking far too long to get something so very simple done (there's a genuine lack of documentation here I think -- the only way to manage to learn much of this is by trial and error). Rather than trying to do this with straight SQL statements I will go plan B here

[sqlalchemy] Archiving PostgresSQL tables

2011-07-19 Thread RVince
I have about half a dozen PostgresSQL tables I need to zip/tar or gz up somehow, from within Python for archival/backup purposes. Anyone know of an example of this, or some idea how to do or approach this? Thanks, RVince -- You received this message because you are subscribed to the Google

[sqlalchemy] Problem using ResultProxy

2011-07-01 Thread RVince
module. You can provide a list, a tuple, a SQLAlchemy select object or a SQLAlchemy ORM-query object. Is there a way I can casr this ResultProxy obect to a usable object here (like tuples?) Thanks, RVince -- You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: Problem using ResultProxy

2011-07-01 Thread RVince
Brilliant! Thank you Connor. -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options,

[sqlalchemy] fail on save_or_update()

2011-06-15 Thread RVince
or classes in the model sm = sessionmaker(autoflush=True, autocommit=False, bind=engine) meta.engine = engine meta.Session = scoped_session(sm) Thanks, RVince -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] TRUNCATE sql statement

2011-06-02 Thread RVince
missing something obviouis to others in trying to do this? Thanks, RVince -- 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 sqlalchemy+unsubscr

[sqlalchemy] Re: TRUNCATE sql statement

2011-06-02 Thread RVince
I found the answer. I needs to be wrapped in a transaction, like this: engine = engine_from_config(config, 'sqlalchemy.') connection = engine.connect() trans = connection.begin() try: connection.execute('truncate table cms_history;')

[sqlalchemy] Re: Referencing col from a joined table

2011-04-21 Thread RVince
'middle_initial' In this kind of circumstance of joined tables, in the python code itself (the Pylons controller, actually) how would I refer to the member table's middle_initial field where the members table is joined in with a left outer join via SQLAlchemy? Thanks again -RVince -- You

[sqlalchemy] Re: Referencing col from a joined table

2011-04-21 Thread RVince
Are you sure? Because I can already access those fields from he mako page from that query -- shouldn't I be able to access them in the Puython controller of that page? -RVince On Apr 21, 4:07 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 21, 2011, at 12:48 PM, RVince wrote

[sqlalchemy] Referencing col from a joined table

2011-04-20 Thread RVince
$ {result.members_1_last_name}..nothing. I have looked through the docs like crazy and just canot find what the syntax should be to access the members (the left outer joined) table in this.Thanks, RVince -- You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: Referencing col from a joined table

2011-04-20 Thread RVince
You are the man. That was it! Thanks so much. -RVince -- 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 sqlalchemy+unsubscr