On 02/26/2015 07:04 PM, Augustus Saunders wrote:

The problem originates in DBI drivers

Not true for most DBDs

In the interim, numifying when the user asks for the value seems simple.

And architecturally incorrect. Just like another 40-odd features I am holding because they are not good enough for general consumption of the *extremely wide* userbase of DBIC.

As for performance, my understanding is that extracting the numeric part of a 
scalar is essentially free.

Nothing is "essentially free".

If checking to see whether a column is numeric is expensive, then that should be cached when the column is created/configured, and not recalculated when extracting values.

This has already been the case for years.

In all fairness, anybody who cares about this probably isn't going to use a 
heavy ORM tool in the first place. Hell, witness the fact that most of the 
database drivers haven't fixed this problem; nobody seems to care about 
performance *that much*.

Let's start with "I care" and... leave it at that? :)

TL;DR: Your proposed fix is not going to be merged, besides you were already given a non-invasive and reliable solution.

Cheers

_______________________________________________
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

Reply via email to