Re: [PATCH] DB_DataObject support for PostgreSQL casts

From: Date: Mon, 13 Oct 2003 00:47:03 +0000
Subject: Re: [PATCH] DB_DataObject support for PostgreSQL casts
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22622@lists.php.net to get a copy of this message
I think I'l go for this method, as you can use table(), to modify the type of a column currenly.. $do->table( array( 'myblob'=>'%s::byta', 'mymoney'=>'%s::money' ) + $do->table() ); Ian Eure wrote:
On Friday October 3 2003 12:39 am, Alan Knowles wrote:
Could you have a look at supporting this by a) generator writes: fieldname = bytea (eg. the field type.) b) DataObjects doing $suffix = ''; if (is_string($v)) { $suffix='::'.$v; $k = DB_DATAOBJECT_STR; }
I could, but it would only be useful in the bytea case. Casts are useful elsewhere, e.g. 100::money would cast '100' (int) to '$100.00' (float), and shouldn't (imo) be limited to one type per field.
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#22622) next »