Re: [PATCH] DB_DataObject support for PostgreSQL casts

From: Date: Sat, 18 Oct 2003 03:57:52 +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-22781@lists.php.net to get a copy of this message
can you have a look at http://cvs.php.net/annotate.php/pear/DB_DataObject/DataObject/Cast.php?login=2&rev=1.1 the standard cvs view seems to be a bit borked.. This should provide casting support for blobs, date, and raw sql in a cleaner manner.. (bytea is also picked up as a BLOB now..) .. I might modify DataObjects to attempt to automatically create a Cast object for BLOB columns... Regards alan 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 (#22781) next »