[Dbix-class] Announcing the trial run towards 0.08200

Alexander Hartmaier alexander.hartmaier at t-systems.at
Fri Feb 11 20:58:55 GMT 2011


I've installed it almost two weeks ago on my notebook where I do almost
all development work and haven't had a problem with it since, great
work!
Note that I didn't try to use the new extended relations as they will
only be useful when they gain per-execute bind value support.

--
Best regards, Alex


On Tue, 2011-01-25 at 10:42 +0100, Peter Rabbitson wrote:
> Hi there. Last night DBIx-Class-0.08190-TRIAL made its way to CPAN. It is
> identical to 0.08127 except for the fact it supports a long anticipated
> feature: completely arbitrary relationship conditions are finally here!
>
> You may be wondering what is the -TRIAL all about (and why you can not
> cpan DBIx::Class this release): well, we do not want to take chances of
> breaking your existing code. While the dev team is pretty confident about
> the implementation of this feature, we also recognize that there is a lot
> of code out there on the DarkPAN which utilizes various hacks to get
> around the lack of this very same feature. As such 0.08190 marks the
> start of a month-long trial period to allow sufficient testing for all
> interested in upgrading. So please *please* *PLEASE* do test this release
> and let us know of any and all problems you may encounter. We especially
> need feedback from folks using custom {from} attributes in their search()
> calls - there is a small but notable chance that we did not anticipate all
> possible use-cases, and that the compatibility shims need tweaking.
>
> You can install this release in a flash via the wonderful cpanminus[1].
> Once again keep in mind that aside from the extra functionality, this
> release is identical to the official 0.08127 (which one must add turned
> out to be surprisingly bug-lean :)
>
> Baring any glaring issues (or in the case of utter lack of feedback)
> DBIC 0.08200 will ship about a month from now during the last week of
> February.
>
>
> So what is this all about anyway? Now in addition to the simple "column
> equality" join conditions, you can declare your relationships this way:
>
>
>    My::Schema::Artist->has_many(
>      cds_80s => 'My::Schema::CD',
>      sub {
>        my $args = shift;
>
>        return {
>          "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" },
>          "$args->{foreign_alias}.year"   => { '>', "1979", '<', "1990" },
>        };
>      }
>    );
>
> Which declares a regular relationship which can be used as usual e.g.
>
>    $artist_rs->search_related('cds_80s')->next;
>
> which in turn yields the SQL:
>
> ... FROM artist me LEFT JOIN cd cds_80s ON
>          cds_80s.artist = me.artistid
>      AND cds_80s.year < ?
>      AND cds_80s.year > ?
>
> with bind values of 1990 and 1979
>
> There is excellent documentation[2] so please take time to read it. In
> addition take a peek at the test suite[3] which shows some unusual tricks
> possible with custom join conditions.
>
> You may also be wondering if this work is complete - the answer is yes
> and no. The API for the coderefs is stable and will not change, nor will
> the add_relationship implementation. However we feel that this is not
> sufficient for a complete EAV extravaganza, so a method to pass arguments
> to the coderef via search() is currently in the works. This should make
> the custom relationships first class citizens, by allowing one to define
> the relationship partially on startup, and fill in the necessary binds
> during runtime on individual search() basis.
>
> So once again - please test and let us know!
>
> Happy search()ing :)
>
> [1] curl -L http://cpanmin.us | perl - http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.08190-TRIAL.tar.gz
> [2] http://search.cpan.org/~ribasushi/DBIx-Class-0.08190-TRIAL/lib/DBIx/Class/Relationship/Base.pm#condition
> [3] http://github.com/dbsrgits/dbix-class/commit/cacb39bb152f82ea2684c526c41be6caf3ab6679#diff-14
>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list