Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 103860
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc: ether [...] cpan.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: allow asterisk for all columns
'+columns' => [ 'addresses.ip' ] cause structure like: { ... addresses => { ip => "173.234.209.17" }, } Is it possible that '+columns' => [ 'addresses.*' ] will result: { ... addresses => { ip => "173.234.209.17", some_column => 'value', ... }, } and not: { ... addresses => { * => 34322 }, } This will not distrub me to enumerate all columns in this query when DB is changed. Thank you.
On Tue Apr 21 18:25:20 2015, kes-kes@yandex.ru wrote: Show quoted text
> > This will not distrub me to enumerate all columns in this query when > DB is changed.
This kind of approach is generally an antipattern from a design perspective. I am very reluctant to add this kind of support - suboptimal approaches should not be made easier for the end user. Is there a reason you can't ask the source for the currently defined column set as described here: https://metacpan.org/pod/DBIx::Class::ResultSet#prefetch (pay attention to the (->source/->related_source)->columns )
Please let me know if the suggestion meets your needs, so I can close this ticket.
From: kes-kes [...] yandex.ru
just sugar as everything in perl. * vs { +{ "cds.genre.$_" => "genre.$_" } } $schema->source('Artist')->related_source('cds')->related_source('genre')->columns to much coding, So more chances to make mistake/bugs
From: kes-kes [...] yandex.ru
I copy-past that over and over and it starts to make troubles
Subject: Re: [rt.cpan.org #103860] allow asterisk for all columns
Date: Fri, 08 May 2015 15:40:03 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
On 05/08/2015 03:36 PM, Eugen Konkov via RT wrote: Show quoted text
> Queue: DBIx-Class > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=103860 > > > just sugar as everything in perl.
DBIx::Class itself is a low-level library which prioritizes completeness over sugar. Please consider implmenting extra sugar-syntax as a separate ResultSet component *OR* pitch it to some of the sugar module (e.g. DBIC::Helpers). The requested feature will not be implemented in-core, sorry.
From: kes-kes [...] yandex.ru
All is OK. I understand ;-) PS. I want ask you something, this not belongs to theme. I will send email to "Peter Rabbitson <ribasushi@cpan.org>" directly.