Re: [sqlalchemy]why I can't use custom type by form_statement method??

2010-04-20 Thread Cancer
by the way I read some document about how to use text() but it seems when I use text().I got records from database,not instances of class object. I want to get instance anyone can help me ? 2010/4/20 Cancer k.cancer.2...@gmail.com Hi Michael~ thank you very much for your answer~

Re: [sqlalchemy]why I can't use custom type by form_statement method??

2010-04-20 Thread Cancer
o yeah! I solved the question~ these are codes.hope it's useful to someone who have the same question~ crew = query.from_statement(text(SELECT * from crew_member where + rtrim(crew_member.lastname) || rtrim(crew_member.firstname) +

Re: [sqlalchemy] case sensitive Unicode and String columns

2010-04-20 Thread Chris Withers
Michael Bayer wrote: Please let me know if there's a better way! you should use TypeDecorator.load_dialect_impl(dialect), check the name of the dialect, Why the name rather than doing: if isinstance(dialect,MySQLDialect): ? then return either MSString(arguments) or

Re: [sqlalchemy] SQLAlchemy 0.6.0 released

2010-04-20 Thread Diana Clarke
Yes, Congratulations Thank-you! --diana On Sun, Apr 18, 2010 at 8:02 PM, Michael Bayer mike...@zzzcomputing.com wrote: The first official 0.6 release of SQLAlchemy is now available. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to

[sqlalchemy] docs for TypeDecorators

2010-04-20 Thread Chris Withers
Hi All, Are there any other docs for using and creating TypeDecorators than these: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#custom-types The following sections: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator.__init__

[sqlalchemy] Re: SQLAlchemy 0.6.0 released

2010-04-20 Thread Gerry Reno
Congratulations Mike and contributors. This is an important milestone in the evolution of SQLAlchemy. Thanks for all the hard work. -Gerry On Sun, Apr 18, 2010 at 8:02 PM, Michael Bayer mike...@zzzcomputing.com wrote: The first official 0.6 release of SQLAlchemy is now available. --

Re: [sqlalchemy] case sensitive Unicode and String columns

2010-04-20 Thread Michael Bayer
Chris Withers wrote: Michael Bayer wrote: Please let me know if there's a better way! you should use TypeDecorator.load_dialect_impl(dialect), check the name of the dialect, Why the name rather than doing: if isinstance(dialect,MySQLDialect): you could do that too, though the name is

Re: [sqlalchemy] bug in sqllite dialect?

2010-04-20 Thread Michael Bayer
Chris Withers wrote: Michael Bayer wrote: Chris Withers wrote: Michael Bayer wrote: Has anyone (hi, list, talking to you too!) already done a custom type for this specific problem? people do custom types for all sorts of things. In the case of the Decimal here I'd likely subclass

Re: [sqlalchemy] docs for TypeDecorators

2010-04-20 Thread Michael Bayer
Chris Withers wrote: Hi All, Are there any other docs for using and creating TypeDecorators than these: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#custom-types The following sections:

Re: [sqlalchemy] docs for TypeDecorators

2010-04-20 Thread Chris Withers
Michael Bayer wrote: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator.__init__ ...are a little less detailed than they could be ;-) Let me talk to one of our committers to see if they can help us. Hey Chris - want to beef up the docs for

Re: [sqlalchemy] bug in sqllite dialect?

2010-04-20 Thread Chris Withers
Michael Bayer wrote: the whole ugly discussion is at http://www.sqlalchemy.org/trac/ticket/1759 Speshul... *sigh* I'm glad I don't have your responsibilities ;-) Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- You

[sqlalchemy] testing?

2010-04-20 Thread Harry Percival
how do I run some self-testing in sqlalchemy? I found this doc, but it seems to be out of date?? http://svn.sqlalchemy.org/sqlalchemy/trunk/README.unittests just for fun, i'm trying to run these tests inside IronPython, so any pointers in that direction would be helpful also.. thx, HP -- You

Re: [sqlalchemy] testing?

2010-04-20 Thread Michael Bayer
Please read the document: http://svn.sqlalchemy.org/sqlalchemy/trunk/README_MOVED_TO_MERCURIAL Harry Percival wrote: how do I run some self-testing in sqlalchemy? I found this doc, but it seems to be out of date?? http://svn.sqlalchemy.org/sqlalchemy/trunk/README.unittests just for

[sqlalchemy] custom dialect with no join syntax support possible?

2010-04-20 Thread Lance Edgar
Hi, I'm writing a new custom dialect for a legacy database (Centura SQLBase 7.5.1) for use in migrating to a new system over time. Everything's gone pretty well, until I needed a join... Whereas most dialects would create a statement such as: SELECT T1.ID, T1.COL1, T2.COL2 FROM T1 JOIN T2 ON

[sqlalchemy] Custom ORM attributes to provide on-the-fly data conversion

2010-04-20 Thread Rhett
I've run into some difficulty getting the ORM to fit into an existing code base with some, I suppose, non-standard conventions. One of the conventions is to not allow primary keys (auto-incremented integers) to be exposed on the front-end servlet or template but to maintain the original integer

Re: [sqlalchemy] custom dialect with no join syntax support possible?

2010-04-20 Thread Michael Bayer
On Apr 20, 2010, at 4:47 PM, Lance Edgar wrote: Hi, I'm writing a new custom dialect for a legacy database (Centura SQLBase 7.5.1) for use in migrating to a new system over time. Everything's gone pretty well, until I needed a join... Whereas most dialects would create a statement such as:

[sqlalchemy] Creating sequence

2010-04-20 Thread Wichert Akkerman
What is the preferred method to have metadata.create_all() create sequences? I tried to find something in the wiki but could not find anything. For indexes you can do this: schema.Index(public_event_idx, Event.workflow, Event.deleted) but a similar statement for a sequence:

Re: [sqlalchemy] Custom ORM attributes to provide on-the-fly data conversion

2010-04-20 Thread Michael Bayer
On Apr 20, 2010, at 7:06 PM, Rhett wrote: I've run into some difficulty getting the ORM to fit into an existing code base with some, I suppose, non-standard conventions. One of the conventions is to not allow primary keys (auto-incremented integers) to be exposed on the front-end servlet

Re: [sqlalchemy] Creating sequence

2010-04-20 Thread Michael Bayer
Sequence has a create() method but doesn't yet link into metadata.create_all() without being assocaited with a Table. So yes you'd use DDL or in 0.6 the CreateSequence() construct. On Apr 20, 2010, at 7:26 PM, Wichert Akkerman wrote: What is the preferred method to have

Re: [sqlalchemy] Custom ORM attributes to provide on-the-fly data conversion

2010-04-20 Thread Michael Bayer
On Apr 20, 2010, at 7:32 PM, Michael Bayer wrote: if you want MyClass.encrypted_id to be available in queries at the class level, this would require a SQL function that does your encryption. See examples/derived_attributes/ for some techniques on that. correction, you'd probably want to

Re: [sqlalchemy] Custom ORM attributes to provide on-the-fly data conversion

2010-04-20 Thread Rhett Garber
On Tue, Apr 20, 2010 at 4:32 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 20, 2010, at 7:06 PM, Rhett wrote: I've run into some difficulty getting the ORM to fit into an existing code base with some, I suppose, non-standard conventions. One of the conventions is to not allow