Skip Menu |

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

Report information
The Basics
Id: 84509
Status: resolved
Priority: 0/
Queue: DBIx-DataModel

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

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



Subject: Bind value with attrs format
I noticed you added a feature very similar to that of DBIC: https://metacpan.org/source/DAMI/DBIx-DataModel-2.34/Changes#L6 Just a thought - perhaps it's worth considering using the preexisting DBIC syntax instead, for the benefit of some pie-in-the-sky portability in the future? https://metacpan.org/module/DBIx::Class::ResultSet#DBIC-BIND-VALUES next major release will also allow $val === [ {} => $val ]: https://github.com/dbsrgits/dbix-class/commit/b81bf850
Subject: Re: [rt.cpan.org #84509] Bind value with attrs format
Date: Tue, 9 Apr 2013 08:20:34 +0200 (CEST)
To: bug-DBIx-DataModel [...] rt.cpan.org
From: laurent.dami [...] free.fr
Hi, Thanks for the pointer; I didn't know this feature of DBIC. I agree that it would make sense to use the same syntax, so I'll try to adapt my stuff -- too bad I didn't know it before, I should be more attentive to look at DBIC evolution! Probably it would help to add some support for that functionality directly in SQLA ; did you ever consider that option ? Cheers, Laurent D. Show quoted text
----- Mail original ----- De: "Peter Rabbitson via RT" <bug-DBIx-DataModel@rt.cpan.org> Envoyé: Lundi 8 Avril 2013 23:42:30 Objet: [rt.cpan.org #84509] Bind value with attrs format Mon Apr 08 17:42:30 2013: Request 84509 was acted upon. Transaction: Ticket created by RIBASUSHI Queue: DBIx-DataModel Subject: Bind value with attrs format Broken in: (no value) Severity: Wishlist Owner: Nobody Requestors: ribasushi@cpan.org Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=84509 > I noticed you added a feature very similar to that of DBIC: https://metacpan.org/source/DAMI/DBIx-DataModel-2.34/Changes#L6 Just a thought - perhaps it's worth considering using the preexisting DBIC syntax instead, for the benefit of some pie-in-the-sky portability in the future? https://metacpan.org/module/DBIx::Class::ResultSet#DBIC-BIND-VALUES next major release will also allow $val === [ {} => $val ]: https://github.com/dbsrgits/dbix-class/commit/b81bf850
Subject: Re: [rt.cpan.org #84509] Bind value with attrs format
Date: Tue, 9 Apr 2013 17:24:34 +1000
To: "laurent.dami [...] free.fr via RT" <bug-DBIx-DataModel [...] rt.cpan.org>
From: Peter Rabbitson <ribasushi [...] cpan.org>
On Tue, Apr 09, 2013 at 02:21:00AM -0400, laurent.dami@free.fr via RT wrote: Show quoted text
> > Probably it would help to add some support for that functionality directly in SQLA
Generally yes. Show quoted text
> did you ever consider that option ?
Not *yet* because pending mst's work on Data::Query it may become duplicated in a way that we'll end up supporting both a reasonable and an unreasonable legacy way of doing this. Hence why I am confining the "crazy" to DBIC for the time being until the layers of SQLA settle to make it clear *how* to do this correctly. For instance the same thing happened with the limit dialects - I created these regex monsters within DBIC mainly so I can write the proper tests. These tests were a basis for a *sane* generic support for limit dialects in the upcoming SQLA itself.
Le Lun 08 Avr 2013 17:42:30, RIBASUSHI a écrit : Show quoted text
> I noticed you added a feature very similar to that of DBIC: > https://metacpan.org/source/DAMI/DBIx-DataModel-2.34/Changes#L6 > > Just a thought - perhaps it's worth considering using the preexisting > DBIC syntax instead, for the benefit of some pie-in-the-sky > portability in the future? >
First I just implemented DBIC compatibility, also keeping DBIDM initial syntax; but finally I decided to support DBIDM syntax only. It is more verbose and more foreign to DBI->bind_param(..), but it has the great advantage of being recognizable without ambiguity. FYI : this decision was after I encountered a bug with a request of shape -where => {col => [ {"=" => undef}, {"<" => $max}]} which was misinterpreted as a value with bind type.