Re: [sqlalchemy] Re: [Distutils] inability to pass setup.py command line arguments to dependency setups

2010-05-07 Thread Gaetan de Menten
FWIW, it is perfectly possible to package the thing separately as Glyph seem to suggest, even if the feature is enabled through an option. For example, Debian does it: http://packages.debian.org/experimental/python-sqlalchemy-ext On Fri, May 7, 2010 at 19:56, Kent Bower wrote: > Just because ther

Re: [sqlalchemy] PyODBCConnector dbapi question

2010-04-11 Thread Gaetan de Menten
On Fri, Apr 2, 2010 at 21:08, Bo Shi wrote: > Hrm, some different errors pop up.  I'll move the dialog to the ticket > in question. > > http://www.sqlalchemy.org/trac/ticket/1757 Should be fixed now (hopefully). Could you test once more? Thanks, -- Gaëtan de Menten -- You received this messag

Re: [sqlalchemy] PyODBCConnector dbapi question

2010-04-02 Thread Gaetan de Menten
On Tue, Mar 30, 2010 at 19:32, Michael Bayer wrote: > Bo Shi wrote: >>> pep 249 specifies "list of tuples" for fetchmany() and fetchall() >> >> Hrm, pep-249 seems to only specify "sequence" and "sequence of >> sequences" for the fetch*() functions, specifying list of tuples only >> as one possible

Re: [sqlalchemy] Re: 0.6 and c extensions

2010-03-21 Thread Gaetan de Menten
On Sun, Mar 21, 2010 at 17:13, drakkan wrote: > On 21 Mar, 14:31, Antoine Pitrou wrote: >> Le dimanche 21 mars 2010 à 02:10 -0700, drakkan a écrit : >> >> > a really interesting feature in sa 0.6 are the c extensions, however I >> > think they should be implemented using ctypes so if python ctype

Re: [sqlalchemy] Problems with 0.6beta1

2010-02-10 Thread Gaetan de Menten
On Wed, Feb 10, 2010 at 09:04, Gaetan de Menten wrote: > On Wed, Feb 10, 2010 at 08:48, Chris wrote: >> Hi All >> >> Have just upgraded to this version and am having the following issue. >> >> I use a the execute method on a ScopedSession to run generic SQL >&

Re: [sqlalchemy] Problems with 0.6beta1

2010-02-10 Thread Gaetan de Menten
On Wed, Feb 10, 2010 at 08:48, Chris wrote: > Hi All > > Have just upgraded to this version and am having the following issue. > > I use a the execute method on a ScopedSession to run generic SQL > Statements in a TextClause,  in the resulting BufferedRowResultProxy > object their used to list fie

Re: [sqlalchemy] manytomany optimisations

2010-02-05 Thread Gaetan de Menten
On Thu, Feb 4, 2010 at 17:25, Andrew wrote: > I have a table of "tasks" which contain references to multiple > children and parents (tasks can have multiple children and multiple > parents in this example). These are defined as ManyToMany and so I get > an extra table containing the links. > > If

Re: [sqlalchemy] Hi,I found a codec bug,and I write a patch.

2010-01-13 Thread Gaetan de Menten
On Wed, Jan 13, 2010 at 10:16, 诚子 wrote: > detial please see > > http://my.unix-center.net/~WeiZhicheng/2010/01/13/sqlalchemy-0-6-unicodedecodeerror-bug-patch/ Well, if I understand correctly, you would like a workaround for a bad truncate algorithm in mysql (which apparently truncates in the mid

[sqlalchemy] Elixir 0.7.1 released

