[Dbix-class] unqouting ?
Ivan.Georgiev at uboc.com
Ivan.Georgiev at uboc.com
Thu Nov 2 17:58:21 GMT 2006
hmm.. to be correct the exact code I'm using is :
my %record = ();
.....
$record{fieldX} = 'CURRENT_TIMESTAMP';
$schema->ruleset('table')->create(\%record);
so :
my $timestamp = 'CURRENT_TIMESTAMP';
$record{fieldX} = \$timestamp;
seems to work. 10x
very weird !! isn't this wrong behaviour ?
|---------+---------------------------->
| | Lee Standen |
| | <nom at standen.id.a|
| | u> |
| | |
| | 11/01/2006 07:44 |
| | PM |
| | Please respond to|
| | dbix-class |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------|
| |
| To: dbix-class at lists.rawmode.org |
| cc: |
| Subject: Re: [Dbix-class] unqouting ? |
>--------------------------------------------------------------------------------------------------------------------|
I believe that some (or more) methods don't do quoting if you use a
scalar ref...
Tried fieldX => \'CURRENT_TIMESTAMP' ?
Ivan.Georgiev at uboc.com wrote:
> hi,
>
> when I'm using $schema->ruleset('table')->create({ ..... fieldX =>
> 'CURRENT_TIMESTAMP' ..});
> The fieldX is set to "0000-00-00 00:00:00" instead of current timestamp,
> probably 'cause it
> interpreters it like string instead of value. How can I tell dbix that it
> should interpeter value literaly
> instead quoting it ?
>
> thanx
>
******************************************************************************
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose,
and is protected by law. If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.
Thank you.
More information about the Dbix-class
mailing list