Re: how to set a DEFAULT value !!
- From: davidnicol@xxxxxxxxx (David Nicol)
- Date: Wed, 26 Apr 2006 12:24:09 -0500
On 4/24/06, Greg Sabino Mullane <greg@xxxxxxxxxxxx> wrote:
I've proposed adding something simlilar to DBI itself, but I don't recall getting
any feedback on it. Presumably once in place DBIx::Class will someday support it.
DBI is complex enough, and AIUI the DBI philosophy opposes adding features
to the core that will cause implementation headaches for driver authors.
The standard perl idiom for default values is
%hash = ( key1 => 'defaultvalue1', key2 => 'defaultval2', @_ );
Combining that with something like the insert_hash example from perldoc DBI
should give you a tidy function that inserts default values.
--
David L Nicol
Document what you do, then do what you documented
.
- Follow-Ups:
- Re: how to set a DEFAULT value !!
- From: Greg Sabino Mullane
- Re: how to set a DEFAULT value !!
- References:
- how to set a DEFAULT value !!
- From: T. H. Lin
- Re: how to set a DEFAULT value !!
- From: Greg Sabino Mullane
- how to set a DEFAULT value !!
- Prev by Date: RE: Oracle functions through DBI?
- Next by Date: Re: last insert id
- Previous by thread: Re: how to set a DEFAULT value !!
- Next by thread: Re: how to set a DEFAULT value !!
- Index(es):