[sqlalchemy] Re: SQLAlchemy 0.4.2b released

2008-01-09 Thread Jon Rosebaugh
On Jan 7, 2008 2:20 PM, Michael Bayer [EMAIL PROTECTED] wrote: 0.4.2b -- - sql - changed name of TEXT to Text since its a generic type; TEXT name is deprecated until 0.5. The upgrading behavior of String to Text when no length is present is also deprecated until

[sqlalchemy] Re: migrating to 0.4: Parent instance is not bound

2008-01-09 Thread Max Ischenko
Hello Paul, On 8 янв, 17:07, Paul Johnston [EMAIL PROTECTED] wrote: Not 100% sure without seeing your model, but you probably want to use session.mapper in place of mapper. That was it, thanks a lot! Max. --~--~-~--~~~---~--~~ You received this message

[sqlalchemy] Problem (bug?) with flush after upgrading to 0.4

2008-01-09 Thread Stefano Bartaletti
Hello , I've built a database with Postgres and some ideas taken from the vertical tables example, and I stumbled on two problems that I think could be bugs In my code I need to get all row IDs from new/mod/del objects, so I added an extension working out objects attached to a session When I

[sqlalchemy] Re: SQLAlchemy 0.4.2b released

2008-01-09 Thread Jorge Godoy
Jon Rosebaugh wrote: What are we supposed to do with Unicode? As far as I can tell, the Unicode type passes its defined length directly to the underlying string, so that a Unicode(30) column is turned into a VARCHAR(30) or the dialect equivalent. I may be able to determine that a particular

[sqlalchemy] Re: SQLAlchemy 0.4.2b released

2008-01-09 Thread Michael Schlenker
Jorge Godoy schrieb: Jon Rosebaugh wrote: What are we supposed to do with Unicode? As far as I can tell, the Unicode type passes its defined length directly to the underlying string, so that a Unicode(30) column is turned into a VARCHAR(30) or the dialect equivalent. I may be able to

[sqlalchemy] String - Text type deprecation

2008-01-09 Thread svilen
what it is about? i'm not much into sql types... isn't Varchar enough for a unsized/anysized String? btw, 'count * from ...' produces the warning for sqlite; a bindparam autoguesses a type_ of VARCHAR and for some reason the VARCHAR also needs length ??

[sqlalchemy] Getting all distinct attribute values of a certain class attribute

2008-01-09 Thread Christoph Zwerschke
Assume I have a class Customers mapped with a contextual mapper to a table customers and assume the customers have an attribute city. Now I want to get all different cities of my customers, starting with 'A', ordered alphabetically. In plain SQL this would be: select distict city from

[sqlalchemy] Re: String type with no length deprecation warnings in 0.4.2b

2008-01-09 Thread Rick Morrison
Alright, I found this annoying little ?!#$* Happens when an MSSQL metadata.drop_all(checkfirst=True) is executed. That causes a query to the INFORMATION_SCHEMA to be run. If you look at databases/information_schema.py, you'll see all the nice non-length strings that are generating the problem.

[sqlalchemy] Re: String type with no length deprecation warnings in 0.4.2b

2008-01-09 Thread Michael Bayer
On Jan 9, 2008, at 11:27 AM, Rick Morrison wrote: Alright, I found this annoying little ?!#$* Happens when an MSSQL metadata.drop_all(checkfirst=True) is executed. That causes a query to the INFORMATION_SCHEMA to be run. If you look at databases/information_schema.py, you'll see all the

[sqlalchemy] Re: SQLAlchemy 0.4.2b released

2008-01-09 Thread Michael Bayer
On Jan 9, 2008, at 3:33 AM, Jon Rosebaugh wrote: On Jan 7, 2008 2:20 PM, Michael Bayer [EMAIL PROTECTED] wrote: 0.4.2b -- - sql - changed name of TEXT to Text since its a generic type; TEXT name is deprecated until 0.5. The upgrading behavior of String to Text

[sqlalchemy] Re: String - Text type deprecation

2008-01-09 Thread Michael Bayer
On Jan 9, 2008, at 5:56 AM, svilen wrote: what it is about? i'm not much into sql types... isn't Varchar enough for a unsized/anysized String? varchars are sized on most DBs, max is 255. btw, 'count * from ...' produces the warning for sqlite; a bindparam autoguesses a type_ of VARCHAR

[sqlalchemy] string-text message is broke

2008-01-09 Thread Michael Bayer
will fix today - m --~--~-~--~~~---~--~~ 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 [EMAIL

[sqlalchemy] Re: String type with no length deprecation warnings in 0.4.2b

2008-01-09 Thread Rick Morrison
actually that explaination makes no sense. the warning is only raised when that _for_ddl flag is True which should *only* occur during CREATE TABLE. the issue is only with CREATE TABLE. Well, here's the traceback: - main.metadata.drop_all(checkfirst=True)

[sqlalchemy] can everyone try r4032 please (was: string-text message is broke)

2008-01-09 Thread Michael Bayer
we're going to put out some other UOW related fixes today along with this. --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: in operator and literal list

2008-01-09 Thread Eoghan Murray
On Jan 8, 11:13 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jan 8, 2008, at 5:40 PM, Eoghan Murray wrote: On Jan 8, 7:28 pm, Jonathan Gardner [EMAIL PROTECTED] wrote: Eoghan Murray wrote: Ideally this would be expressed as: MyTable.filter(MyTable.c.MyColumn.in(ls)) Try:

[sqlalchemy] Re: can everyone try r4032 please (was: string-text message is broke)

2008-01-09 Thread Rick Morrison
Runs clean here now -- thanks! --~--~-~--~~~---~--~~ 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 [EMAIL

[sqlalchemy] Re: Problem (bug?) with flush after upgrading to 0.4

2008-01-09 Thread Michael Bayer
On Jan 9, 2008, at 4:07 AM, Stefano Bartaletti wrote: I've checked the source and to me end of line 161 should be and x._state.is_modified()) Please advise, thanks this bug is fixed in r4033. thanks for spotting it ! --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: Getting all distinct attribute values of a certain class attribute

2008-01-09 Thread Michael Bayer
On Jan 9, 2008, at 6:57 AM, Christoph Zwerschke wrote: Now I want to get all different cities of my customers, starting with 'A', ordered alphabetically. In plain SQL this would be: ... But this does not work, since the select statement does not return the attribute set of the Customer

[sqlalchemy] Re: Getting all distinct attribute values of a certain class attribute

2008-01-09 Thread Christoph Zwerschke
Michael Bayer wrote: The basic request to get cities as strings by themselves should be easy enough as: select([Customer.city]).distinct().order_by( Customer.city).execute().fetchall() That's exactly what I wanted - and yes, that's really easy. we will eventually have a

[sqlalchemy] Re: Many to many and orphan deletion

2008-01-09 Thread Laurent Houdard
Can anybody help me ? ...No one ?? --~--~-~--~~~---~--~~ 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] Re: Many to many and orphan deletion

2008-01-09 Thread Michael Bayer
On Jan 4, 2008, at 9:07 AM, Laurent Houdard wrote: I have nodes with a self-referential parent-child one-to-many relation, and a many-to-many relation between nodes and keywords. I would like to manage orphan keywords. It doesn't work with cascade=delete-orphan which is not adapted to

[sqlalchemy] Re: MSSQL and LIMIT/OFFSET

2008-01-09 Thread Esceo
Something more is probably needed. adding row_number will render a distinct clause useless... need to form an inner select with the original select, and at the same time, make sure the order_by clause of the row_number field gets rewritten, I had a patch for 0.3 (working in all the cases I've