2009-11-16 Thread Gaetan de Menten
I am very pleased to announce that version 0.7.1 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This release packs a few interesting new features (abstract classes and a new collection type providing explicit relative

[sqlalchemy] Re: How to get the character limit of a string or unicode table column

2009-11-15 Thread Gaetan de Menten
On Mon, Nov 16, 2009 at 06:57, BruceC wrote: > I'm trying to implement a character counter on all textarea fields in > my Elixir-SQLA-Pylons app, & need to find a way to determine the > maximum number of characters a given column can hold, so I can supply > the character counter with a "Maximum

[sqlalchemy] Re: odict for mapper properties?

2009-10-19 Thread Gaetan de Menten
On Mon, Oct 19, 2009 at 16:04, Michael Bayer wrote: >> I see in r6413, that you use an ordered dictionary instead of a >> standard one for properties, in an attempt to "fix some jython >> ordering annoyingness". Is this really necessary to be compliant with >> Jython? Would you care to explain?

[sqlalchemy] odict for mapper properties?

2009-10-19 Thread Gaetan de Menten
Hi Mike, I see in r6413, that you use an ordered dictionary instead of a standard one for properties, in an attempt to "fix some jython ordering annoyingness". Is this really necessary to be compliant with Jython? Would you care to explain? I'm quite puzzled as to how that change could have any e

[sqlalchemy] Re: Modifying the scopefunc of an existing ScopedSession

2009-10-14 Thread Gaetan de Menten
On Wed, Oct 14, 2009 at 17:09, Gaetan de Menten wrote: > Btw: Iwan, did you try: > > factory = elixir.session.session_factory > elixir.session.registry = sqlalchemy.util.ScopedRegistry(maker, > scope_func=your_scope_func) Of course, that should read : factory = elixir.session.

[sqlalchemy] Re: Modifying the scopefunc of an existing ScopedSession

2009-10-14 Thread Gaetan de Menten
On Tue, Oct 13, 2009 at 16:49, Michael Bayer wrote: >> We have a situation where we have an existing ScopedSession, but want >> to change its scopefunc.  This sounds like a strange requirement, it >> is because we use elixir - the issue is discusses here: >> http://groups.google.com/group/sqlelix

[sqlalchemy] Re: relation does not honor order_by attribute

2009-10-14 Thread Gaetan de Menten
On Wed, Oct 14, 2009 at 08:34, robert rottermann wrote: > I am using a one to many relation, and would like the result to be ordered by > a > field of the child table. however no order by statement is executed when I > access the related property of the parent object. > > this is my declaration

[sqlalchemy] Elixir 0.7.0 released!

2009-10-01 Thread Gaetan de Menten
I am very pleased to announce that version 0.7.0 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This release incorporates many small improvements and bug fixes across the board. Please look at http://elixir.ematia.de/t

[sqlalchemy] Re: Session.mapper deprecation

2009-09-30 Thread Gaetan de Menten
On Wed, Sep 30, 2009 at 16:57, Michael Bayer wrote: > > Gaetan de Menten wrote: >> I've been trying to work around the Session.mapper deprecation warning >> in Elixir by providing the same functionality within Elixir. The >> question is whether _ScopedExt is consid

[sqlalchemy] Session.mapper deprecation

2009-09-30 Thread Gaetan de Menten
Hi all, I've been trying to work around the Session.mapper deprecation warning in Elixir by providing the same functionality within Elixir. The question is whether _ScopedExt is considered deprecated too ? I guess it is but want to make sure to not duplicate code needlessly... -- Gaëtan de Mente

[sqlalchemy] Re: Session will not commit within a class

2009-08-05 Thread Gaetan de Menten
On Wed, Aug 5, 2009 at 08:13, kportertx wrote: > UGGG!  I have been fighting with this for a while.  I never thought to > just use an actual file for my db instead of using memory.  I was > using memory because I was only wanting to test things and didn't want > to keep the data.  Seems that perh

[sqlalchemy] Re: Session will not commit within a class

2009-08-05 Thread Gaetan de Menten
On Wed, Aug 5, 2009 at 08:16, kportertx wrote: > O on a side note would you recommend elixir over declarative_base? The biggest difference between the two is that Elixir can generate some columns and tables for you (using common "patterns"). Michael Bayer probably won't recommend Elixir since he

[sqlalchemy] Re: sqlalchemy.exc.InvalidRequestError: Object '' is already attached to session '29012560' (this is '30924944')

2009-06-02 Thread Gaetan de Menten
On Sun, May 31, 2009 at 16:50, Michael Bayer wrote: > > > On May 30, 2009, at 1:56 AM, ericthompso...@gmail.com wrote: > >> Upon reaching the instantiation of Foo, my code blows up with the >> error message in the subject.  Now I realize this is often caused by >> threading issues - multiple thre

[sqlalchemy] Re: Trac feed broken

2009-02-17 Thread Gaetan de Menten
On Tue, Feb 17, 2009 at 03:14, Michael Bayer wrote: > it says to me: > > Congratulations! > > [Valid RSS] This is a valid RSS feed. > > im not able to reproduce any issue in the straight FF reader. Seems like somebody else fixed it, because it works today. -- Gaëtan de Menten http://openh

[sqlalchemy] Trac feed broken

2009-02-16 Thread Gaetan de Menten
It seems like there is some bad character in one of the ticket details as it's been a few days since I could access the Trac feed. My feed reader (liferea) complains of: XML Parsing Error: reference to invalid character number Location: file:/// Line Number 20, Column 14:

[sqlalchemy] Article about Elixir/SQLAlchemy in Python Magazine

2009-01-28 Thread Gaetan de Menten
Hi all, For those who might be interested, I wrote an article for Python Magazine titled "Creating a collection manager with Elixir". It has just been published in the January issue (http://www.pythonmagazine.com/c/issue/view/90). Within the article, I detail the creation of a simple collection m

[sqlalchemy] Re: Renaming Columns and Union - possible bug

2008-12-22 Thread Gaetan de Menten
On Mon, Dec 22, 2008 at 17:06, Eoghan Murray wrote: > The following example uses an elixir class: > > class MyE(Entity): >id = Field(Integer, primary_key=True) >f_1 = ManyToOne('OtherE') >f_2 = ManyToOne('OtherE') >date = Field(Date) > > MyE.query.select_from(union(MyE.table.sele

[sqlalchemy] Re: New plugins and data types

2008-12-08 Thread Gaetan de Menten
On Mon, Dec 8, 2008 at 10:31, Kless <[EMAIL PROTECTED]> wrote: > > Thanks! Anyway I've seen that it's better add extensions in Elixir, > into a declarative layer, just as has been made in DataMapper. As I just said on the Elixir mailing list: not really. The ability to add new types is an SQLAlch

[sqlalchemy] Re: SQLAlchemy Sphinx Documentation Preview

2008-12-04 Thread Gaetan de Menten
Here are the suggestions that come to mind: - You should either get rid of, or (preferably) expand/replace the current top-level "table of contents". As it is currently, there is only one useful link in there (API reference) and the table of contents block waste way too much space for just one li

[sqlalchemy] Re: Polymorphic concrete inheritance question

2008-12-03 Thread Gaetan de Menten
On Wed, Dec 3, 2008 at 16:04, Michael Bayer <[EMAIL PROTECTED]> wrote: > this ones big, i can handle it. the attached patch makes your case > work, but the problem represented here still makes itself apparent in > other ways and I havent strength tested this patch. you might want > to see if

[sqlalchemy] Re: Polymorphic concrete inheritance question

2008-12-03 Thread Gaetan de Menten
On Wed, Dec 3, 2008 at 15:03, Michael Bayer <[EMAIL PROTECTED]> wrote: > um yeah, actually this behavior is affecting all multi-level usage of > "polymorphic_union". So, while polymorphic_union is quite obviously > (since nobody has noticed this pretty glaring issue) on the decline in > the 0.5

[sqlalchemy] Polymorphic concrete inheritance question

2008-12-03 Thread Gaetan de Menten
Hello all, I've been playing a bit with polymorphic concrete inheritance, and noticed that when you have several levels of "polymorphic" loading (ie my child class is also a parent class which I want to load polymorphically), the query for the top-level class includes the child polymorphic join wh

[sqlalchemy] Re: Uppercase column names in table.insert({ })

2008-10-01 Thread Gaetan de Menten
On Mon, Sep 29, 2008 at 4:46 PM, Itamar Ravid <[EMAIL PROTECTED]> wrote: > Thanks for the answer, Mike. I was used to Oracle's behavior while writing > raw SQL, in which the case of unquoted column identifiers doesn't matter. > This behavior seems reasonable enough, although the inconsistency betw

[sqlalchemy] Re: Declarative and common fields

2008-09-29 Thread Gaetan de Menten
On Mon, Sep 29, 2008 at 5:01 PM, Joril <[EMAIL PROTECTED]> wrote: > > Hi everyone! > I'm new to SQLAlchemy and I'm using version 0.5rc1.. > I need every entity class to have a few common fields, so I tried > writing an "abstract" base class, declarative-style, that every other > entity class would

[sqlalchemy] Re: Versioning

2008-09-12 Thread Gaetan de Menten
On Fri, Sep 12, 2008 at 4:37 AM, Sam <[EMAIL PROTECTED]> wrote: > > One of the things I really liked about sqlobject was its versioning > plug-in. ( http://www.sqlobject.org/Versioning.html ) > > Is there anything similar for sqlalchemy? A google search turned up > versioned ( http://elixir.emat

[sqlalchemy] Re: SQLite Foreign Key Triggers: how to extend sqlalchemy to generate them

2008-08-27 Thread Gaetan de Menten
On Wed, Aug 27, 2008 at 3:21 AM, Randy Syring <[EMAIL PROTECTED]> wrote: > > Ok, so I was going to try and implement a solution using the method > discussed here, but ran into a problem b/c I am using Elixir objects > and not declaring the tables directly. Can I still use this method? > How do I

[sqlalchemy] Re: declarative

2008-08-21 Thread Gaetan de Menten
On Thu, Aug 21, 2008 at 2:06 PM, Jim Jones <[EMAIL PROTECTED]> wrote: > > On Tue, 2008-08-19 at 16:16 -0400, Michael Bayer wrote: >> >> On Aug 19, 2008, at 4:07 PM, Gaetan de Menten wrote: >> >> > Simpler than Elixir? How so? If you are speaking about the

[sqlalchemy] Re: declarative

2008-08-19 Thread Gaetan de Menten
On Tue, Aug 19, 2008 at 8:54 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Aug 19, 2008, at 2:43 PM, Jose Galvez wrote: > >> >> What is the proposed stability of declarative functions which I guess >> are pretty new. From what I've read so far I really like it and was >> thinking of using

[sqlalchemy] Elixir 0.6.1 released!

2008-08-18 Thread Gaetan de Menten
I am very pleased to announce that version 0.6.1 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This is a minor release featuring some bug fixes (one of them to handle a late rename in SQLAlchemy's 0.5 beta cycle), a n

[sqlalchemy] Elixir 0.6.0 released!

2008-07-22 Thread Gaetan de Menten
I am very pleased to announce that version 0.6.0 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. Please look at: http://elixir.ematia.de/trac/wiki/Migrate05to06 for detailed upgrade notes. Here are the highlights for t

[sqlalchemy] Re: Polymorphic association woes

2008-07-03 Thread Gaetan de Menten
GenericAssoc's from the second Session usage present. Jeeez. I hate myself for thinking it was some complex thing related to the pattern used and not even looking further... > ahh yes i had this same a week ago but i forgot. > so is u2=session.merge(u2) a cure? > i used it on some

[sqlalchemy] Polymorphic association woes

2008-07-03 Thread Gaetan de Menten
Hi list, Could anybody tell me what's wrong with the following code? It's only the code in the poly_assoc example directory (the generic version) where I'm trying to set the polymorphic part of the relationship. It gets me the traceback below and I don't really understand why: Traceback (most rec

[sqlalchemy] Re: Operations on instance identity criterion with Many-to-Many self-relational table

2008-06-27 Thread Gaetan de Menten
On Fri, Jun 27, 2008 at 2:44 PM, MuTPu4 <[EMAIL PROTECTED]> wrote: > I have table wordforms and WordformMapping associated with it. Bi- > directional self-relation is expressed by using association table with > attributes named "infinitives" and "forms". I am using Elixir for > mapping definition

[sqlalchemy] Item count along object results

2008-06-23 Thread Gaetan de Menten
Hi list, Is there really no easier/nicer way to get a count of items alongside object results than the one described at: http://www.sqlalchemy.org/docs/05/ormtutorial.html#datamapping_joins_subqueries ? >>> from sqlalchemy.sql import func >>> stmt = session.query(Address.user_id, >>> func.count

[sqlalchemy] Re: Object is already attached to session

2008-06-13 Thread Gaetan de Menten
On Thu, Jun 12, 2008 at 4:58 PM, bollwyvl <[EMAIL PROTECTED]> wrote: > > I am running into similar problems, adding to the complexity the > threadpool module. > > Here's a post that might help: > http://blog.uxpython.com/blog/web/view/116 > > I am still running into problems, however, based on par

[sqlalchemy] Re: SQLAlchemy experts wanted

2008-05-19 Thread Gaetan de Menten
On Fri, May 16, 2008 at 9:23 PM, Jim R. Wilson <[EMAIL PROTECTED]> wrote: > > Hi all, > > SQLAlchemy is a great project and a growing niche. As it becomes even > more popular, there will be increasing demand for experts in the > field. > > I am compiling a contact list of SQLAlchemy experts who m

[sqlalchemy] Re: Concrete inheritance woes

2008-04-29 Thread Gaetan de Menten
On Tue, Apr 29, 2008 at 12:11 PM, Gaetan de Menten <[EMAIL PROTECTED]> wrote: > On Mon, Apr 28, 2008 at 10:33 PM, Michael Bayer > <[EMAIL PROTECTED]> wrote: > > In any case the unit tests which you were working from (im guessing > > test/orm/inheritance/con

[sqlalchemy] Re: Concrete inheritance woes

2008-04-29 Thread Gaetan de Menten
On Mon, Apr 28, 2008 at 10:33 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > pjoin = polymorphic_union(...) > pjoin2 = polymorphic_union(...) > > employee_mapper = mapper(Employee, pjoin, polymorphic_on=pjoin.c.type) > manager_mapper = mapper(Manager, managers_table, > inherits=employee_mapp

[sqlalchemy] Concrete inheritance woes

2008-04-28 Thread Gaetan de Menten
Hi there, I've been playing with concrete inheritance a bit these days (trying to implement it into Elixir). I've run into several problems, which might be known limitations, but I'd like to know for sure or be shown what I've done wrong... The two problems I get involve a chain of classes inheri

[sqlalchemy] Elixir 0.5.2 released!

2008-03-28 Thread Gaetan de Menten
I am very pleased to announce that version 0.5.2 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This is a minor bug fixes release (mostly restoring python 2.3 compatibility). The full list of changes can be seen at: h

[sqlalchemy] Minor type complaints

2008-03-10 Thread Gaetan de Menten
Hi guys, Lately, I've upgraded some of my applications to the latest SQLAlchemy version and have some minor complaints about the String with no length to Text move: - if you used the Unicode type with no length, you're still told in the warning to use "Text" instead, which makes it a bit confusin

[sqlalchemy] Query for an empty to_many relationship?

2008-02-25 Thread Gaetan de Menten
Hello all, I'm puzzled as I cannot seem to do a pretty simple query: I have a many to many relationship (say from Vendor to Item) and want to get a list of all vendors which have no item. The obvious: Vendor.query.filter(Vendor.items == []).all() does not work (it produce a query without any whe

[sqlalchemy] Elixir 0.5.1 released!

2008-02-07 Thread Gaetan de Menten
I am very pleased to announce that version 0.5.1 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This is mostly a bug fixes release (especially for people using inheritance), but we have also a few minor new features, i

[sqlalchemy] Re: New records won't be committed (ORM, Elixir)

2008-02-04 Thread Gaetan de Menten
On Feb 4, 2008 12:08 PM, Felix Schwarz <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm chasing a very nasty bug in my TurboGears-Application > (using SQLAlchemy r4116, Elixir 0.5): I create a new object > and flush that session (ScopedSession) but there is no COMMIT > issued and therefore the data is n

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-30 Thread Gaetan de Menten
On Jan 25, 2008 9:18 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jan 25, 2008, at 2:02 PM, Kumar McMillan wrote: > > > > > On Jan 25, 2008 11:58 AM, Michael Bayer <[EMAIL PROTECTED]> > > wrote: > >> > >> The Session.mapper function is not worth it, in my opinion, it exists > >> due to t

[sqlalchemy] Re: odd question

2008-01-30 Thread Gaetan de Menten
On Jan 23, 2008 10:24 PM, Monty Taylor <[EMAIL PROTECTED]> wrote: > > This may or may not be elixir specific... > > If I have an auto-generated mapping table for a many-to-many > relationship, is there a sensible way to add another column to it that's > also has a foreign key relationship to a thi

[sqlalchemy] Re: 0.4 deprecation warnings, what is the new get_by/select_by?

2007-12-20 Thread Gaetan de Menten
On Dec 20, 2007 8:50 AM, iain duncan <[EMAIL PROTECTED]> wrote: > > Sorry if this seems a stupid question, but I thought that Mike had said > that in sa0.4, if you used session_context that this > > User.query.get_by(name='john') > > was the replacement for the old assign mapper convenience call.

[sqlalchemy] Fwd: [elixir] warnings on exit

2007-12-13 Thread Gaetan de Menten
Since this is not specific to Elixir and I don't know what could be the problem, I'm forwarding this to the SQLAlchemy list. You can watch that list for the answer (which will hopefully be given) or wait until I forward that answer to the Elixir list. -- Forwarded message -- From:

[sqlalchemy] Elixir 0.5.0 released!

2007-12-08 Thread Gaetan de Menten
I am very pleased to announce that version 0.5.0 of Elixir (http://elixir.ematia.de) is now available. As always, feedback is very welcome, preferably on Elixir mailing list. This is mostly a bug fixes release, but we have also had some pretty important changes to the default values for options.

[sqlalchemy] Fwd: [elixir] sqlite3.OperationalError: Could not decode to UTF-8 column

2007-12-05 Thread Gaetan de Menten
Anybody knows about this? -- Forwarded message -- From: Mitch <[EMAIL PROTECTED]> Date: Dec 5, 2007 1:06 AM Subject: [elixir] sqlite3.OperationalError: Could not decode to UTF-8 column To: SQLElixir <[EMAIL PROTECTED]> Apologies in advance if this should be sent to the SQLAlchemy

[sqlalchemy] Re: filter_by VS python properties/descriptors VS composite properties

2007-11-20 Thread Gaetan de Menten
On Nov 20, 2007 5:23 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Nov 20, 2007, at 4:37 AM, Gaetan de Menten wrote: > > I have some classes with "standard python" properties which target > > another python object and also uses several columns in the da

[sqlalchemy] Re: filter_by VS python properties/descriptors VS composite properties

2007-11-20 Thread Gaetan de Menten
On Nov 20, 2007 11:51 AM, svilen <[EMAIL PROTECTED]> wrote: > > > On Tuesday 20 November 2007 11:37:29 Gaetan de Menten wrote: > > Hi people, > > > > I have some classes with "standard python" properties which target > > another python object and

[sqlalchemy] Re: filter_by VS python properties/descriptors VS composite properties

2007-11-20 Thread Gaetan de Menten
in my "example", i speak about filter and filter_by. > you'll have to have whatever your property returns support > __eq__) Of course. > > On Nov 20, 4:37 am, "Gaetan de Menten" <[EMAIL PROTECTED]> wrote: > > Hi people, > > > > I have som

[sqlalchemy] filter_by VS python properties/descriptors VS composite properties

2007-11-20 Thread Gaetan de Menten
Hi people, I have some classes with "standard python" properties which target another python object and also uses several columns in the database. I also got a global factory function to create an instance of that target object out of the value of the columns (the class of that target object can

[sqlalchemy] Re: How to get list of relations

2007-10-30 Thread Gaetan de Menten
On 10/30/07, Paul Johnston <[EMAIL PROTECTED]> wrote: > Mike, > > > > use mapper.get_property(name) and mapper.iterate_properties (). I've > > considered removing "properties" as a public accessor since it serves > > no useful purpose. > > > > This doesn't work for me - the following code output

[sqlalchemy] Elixir 0.4.0 released!

2007-10-29 Thread Gaetan de Menten
I am very pleased to announce that version 0.4.0 of Elixir is now available. As always, feedback is very welcome, preferably on Elixir mailing list. Highlights for this release - - Implemented a new attribute-based syntax to declare fields and relationships,

[sqlalchemy] Re: FYI: AutoCode moved to a new repository

2007-10-12 Thread Gaetan de Menten
On 10/12/07, Simon Pamies <[EMAIL PROTECTED]> wrote: > > On Oct 12, 10:09 am, "Gaetan de Menten" <[EMAIL PROTECTED]> wrote: > > I couldn't agree more. I mean: shouldn't the "autoload" part be > > integrated into SQLAlchemy reflection ca

[sqlalchemy] Re: FYI: AutoCode moved to a new repository

2007-10-12 Thread Gaetan de Menten
I couldn't agree more. I mean: shouldn't the "autoload" part be integrated into SQLAlchemy reflection capability if it can do more than SQLAlchemy 0.4 currently support (or simply removed if it doesn't do more)? And I fact, I think the formatting part could also be integrated into SQLALchemy prop

[sqlalchemy] Re: Elixir

2007-09-21 Thread Gaetan de Menten
On 9/20/07, Christine <[EMAIL PROTECTED]> wrote: > Any elixir fans? Any idea on when it will finally be made an > extension? Let me know. Not sure. I'd like to answer: "When it's ready". But ven when it'll be ready, this might not happen. There would be some positive points to that, but also som

[sqlalchemy] Re: Elixir performance

2007-09-06 Thread Gaetan de Menten
On 9/5/07, Paul Johnston <[EMAIL PROTECTED]> wrote: > >data. I did some benchmarks a while back to see how everything > >stacked up as I was wondering if I was doing everything the hard way > >(in C++) instead of using SqlAlchemy, etc. TurboEntity is the same as > > > > > Great work Eric. > > I

[sqlalchemy] Re: Elixir performance

2007-09-04 Thread Gaetan de Menten
On 9/4/07, Acm <[EMAIL PROTECTED]> wrote: > > I am trying out Elixir 0.3.0 over SQLAlchemy 0.3.10 in a Python 2.5 > environment. > > Are there any known performance issues with Elixir for CRUD (Create > Select Update Delete) commands? Not that I know of. There shouldn't be any overhead (over raw

[sqlalchemy] Re: One To Many Polymorphic Association.

2007-08-24 Thread Gaetan de Menten
You might be interested by: http://techspot.zzzeek.org/?p=13 (also in the examples directory of SQLAlchemy) On 8/24/07, praddy <[EMAIL PROTECTED]> wrote: > > ## > from sqlalchemy import * > meta = BoundMetaData('sqlite://', echo=False) > >

[sqlalchemy] Re: all() or list() ?

2007-08-01 Thread Gaetan de Menten
On 8/1/07, Alexandre CONRAD <[EMAIL PROTECTED]> wrote: > I'm realizing that I've been using .list() to query objects. But all the > examples in the docs talk about .all(). > > What's the difference ? Should I switch to .all() rather than .list() ? > Will list be deprecated in 0.4 ? Exactly. lis

[sqlalchemy] Re: Single table inheritance and mapping against a selectable

2007-07-27 Thread Gaetan de Menten
On 7/28/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > those are fine with me. if someone could add a ticket and/or > implement that would be helpful. http://www.sqlalchemy.org/trac/ticket/696 -- Gaëtan de Menten http://openhex.org --~--~-~--~~~---~--~~ You re

[sqlalchemy] Re: Single table inheritance and mapping against a selectable

2007-07-27 Thread Gaetan de Menten
On 7/27/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jul 27, 2007, at 4:03 PM, Gaetan de Menten wrote: > > >> so do you just want "explicit_columns=True" so that no auto-grabbing > >> of columns occurs ? > > > > I don'

[sqlalchemy] Re: a renaming proposal

2007-07-27 Thread Gaetan de Menten
On 7/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Friday 27 July 2007 21:26:51 jason kirtland wrote: > > svilen wrote: > > > Anyway it may depend which audience are u targeting with these > > > names - those who never seen an API or those for which names are > > > important only to

[sqlalchemy] Re: Single table inheritance and mapping against a selectable

2007-07-27 Thread Gaetan de Menten
On 7/27/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jul 27, 2007, at 8:34 AM, Gaetan de Menten wrote: > > > First, it complained there was no alias, while I *think* aliases > > should only be necessary when the query is used in a subquery, but > > a

[sqlalchemy] Single table inheritance and mapping against a selectable

2007-07-27 Thread Gaetan de Menten
Hi all, The way single table inheritance works seem a bit "unclean" to me: all columns are available as properties in all classes. Even if they map to the same table, ideally each object should only have a subset of columns available, right? SQLAlchemy can't guess which object has which columns, s

[sqlalchemy] Re: a renaming proposal

2007-07-27 Thread Gaetan de Menten
On 7/27/07, svilen <[EMAIL PROTECTED]> wrote: > On Friday 27 July 2007 02:45:12 jason kirtland wrote: > - Catalog: > what is a sqlalchemy's metadata? > >jason> "a catalog of tables available in the database." > to me it holds everything about the "subset of database structure", > used in the app

[sqlalchemy] Re: Consistency with DB while modifying metadata

2007-07-25 Thread Gaetan de Menten
On 7/24/07, svilen <[EMAIL PROTECTED]> wrote: > > > >> assert t.compare(t2) > > > > > > yes i was hoping for such method (:-) > > > And the best will be if it can produce a list/ hierarchy of > > > differences, which then programaticaly can be iterated - and > > > checked and resolved or raised hi

[sqlalchemy] Re: Consistency with DB while modifying metadata

2007-07-25 Thread Gaetan de Menten
On 7/25/07, svilen <[EMAIL PROTECTED]> wrote: > > > i just saw there is some usagerecipe ModelUpdate in the wiki, may > > be a good start point: > > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/ModelUpdate > > > and this one: > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode As I sa

[sqlalchemy] Insert through ORM performance (was: Performance question)

2007-07-19 Thread Gaetan de Menten
[in response to a batch-insert-is-slow complaint on the Elixir list] On 7/19/07, AndCycle <[EMAIL PROTECTED]> wrote: > > I don't think db define is the major problem, > it could be sqlalchemy's problem, > because currently it haven't implement real transaction command in > most db implementation,

[sqlalchemy] Re: Query.get with unordered multiple-column-primary-key

2007-06-13 Thread Gaetan de Menten
On 6/13/07, Roger Demetrescu <[EMAIL PROTECTED]> wrote: > > Hi Michael, > > On 6/13/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > > > On Jun 13, 2007, at 8:48 AM, Roger Demetrescu wrote: > > > But the use of this function is to ugly to my taste (I know, the > > > "give_me_pk_values_in_corre

[sqlalchemy] Query.get with unordered multiple-column-primary-key

2007-06-12 Thread Gaetan de Menten
Hi, Anybody knows how I could emulate the behavior of Query.get (ie get the result from the session if possible instead of always fetching from the db) if I have the values for the different columns of the primary as keyword arguments (ie not in the order of the columns of the initial table)? I n

[sqlalchemy] Re: PROPOSAL: whack query.select(), selectfirst(), selectone(), select_by(), selectfirst_by(), selectone_by(), get_by(), "auto-join" feature

2007-06-12 Thread Gaetan de Menten
On 6/12/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > we have, in fact, made a tip of the hat to SAT analogy questions > ("selecting everything is to all() as selecting just the first row is > to: a. scalar() b. first() c. list()[0]"). I've already said it earlier but since you didn't comment

[sqlalchemy] Re: PROPOSAL: whack query.select(), selectfirst(), selectone(), select_by(), selectfirst_by(), selectone_by(), get_by(), "auto-join" feature

2007-06-05 Thread Gaetan de Menten
On 6/4/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jun 3, 2007, at 10:33 PM, Michael Bayer wrote: > > > one() raises an exception when theres not exactly one result, scalar > > () does not. currently we have selectfirst() and selectone(), people > > seem to like the dichotomy. [0] spec

[sqlalchemy] Re: PROPOSAL: whack query.select(), selectfirst(), selectone(), select_by(), selectfirst_by(), selectone_by(), get_by(), "auto-join" feature

2007-06-03 Thread Gaetan de Menten
On 6/3/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > - the methods select(), selectfirst(), selectone(), select_by(), > selectfirst_by(), selectone_by() and get_by() would be deprecated. > this means they will remain present on the Query object but the > documentation would be reorganized to tal

[sqlalchemy] Re: [PATCH] filter_by_via

2007-06-03 Thread Gaetan de Menten
On 6/2/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Jun 2, 2007, at 6:02 AM, Gaetan de Menten wrote: > > > Hmmm, after some more thoughts there is one little aspect of that > > which bothers me: once you joined to something, you can't add > > filt

[sqlalchemy] Re: [PATCH] filter_by_via

2007-06-02 Thread Gaetan de Menten
On 6/2/07, Gaetan de Menten <[EMAIL PROTECTED]> wrote: > IMHO, this solves my use case nicely. It's slightly longer than what I > proposed but doesn't reach my internal "this_is_too_long_to_type" > threshold and it's more explicit... > > So

[sqlalchemy] Re: [PATCH] filter_by_via

2007-06-02 Thread Gaetan de Menten
IMHO, this solves my use case nicely. It's slightly longer than what I proposed but doesn't reach my internal "this_is_too_long_to_type" threshold and it's more explicit... So for me it's a +1 for that solution (along with documenting the joinpoint behavior ;-)). On 6/2/07, Michael Bayer <[EMAIL

[sqlalchemy] Re: assign_mapper query methods

2007-06-01 Thread Gaetan de Menten
On 6/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > On Jun 1, 11:37 am, Christoph Haas <[EMAIL PROTECTED]> wrote: > > sooner or later. Am I right that we are just talking of > > > > john = session.query(User).get_by(name="john") > > > > versus > > > > john = User.get_by(name="john"

[sqlalchemy] Re: assign_mapper query methods

2007-06-01 Thread Gaetan de Menten
For what it's worth I personally vote to get rid of all those query methods (except query() itself, of course). On 6/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > as it turns out, assign_mapper's monkeypatched methods (and they are > all monkeypatched, not sure why you singled out query()) d

[sqlalchemy] Re: Multiple tables forming one class?

2007-05-07 Thread Gaetan de Menten
And btw, in case I didn't understand what you wanted and you really wanted to map one class to several tables, you'll find information about that there: http://www.sqlalchemy.org/docs/adv_datamapping.html#advdatamapping_joins On 5/7/07, Gaetan de Menten <[EMAIL PROTECTED]> wr

[sqlalchemy] Re: Multiple tables forming one class?

2007-05-07 Thread Gaetan de Menten
On 5/7/07, Spider <[EMAIL PROTECTED]> wrote: > > I'm fairly new to this, and trying to understand the ORM relationship > between a class and a table row. In most of the examples in the > documentation, there is a one-to-one relationship; a class instance > corresponds to a row of a table. > > In m

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-30 Thread Gaetan de Menten
On 4/30/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > turns out scalar columns already worksince they are > just...columns ! which ColumnProperty already handles. That's what I tried to get at... that it was supposed to "just work"... > any old SA > version will allow the test script to wo

[sqlalchemy] Re: How do you get the underlying sql (without executing it) from a Statement or a compiled_statement?

2007-04-30 Thread Gaetan de Menten
Just use print your_statement_variable Or, if you need it in a variable: str(your_statement_variable) should do the trick. On 4/30/07, vinjvinj <[EMAIL PROTECTED]> wrote: > > Is there any way to have sqlalchemy return the sql that it is going to > execute without actually executing it? I'm u

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-27 Thread Gaetan de Menten
On 4/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Apr 26, 2007, at 4:40 AM, Gaetan de Menten wrote: > > > >> - the biggest picture not here - its read only ! > > > > It's obviously meant to be that way... So I don't see a problem he

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-26 Thread Gaetan de Menten
On 4/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Apr 26, 2007, at 4:40 AM, Gaetan de Menten wrote: > > >> - you have an aggregate function there. wheres the GROUP > >> BY ? not > >> just of the main table's columns but any other colu

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-26 Thread Gaetan de Menten
On 4/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Apr 25, 2007, at 3:52 PM, Gaetan de Menten wrote: > > > It's better with the attachments (the actual patch and a small > > demonstration/test file)... > > > > On 4/25/07, Gaetan de Menten

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-25 Thread Gaetan de Menten
It's better with the attachments (the actual patch and a small demonstration/test file)... On 4/25/07, Gaetan de Menten <[EMAIL PROTECTED]> wrote: > Ok, I'm quite a bit stubborn at times, so I implemented this the way I > thought because I think it makes much more sense thi

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-25 Thread Gaetan de Menten
k it should be quite easily fixable. - As always, I'm not attached to the names I've given. On 4/24/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Apr 24, 2007, at 4:44 AM, Gaetan de Menten wrote: > > > > >> the next way is to do it almost th

[sqlalchemy] Re: Generative query methods for aggregates.

2007-04-25 Thread Gaetan de Menten
On 4/24/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Apr 24, 2007, at 5:42 AM, Gaetan de Menten wrote: > > > Here is an experimental patch to add generative aggregate methods on > > query objects. > > > > My use case is that I have a class w

  1   2   >