Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: BOLDRA [...] boldra.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08194
Fixed in: (no value)



Subject: inflate/deflate DateTime::Infinite objects
DBIx::Class::InflateColumn::DateTime deflates DateTime::Infinite::Future as "-0001--01--01 -01:-01:-01", which it cannot then inflate: DBIx::Class::InflateColumn::get_inflated_column(): Error while inflating -0001--01--01 -01:-01:-01 for end on Cloud::DB::Main::Order(00000000000557): Invalid date format: -0001--01--01 -01:-01:-01 at t/4000-Cloud-DB.t line 137 at (eval 1301) line 2
Subject: Re: [rt.cpan.org #70196] inflate/deflate DateTime::Infinite objects
Date: Wed, 10 Aug 2011 17:39:36 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
Paul Boldra via RT wrote: Show quoted text
> Wed Aug 10 09:59:28 2011: Request 70196 was acted upon. > Transaction: Ticket created by BOLDRA > Queue: DBIx-Class > Subject: inflate/deflate DateTime::Infinite objects > Broken in: 0.08194 > Severity: Normal > Owner: Nobody > Requestors: BOLDRA@boldra.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70196 > > > > DBIx::Class::InflateColumn::DateTime deflates DateTime::Infinite::Future > as "-0001--01--01 -01:-01:-01", which it cannot then inflate: > > DBIx::Class::InflateColumn::get_inflated_column(): Error while inflating > -0001--01--01 -01:-01:-01 for end on > Cloud::DB::Main::Order(00000000000557): Invalid date format: > -0001--01--01 -01:-01:-01 at t/4000-Cloud-DB.t line 137 at (eval 1301) > line 2
"can not inflate" is not the real problem. Before going any further let's make sure we are on the same page: IC::DT is not a value persistence component (there are things like DBIC::Serialize for this). It is a mapper between rdbms datetime specification and DateTime object instances (hopefully) corresponding to the same time. IC::DT can not be used to support e.g. DateTime::Incomplete objects because no rdbms supports such datatypes. I am not familiar with how/if different RDBMS support the concept of positive/negative infinite time. If some rdbms can in fact express such a time - then its formatter and IC::DT need to be adjusted to reflect this fact. However if you use IC::DT for "datetime object serialization" - then this is not a bug, as this is way outside of the scope of this component.
Subject: Re: [rt.cpan.org #70196] inflate/deflate DateTime::Infinite objects
Date: Thu, 11 Aug 2011 09:41:34 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Boldra <paul [...] boldra.com>
Ok, cool, if the db (in my case sqlite) doesn't support it, then I can't expect anything else from DBIC. I can easily get around it with my own serializer. Thanks for your help. Paul On 10.08.2011 17:39, Peter Rabbitson via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70196> > > Paul Boldra via RT wrote:
>> Wed Aug 10 09:59:28 2011: Request 70196 was acted upon. >> Transaction: Ticket created by BOLDRA >> Queue: DBIx-Class >> Subject: inflate/deflate DateTime::Infinite objects >> Broken in: 0.08194 >> Severity: Normal >> Owner: Nobody >> Requestors: BOLDRA@boldra.org >> Status: new >> Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=70196> >> >> >> DBIx::Class::InflateColumn::DateTime deflates DateTime::Infinite::Future >> as "-0001--01--01 -01:-01:-01", which it cannot then inflate: >> >> DBIx::Class::InflateColumn::get_inflated_column(): Error while inflating >> -0001--01--01 -01:-01:-01 for end on >> Cloud::DB::Main::Order(00000000000557): Invalid date format: >> -0001--01--01 -01:-01:-01 at t/4000-Cloud-DB.t line 137 at (eval 1301) >> line 2
> "can not inflate" is not the real problem. Before going any further > let's make sure we are on the same page: IC::DT is not a value > persistence component (there are things like DBIC::Serialize for this). > It is a mapper between rdbms datetime specification and DateTime object > instances (hopefully) corresponding to the same time. > > IC::DT can not be used to support e.g. DateTime::Incomplete objects > because no rdbms supports such datatypes. I am not familiar with how/if > different RDBMS support the concept of positive/negative infinite time. > > If some rdbms can in fact express such a time - then its formatter and > IC::DT need to be adjusted to reflect this fact. > > However if you use IC::DT for "datetime object serialization" - then > this is not a bug, as this is way outside of the scope of this > component. >
On Thu Aug 11 03:41:41 2011, paul@boldra.com wrote: Show quoted text
> Ok, cool, if the db (in my case sqlite) doesn't support it, then I can't > expect anything else from DBIC. I can easily get around it with my own > serializer. >
Rejecting ticket as we agree this is not a DBIC issue. Cheers!