Re: [sqlalchemy] (newb) approach to localization

2013-09-21 Thread Michael Bayer
On Sep 21, 2013, at 1:27 AM, John Nieri niericent...@gmail.com wrote: Hello, I've searched on this topic but haven't found anything approaching authoritative. I'm also new to DBs and SQLAlchemy although not new to python. I'd like to know if there is some mechanism in SQLAlchemy for the

Re: [sqlalchemy] Create Table scripts failing randomly - scripts work from sqlite3 driver but not sqlalchemy

2013-09-21 Thread monosij . forums
Hi Michael and Simon - Thank you for your responses and help. Sorry I should have provided more details. Putting in the raise gave this error trace blow. It says it cannot execute more than one line at a time. It says the same even if I do not have it in a transaction block, but in this case I

Re: [sqlalchemy] (newb) approach to localization

2013-09-21 Thread John Nieri
Interesting. I think I understand. You are saying that I could make my own type that is, according to my original example, basically a dict with language code keys leading to text in that language. Is that right? It seems so strange that there aren't built-in mechanisms for it. By the way, I

Re: [sqlalchemy] (newb) approach to localization

2013-09-21 Thread Jonathan Vanasco
This bit... title = obj.title[en-US] # or something similar that's very close to how PostgreSQL's HSTORE and JSON columns work with sqlalchemy. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop

[sqlalchemy] another postgresql distinct on question

2013-09-21 Thread Jonathan Vanasco
I can't seem to generate a distinct on(column) query ( .8 branch ) i'm using a connection with an ORM session , and working on an alias this just creates a SELECT DISTINCT column sqlalchemy.select( sqlalchemy.distinct(_slurped.c.object_id).label('object_id') , _ordered.c.event_timestamp)

Re: [sqlalchemy] another postgresql distinct on question

2013-09-21 Thread Michael Bayer
so I think the basic SELECT DISTINCT ON(x) y, z, ... is by sending an argument to the built-in distinct, not the standalone one, that is query.distinct(expr) or select.distinct(expr). On Sep 21, 2013, at 10:26 PM, Jonathan Vanasco jonat...@findmeon.com wrote: I can't seem to generate a