I had the impression that the 'other' oracle extension is somewhat deprecated and unsupported already? (next one to be moved to sibe..PECL ? :) --Jani
On Fri, 5 Dec 2003, Maxim Maletsky wrote: > >it's been a while as I was mentioning that the naming convention for >OCI8* functions should change into something like oracle_*. Problem is >that there is also an old ora_* set of functions. > >I think this is something like rewriting the whole thingie ;) > >if notbody else minds we could think of applying the patch. > >m > > >On Fri, 5 Dec 2003 13:37:29 -0000 >"Wez Furlong" <[EMAIL PROTECTED]> wrote: > >> Would it make sense to expose this stuff as a stream using >> the streams API, so the user would be able to fread($lob) etc? >> >> You could still add functions for those things that aren't >> covered already by streams (the erase() call). >> >> One of the benefits would be avoiding adding more functions to >> the global namespace, and also side stepping any naming convention >> wars that might arise. >> >> --Wez. >> >> ----- Original Message ----- >> From: "Antony Dovgal" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >> Sent: Friday, December 05, 2003 1:30 PM >> Subject: [PHP-DEV] [PATCH] for oci8 and some improvement proposals >> >> >> > Hi, all! >> > >> > I want to propose a patch, that will add functions listed below to OCI8 >> extension. >> > Similar functions exist in Postgres & Informix extensions, but they are >> absent in OCI8 module. >> > The patch is being used on 4 my servers (development, test & 2 production >> servers) about a week and seems to be (almost? =)) bug-free. >> > >> > ocitelllob(); [ OCI_Lob->tell(); ] - ftell(); analogue >> for Lobs >> > ociwritelob(); [ OCI_Lob->write(); ] - fwrite(); analogue >> for Lobs >> > ocitruncatelob(); [ OCI_Lob->truncate(); ] - ftruncate(); >> analogue for Lobs >> > ocieraselob(); [ OCI_Lob->erase(); ] - erases specified >> part of a Lob (for BLOBs it means zero-filling, for CLOBs - space-filling) >> > ociflushlob(); [ OCI_Lob->flush(); ] - flushes Lob buffer >> (if buffering was enabled before) >> > ocisetbufferinglob(); [ OCI_Lob->setBuffering(); ] - turns on/off >> buffering for the current Lob >> > ocigetbufferinglob(); [ OCI_Lob->getBuffering(); ] - gets buffering' >> current state >> > ocirewindlob(); [ OCI_Lob->rewind(); ] - rewind(); analogue >> for Lobs >> > ocireadlob(); [ OCI_Lob->read(); ] - fread(); analogue >> for Lobs >> > ocieoflob(); [ OCI_Lob->eof(); ] - feof(); analogue for >> Lobs >> > ociseeklob(); [ OCI_Lob->seek(); ] - fseek(); analogue >> for Lobs >> > ocilobgetlength(); [ OCI_Lob->getLength(); ] - filesize(); analogue >> for Lobs >> > >> > ociappendlob(); - appends data from a Lob to another Lob >> > ocicopylob(); - copies data from a Lob to another Lob >> > ociisequallob(); - compares 2 Lobs and checks if they are equal >> > >> > All OCI-Lob methods could be rewritten to receive Lob as parameter, when >> they aren't called as methods, but currently this is not done (should I do >> it?). >> > >> > As you can see, I've added this check: >> > if (oci_lobgetlen(descr->conn,descr,&len) == 0 && descr->lob_size >= 0) >> > to almost all new functions. >> > I propose to add this check to already existing functions (I mean, to >> replace calls of CALL_OCI_RETURN()), >> > 'cause at this moment they get Lob's length from Oracle each time they are >> called and it's not the best decision imho. >> > >> > And there is another one thing I want to ask you about: >> > ALL functions, which wrap database API's in PHP, are called like this: >> <db>_<action>_<to>_<do>, >> > but only OCI8 wrappers are called in another way: oci<action><to><do> >> > Maybe it's time to declare this style deprecated and to change it to >> oci_<action>_<to>_<do>? >> > (especially after that endless discussion about studlyCaps =)) > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php